Skip to content

Commit

Permalink
First draft of data model #3168
Browse files Browse the repository at this point in the history
  • Loading branch information
joemull committed Dec 12, 2024
1 parent fe17f5a commit 84325d1
Show file tree
Hide file tree
Showing 12 changed files with 1,026 additions and 67 deletions.
6 changes: 3 additions & 3 deletions src/core/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ class SettingAdmin(admin.ModelAdmin):
class AccountAdmin(UserAdmin):
"""Displays Account objects in the Django admin interface."""
list_display = ('id', 'email', 'orcid', 'first_name', 'middle_name',
'last_name', 'institution', '_roles_in', 'last_login')
'last_name', '_roles_in', 'last_login')
list_display_links = ('id', 'email')
list_filter = ('accountrole__journal',
'repositoryrole__repository__short_name',
'is_active', 'is_staff', 'is_admin', 'is_superuser',
'last_login')
search_fields = ('id', 'username', 'email', 'first_name', 'middle_name',
'last_name', 'orcid', 'institution',
'last_name', 'orcid',
'biography', 'signature')

fieldsets = UserAdmin.fieldsets + (
(None, {'fields': (
'name_prefix', 'middle_name', 'orcid',
'institution', 'department', 'country', 'twitter',
'twitter',
'linkedin', 'facebook', 'github', 'website', 'biography', 'enable_public_profile',
'signature', 'profile_image', 'interest', "preferred_timezone",
)}),
Expand Down
4 changes: 2 additions & 2 deletions src/core/forms/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ class RegistrationForm(forms.ModelForm, CaptchaForm):
class Meta:
model = models.Account
fields = ('email', 'salutation', 'first_name', 'middle_name',
'last_name', 'department', 'institution', 'country', 'orcid',)
'last_name', 'orcid',)
widgets = {'orcid': forms.HiddenInput() }

def __init__(self, *args, **kwargs):
Expand Down Expand Up @@ -532,7 +532,7 @@ def __init__(self, *args, **kwargs):
class QuickUserForm(forms.ModelForm):
class Meta:
model = models.Account
fields = ('email', 'salutation', 'first_name', 'last_name', 'institution',)
fields = ('email', 'salutation', 'first_name', 'last_name',)


class LoginForm(CaptchaForm):
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 84325d1

Please sign in to comment.