diff --git a/config/__pycache__/settings.cpython-311.pyc b/config/__pycache__/settings.cpython-311.pyc index 5be02db..85f1e3c 100644 Binary files a/config/__pycache__/settings.cpython-311.pyc and b/config/__pycache__/settings.cpython-311.pyc differ diff --git a/config/settings.py b/config/settings.py index 291d043..a13c067 100644 --- a/config/settings.py +++ b/config/settings.py @@ -155,6 +155,8 @@ STATICFILES_DIRS = [ BASE_DIR / 'node_modules', ] +LOGIN_URL = '/login/' + # Email EMAIL_BACKEND = os.getenv( "EMAIL_BACKEND", diff --git a/core/__pycache__/admin.cpython-311.pyc b/core/__pycache__/admin.cpython-311.pyc index cd6f855..1edc092 100644 Binary files a/core/__pycache__/admin.cpython-311.pyc and b/core/__pycache__/admin.cpython-311.pyc differ diff --git a/core/__pycache__/forms.cpython-311.pyc b/core/__pycache__/forms.cpython-311.pyc new file mode 100644 index 0000000..0fd4b7b Binary files /dev/null and b/core/__pycache__/forms.cpython-311.pyc differ diff --git a/core/__pycache__/models.cpython-311.pyc b/core/__pycache__/models.cpython-311.pyc index 9aa598b..d31fe84 100644 Binary files a/core/__pycache__/models.cpython-311.pyc and b/core/__pycache__/models.cpython-311.pyc differ diff --git a/core/__pycache__/urls.cpython-311.pyc b/core/__pycache__/urls.cpython-311.pyc index 7e24764..958a5c6 100644 Binary files a/core/__pycache__/urls.cpython-311.pyc and b/core/__pycache__/urls.cpython-311.pyc differ diff --git a/core/__pycache__/views.cpython-311.pyc b/core/__pycache__/views.cpython-311.pyc index 96db8e1..c9efc91 100644 Binary files a/core/__pycache__/views.cpython-311.pyc and b/core/__pycache__/views.cpython-311.pyc differ diff --git a/core/admin.py b/core/admin.py index 8c38f3f..8782b11 100644 --- a/core/admin.py +++ b/core/admin.py @@ -1,3 +1,10 @@ from django.contrib import admin +from .models import Agent # Register your models here. + +@admin.register(Agent) +class AgentAdmin(admin.ModelAdmin): + list_display = ('name', 'user', 'published', 'created_at') + list_filter = ('published', 'user') + search_fields = ('name', 'description') \ No newline at end of file diff --git a/core/forms.py b/core/forms.py new file mode 100644 index 0000000..0fbbac6 --- /dev/null +++ b/core/forms.py @@ -0,0 +1,10 @@ +from django import forms +from django.contrib.auth.forms import UserCreationForm +from django.contrib.auth.models import User + +class SignUpForm(UserCreationForm): + email = forms.EmailField(max_length=254, help_text='Required. Inform a valid email address.') + + class Meta: + model = User + fields = ('username', 'email', 'password', 'password2') diff --git a/core/migrations/0001_initial.py b/core/migrations/0001_initial.py new file mode 100644 index 0000000..24a30ce --- /dev/null +++ b/core/migrations/0001_initial.py @@ -0,0 +1,29 @@ +# Generated by Django 5.2.7 on 2025-12-17 04:36 + +import django.db.models.deletion +from django.conf import settings +from django.db import migrations, models + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + migrations.swappable_dependency(settings.AUTH_USER_MODEL), + ] + + operations = [ + migrations.CreateModel( + name='Agent', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ('description', models.TextField(blank=True)), + ('published', models.BooleanField(default=False)), + ('created_at', models.DateTimeField(auto_now_add=True)), + ('updated_at', models.DateTimeField(auto_now=True)), + ('user', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), + ], + ), + ] diff --git a/core/migrations/__pycache__/0001_initial.cpython-311.pyc b/core/migrations/__pycache__/0001_initial.cpython-311.pyc new file mode 100644 index 0000000..9677e96 Binary files /dev/null and b/core/migrations/__pycache__/0001_initial.cpython-311.pyc differ diff --git a/core/models.py b/core/models.py index 71a8362..b20d6a1 100644 --- a/core/models.py +++ b/core/models.py @@ -1,3 +1,15 @@ from django.db import models +from django.contrib.auth.models import User # Create your models here. + +class Agent(models.Model): + user = models.ForeignKey(User, on_delete=models.CASCADE, null=True, blank=True) # Allow null user for now + name = models.CharField(max_length=255) + description = models.TextField(blank=True) + published = models.BooleanField(default=False) + created_at = models.DateTimeField(auto_now_add=True) + updated_at = models.DateTimeField(auto_now=True) + + def __str__(self): + return self.name \ No newline at end of file diff --git a/core/templates/base.html b/core/templates/base.html index 76bc253..729fed3 100644 --- a/core/templates/base.html +++ b/core/templates/base.html @@ -3,7 +3,7 @@
-