Skip to content

Commit

Permalink
Renomeia modelo
Browse files Browse the repository at this point in the history
  • Loading branch information
Rossi-Luciano committed Jul 4, 2022
1 parent 1d8b779 commit c5c9033
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion scholarly_articles/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class ScholarlyArticles(models.Model):
]


class Contributor(models.Model):
class Contributors(models.Model):
doi = models.CharField("DOI", max_length=255, null=False, blank=False)
doi_url = models.URLField("DOI URL", max_length=255, null=True, blank=True)
family = models.CharField("Family", max_length=255, null=False, blank=False)
Expand Down
10 changes: 5 additions & 5 deletions scholarly_articles/wagtail_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from wagtail.contrib.modeladmin.options import (ModelAdmin, modeladmin_register)

from .models import (ScholarlyArticles, Contributor)
from .models import (ScholarlyArticles, Contributors)


class ScholarlyArticlesAdmin(ModelAdmin):
Expand Down Expand Up @@ -30,9 +30,9 @@ class ScholarlyArticlesAdmin(ModelAdmin):
search_fields = ('doi', 'journal_issn_l')


class ContributorAdmin(ModelAdmin):
model = Contributor
menu_label = 'Contributor'
class ContributorsAdmin(ModelAdmin):
model = Contributors
menu_label = 'Contributors'
menu_icon = 'folder'
menu_order = 300
add_to_settings_menu = False # or True to add your model to the Settings sub-menu
Expand All @@ -51,4 +51,4 @@ class ContributorAdmin(ModelAdmin):


modeladmin_register(ScholarlyArticlesAdmin)
modeladmin_register(ContributorAdmin)
modeladmin_register(ContributorsAdmin)

0 comments on commit c5c9033

Please sign in to comment.