mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 14:52:15 +00:00
Remove unneeded admin views, change the display names for some models
This commit is contained in:
@@ -53,19 +53,6 @@ class EVEPlayerCharacterAdmin(admin.ModelAdmin):
|
|||||||
|
|
||||||
admin.site.register(EVEPlayerCharacter, EVEPlayerCharacterAdmin)
|
admin.site.register(EVEPlayerCharacter, EVEPlayerCharacterAdmin)
|
||||||
|
|
||||||
class EVEPlayerCharacterRoleAdmin(admin.ModelAdmin):
|
|
||||||
list_display = ('id', 'roleid', 'name')
|
|
||||||
search_fields = ['roleid', 'name']
|
|
||||||
|
|
||||||
def has_add_permission(self, request):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def has_delete_permission(self, request, obj=None):
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(EVEPlayerCharacterRole, EVEPlayerCharacterRoleAdmin)
|
|
||||||
|
|
||||||
class EVEPlayerCorporationInline(admin.TabularInline):
|
class EVEPlayerCorporationInline(admin.TabularInline):
|
||||||
model = EVEPlayerCorporation
|
model = EVEPlayerCorporation
|
||||||
fields = ('name', 'ticker')
|
fields = ('name', 'ticker')
|
||||||
@@ -98,6 +85,7 @@ class EVEPlayerCorporationAdmin(admin.ModelAdmin):
|
|||||||
list_display = ('id', 'name', 'ticker', 'member_count', 'alliance')
|
list_display = ('id', 'name', 'ticker', 'member_count', 'alliance')
|
||||||
search_fields = ['name', 'ticker']
|
search_fields = ['name', 'ticker']
|
||||||
readonly_fields = ('name', 'ticker', 'description', 'url', 'ceo_character', 'alliance', 'alliance_join_date', 'tax_rate', 'member_count', 'shares')
|
readonly_fields = ('name', 'ticker', 'description', 'url', 'ceo_character', 'alliance', 'alliance_join_date', 'tax_rate', 'member_count', 'shares')
|
||||||
|
exclude = ('logo_graphic_id', 'logo_shape1', 'logo_shape2', 'logo_shape3', 'logo_color1', 'logo_color2', 'logo_color3')
|
||||||
|
|
||||||
def has_add_permission(self, request):
|
def has_add_permission(self, request):
|
||||||
return False
|
return False
|
||||||
@@ -107,30 +95,3 @@ class EVEPlayerCorporationAdmin(admin.ModelAdmin):
|
|||||||
|
|
||||||
|
|
||||||
admin.site.register(EVEPlayerCorporation, EVEPlayerCorporationAdmin)
|
admin.site.register(EVEPlayerCorporation, EVEPlayerCorporationAdmin)
|
||||||
|
|
||||||
class EVESkillAdmin(admin.ModelAdmin):
|
|
||||||
list_display = ('id', 'name', 'group' )
|
|
||||||
search_fields = ['id', 'name']
|
|
||||||
|
|
||||||
def has_add_permission(self, request):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def has_delete_permission(self, request, obj=None):
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(EVESkill, EVESkillAdmin)
|
|
||||||
|
|
||||||
class EVESkillGroupAdmin(admin.ModelAdmin):
|
|
||||||
list_display = ('id', 'name', )
|
|
||||||
search_fields = ['id', 'name']
|
|
||||||
|
|
||||||
def has_add_permission(self, request):
|
|
||||||
return False
|
|
||||||
|
|
||||||
def has_delete_permission(self, request, obj=None):
|
|
||||||
return False
|
|
||||||
|
|
||||||
|
|
||||||
admin.site.register(EVESkillGroup, EVESkillGroupAdmin)
|
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ class EVEPlayerAlliance(EVEAPIModel):
|
|||||||
class Meta:
|
class Meta:
|
||||||
app_label = 'eve_api'
|
app_label = 'eve_api'
|
||||||
ordering = ['date_founded']
|
ordering = ['date_founded']
|
||||||
verbose_name = 'Player Alliance'
|
verbose_name = 'Alliance'
|
||||||
verbose_name_plural = 'Player Alliances'
|
verbose_name_plural = 'Alliances'
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
if self.name:
|
if self.name:
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ class EVEPlayerCharacter(EVEAPIModel):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
app_label = 'eve_api'
|
app_label = 'eve_api'
|
||||||
verbose_name = 'Player Character'
|
verbose_name = 'Character'
|
||||||
verbose_name_plural = 'Player Characters'
|
verbose_name_plural = 'Characters'
|
||||||
|
|
||||||
permissions = (
|
permissions = (
|
||||||
("can_view_all_characters", "Can view any character profile"),
|
("can_view_all_characters", "Can view any character profile"),
|
||||||
|
|||||||
@@ -69,8 +69,8 @@ class EVEPlayerCorporation(EVEAPIModel):
|
|||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
app_label = 'eve_api'
|
app_label = 'eve_api'
|
||||||
verbose_name = 'Player Corporation'
|
verbose_name = 'Corporation'
|
||||||
verbose_name_plural = 'Player Corporations'
|
verbose_name_plural = 'Corporations'
|
||||||
|
|
||||||
def __unicode__(self):
|
def __unicode__(self):
|
||||||
if self.name:
|
if self.name:
|
||||||
|
|||||||
Reference in New Issue
Block a user