Port to new django version - not yet fully working
- location field makes problems
This commit is contained in:
@@ -1,20 +1,20 @@
|
||||
from django.contrib import admin
|
||||
from eventplanner.models import Event, EventParticipation
|
||||
|
||||
|
||||
class EventParticipationInline(admin.TabularInline):
|
||||
model = EventParticipation
|
||||
extra = 1
|
||||
readonly_fields = ('user',)
|
||||
fields = ( 'user', 'status', 'comment', )
|
||||
has_add_permission = lambda self, req : False
|
||||
has_delete_permission = lambda self, req, obj : False
|
||||
|
||||
template = "eventplanner/admin_tabular.html"
|
||||
|
||||
|
||||
class EventAdmin(admin.ModelAdmin):
|
||||
inlines = ( EventParticipationInline, )
|
||||
|
||||
|
||||
admin.site.register( Event, EventAdmin )
|
||||
#from django.contrib import admin
|
||||
#from eventplanner.models import Event, EventParticipation
|
||||
#
|
||||
#
|
||||
#class EventParticipationInline(admin.TabularInline):
|
||||
# model = EventParticipation
|
||||
# extra = 1
|
||||
# readonly_fields = ('user',)
|
||||
# fields = ('user', 'status', 'comment',)
|
||||
# has_add_permission = lambda self, req: False
|
||||
# has_delete_permission = lambda self, req, obj: False
|
||||
#
|
||||
# template = "eventplanner/admin_tabular.html"
|
||||
#
|
||||
#
|
||||
#class EventAdmin(admin.ModelAdmin):
|
||||
# inlines = (EventParticipationInline,)
|
||||
#
|
||||
#
|
||||
#admin.site.register(Event, EventAdmin)
|
||||
|
||||
Reference in New Issue
Block a user