Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (42 sloc) 1.526 kb
from mapstory.models import *
from django import forms
from django.contrib.contenttypes.models import ContentType
from django.contrib import admin
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
class ResourceForm(forms.ModelForm):
text = forms.CharField(widget=forms.Textarea)
class Meta:
model = Resource
class ResourceAdmin(admin.ModelAdmin):
list_display = 'id','name','order'
list_display_links = 'id',
list_editable = 'name','order'
form = ResourceForm
ordering = ['order',]
class SectionForm(forms.ModelForm):
text = forms.CharField(widget=forms.Textarea)
class Meta:
model = Section
class SectionAdmin(admin.ModelAdmin):
list_display = 'id','name','order'
list_display_links = 'id',
list_editable = 'name','order'
form = SectionForm
ordering = ['order',]
class VideoLinkForm(forms.ModelForm):
text = forms.CharField(widget=forms.Textarea)
class Meta:
model = VideoLink
class VideoLinkAdmin(admin.ModelAdmin):
list_display = 'id','name','title','href','publish','location'
list_display_links = 'id',
list_editable = 'name','title','publish','href','location'
form = VideoLinkForm
class ContactDetailAdmin(admin.ModelAdmin):
pass
admin.site.register(VideoLink, VideoLinkAdmin)
admin.site.register(Section, SectionAdmin)
admin.site.register(ContactDetail, ContactDetailAdmin)
admin.site.register(Resource, ResourceAdmin)
admin.site.register(Topic)
Jump to Line
Something went wrong with that request. Please try again.