Use constant only caps for constants
This commit is contained in:
parent
164e2f5c28
commit
02a566c129
@ -14,9 +14,9 @@ from .models import ServiceTicket, ProxyTicket, ProxyGrantingTicket, User, Servi
|
|||||||
from .models import Username, ReplaceAttributName, ReplaceAttributValue, FilterAttributValue
|
from .models import Username, ReplaceAttributName, ReplaceAttributValue, FilterAttributValue
|
||||||
from .forms import TicketForm
|
from .forms import TicketForm
|
||||||
|
|
||||||
tickets_readonly_fields = ('validate', 'service', 'service_pattern',
|
TICKETS_READONLY_FIELDS = ('validate', 'service', 'service_pattern',
|
||||||
'creation', 'renew', 'single_log_out', 'value')
|
'creation', 'renew', 'single_log_out', 'value')
|
||||||
tickets_fields = ('validate', 'service', 'service_pattern',
|
TICKETS_FIELDS = ('validate', 'service', 'service_pattern',
|
||||||
'creation', 'renew', 'single_log_out')
|
'creation', 'renew', 'single_log_out')
|
||||||
|
|
||||||
|
|
||||||
@ -25,8 +25,8 @@ class ServiceTicketInline(admin.TabularInline):
|
|||||||
model = ServiceTicket
|
model = ServiceTicket
|
||||||
extra = 0
|
extra = 0
|
||||||
form = TicketForm
|
form = TicketForm
|
||||||
readonly_fields = tickets_readonly_fields
|
readonly_fields = TICKETS_READONLY_FIELDS
|
||||||
fields = tickets_fields
|
fields = TICKETS_FIELDS
|
||||||
|
|
||||||
|
|
||||||
class ProxyTicketInline(admin.TabularInline):
|
class ProxyTicketInline(admin.TabularInline):
|
||||||
@ -34,8 +34,8 @@ class ProxyTicketInline(admin.TabularInline):
|
|||||||
model = ProxyTicket
|
model = ProxyTicket
|
||||||
extra = 0
|
extra = 0
|
||||||
form = TicketForm
|
form = TicketForm
|
||||||
readonly_fields = tickets_readonly_fields
|
readonly_fields = TICKETS_READONLY_FIELDS
|
||||||
fields = tickets_fields
|
fields = TICKETS_FIELDS
|
||||||
|
|
||||||
|
|
||||||
class ProxyGrantingInline(admin.TabularInline):
|
class ProxyGrantingInline(admin.TabularInline):
|
||||||
@ -43,8 +43,8 @@ class ProxyGrantingInline(admin.TabularInline):
|
|||||||
model = ProxyGrantingTicket
|
model = ProxyGrantingTicket
|
||||||
extra = 0
|
extra = 0
|
||||||
form = TicketForm
|
form = TicketForm
|
||||||
readonly_fields = tickets_readonly_fields
|
readonly_fields = TICKETS_READONLY_FIELDS
|
||||||
fields = tickets_fields[1:]
|
fields = TICKETS_FIELDS[1:]
|
||||||
|
|
||||||
|
|
||||||
class UserAdmin(admin.ModelAdmin):
|
class UserAdmin(admin.ModelAdmin):
|
||||||
|
Loading…
Reference in New Issue
Block a user