more fixes
This commit is contained in:
@@ -19,17 +19,9 @@ class Igny8AdminSite(UnfoldAdminSite):
|
||||
index_title = 'IGNY8 Administration'
|
||||
|
||||
def get_urls(self):
|
||||
"""Add dashboard URL"""
|
||||
"""Get admin URLs without custom dashboard"""
|
||||
urls = super().get_urls()
|
||||
custom_urls = [
|
||||
path('dashboard/', self.dashboard_view, name='dashboard'),
|
||||
]
|
||||
return custom_urls + urls
|
||||
|
||||
def dashboard_view(self, request):
|
||||
"""Dashboard view wrapper"""
|
||||
from igny8_core.admin.dashboard import admin_dashboard
|
||||
return admin_dashboard(request)
|
||||
return urls
|
||||
|
||||
def get_app_list(self, request):
|
||||
"""
|
||||
|
||||
@@ -4,7 +4,7 @@ Admin interface for auth models
|
||||
from django import forms
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
|
||||
from unfold.admin import ModelAdmin
|
||||
from unfold.admin import ModelAdmin, TabularInline
|
||||
from igny8_core.admin.base import AccountAdminMixin
|
||||
from .models import User, Account, Plan, Subscription, Site, Sector, SiteUserAccess, Industry, IndustrySector, SeedKeyword, PasswordResetToken
|
||||
|
||||
@@ -332,7 +332,7 @@ class PasswordResetTokenAdmin(ModelAdmin):
|
||||
return qs.none()
|
||||
|
||||
|
||||
class SectorInline(admin.TabularInline):
|
||||
class SectorInline(TabularInline):
|
||||
"""Inline admin for sectors within Site admin."""
|
||||
model = Sector
|
||||
extra = 0
|
||||
@@ -477,7 +477,7 @@ class SiteUserAccessAdmin(ModelAdmin):
|
||||
readonly_fields = ['granted_at']
|
||||
|
||||
|
||||
class IndustrySectorInline(admin.TabularInline):
|
||||
class IndustrySectorInline(TabularInline):
|
||||
"""Inline admin for industry sectors within Industry admin."""
|
||||
model = IndustrySector
|
||||
extra = 0
|
||||
|
||||
@@ -6,6 +6,7 @@ with full workflow functionality. This file contains legacy/minimal registration
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.utils.html import format_html
|
||||
from unfold.admin import ModelAdmin
|
||||
from igny8_core.admin.base import AccountAdminMixin
|
||||
from .models import (
|
||||
CreditCostConfig,
|
||||
@@ -49,7 +50,7 @@ from .models import (
|
||||
# or have minimal implementations that don't conflict
|
||||
|
||||
@admin.register(AccountPaymentMethod)
|
||||
class AccountPaymentMethodAdmin(admin.ModelAdmin):
|
||||
class AccountPaymentMethodAdmin(ModelAdmin):
|
||||
list_display = [
|
||||
'display_name',
|
||||
'type',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
from django.contrib import admin
|
||||
from django.contrib import messages
|
||||
from unfold.admin import ModelAdmin
|
||||
from unfold.admin import ModelAdmin, TabularInline
|
||||
from igny8_core.admin.base import SiteSectorAdminMixin
|
||||
from .models import Tasks, Images, Content
|
||||
from igny8_core.business.content.models import ContentTaxonomy, ContentAttribute, ContentTaxonomyRelation, ContentClusterMap
|
||||
@@ -8,7 +8,7 @@ from import_export.admin import ExportMixin
|
||||
from import_export import resources
|
||||
|
||||
|
||||
class ContentTaxonomyInline(admin.TabularInline):
|
||||
class ContentTaxonomyInline(TabularInline):
|
||||
"""Inline admin for managing content taxonomy relationships"""
|
||||
model = ContentTaxonomyRelation
|
||||
extra = 1
|
||||
|
||||
@@ -1,11 +1,3 @@
|
||||
{% extends "admin/base.html" %}
|
||||
|
||||
{% block title %}{{ title }} | IGNY8 Admin{% endblock %}
|
||||
|
||||
{% block branding %}
|
||||
<h1 id="site-name">
|
||||
<a href="{% url 'admin:index' %}">
|
||||
🚀 IGNY8 Administration
|
||||
</a>
|
||||
</h1>
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user