diff --git a/article/admin.py b/article/admin.py index 8c38f3f3d..b7ecf05a2 100644 --- a/article/admin.py +++ b/article/admin.py @@ -1,3 +1,5 @@ from django.contrib import admin - +from .models import ArticlePage, ArticleAuthorsOrderable # Register your models here. + +admin.site.register(ArticlePage) \ No newline at end of file diff --git a/authors/admin.py b/authors/admin.py new file mode 100644 index 000000000..908f83244 --- /dev/null +++ b/authors/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin +from .models import AuthorPage +# Register your models here. + +admin.site.register(AuthorPage) \ No newline at end of file diff --git a/home/admin.py b/home/admin.py index 8c38f3f3d..89f883952 100644 --- a/home/admin.py +++ b/home/admin.py @@ -1,3 +1,7 @@ from django.contrib import admin +from .models import HomePage, TopArticlesOrderable # Register your models here. + +admin.site.register(HomePage) +admin.site.register(TopArticlesOrderable) diff --git a/magazine/admin.py b/magazine/admin.py index 1b78a7298..01ecb7088 100644 --- a/magazine/admin.py +++ b/magazine/admin.py @@ -3,5 +3,3 @@ # Register your models here. -admin.site.register(MagazineIssue) -admin.site.register(MagazineSection) \ No newline at end of file diff --git a/section/admin.py b/section/admin.py index 8c38f3f3d..637ee265c 100644 --- a/section/admin.py +++ b/section/admin.py @@ -1,3 +1,5 @@ from django.contrib import admin +from .models import SectionPage # Register your models here. +admin.site.register(SectionPage) \ No newline at end of file diff --git a/specialfeaturelanding/admin.py b/specialfeaturelanding/admin.py new file mode 100644 index 000000000..cee4ab139 --- /dev/null +++ b/specialfeaturelanding/admin.py @@ -0,0 +1,5 @@ +from django.contrib import admin +from .models import SpecialLandingPage +# Register your models here. + +admin.site.register(SpecialLandingPage) \ No newline at end of file diff --git a/users/migrations/0004_user_is_staff.py b/users/migrations/0004_user_is_staff.py new file mode 100644 index 000000000..2ea39cc93 --- /dev/null +++ b/users/migrations/0004_user_is_staff.py @@ -0,0 +1,18 @@ +# Generated by Django 4.1 on 2024-05-17 00:05 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0003_alter_user_id'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='is_staff', + field=models.BooleanField(default=False), + ), + ] diff --git a/users/models.py b/users/models.py index a2045be96..913b51362 100644 --- a/users/models.py +++ b/users/models.py @@ -16,6 +16,7 @@ class User(AbstractBaseUser, PermissionsMixin): last_name = CharField(max_length=150, blank=True) is_active = BooleanField(default=True) + is_staff = BooleanField(default=False) # Use the email as the username. Users log in with email + password # instead of username + password.