split website and cms; work on sections
This commit is contained in:
@ -2,40 +2,42 @@ from django.conf.urls import url, include
|
||||
|
||||
from website.models import *
|
||||
from website.views import *
|
||||
from website.routes import *
|
||||
|
||||
from cms.models import Article
|
||||
from cms.views import ViewSet
|
||||
from cms.routes import *
|
||||
|
||||
class ProgramSet (ViewSet):
|
||||
model = ProgramPost
|
||||
name = 'programs'
|
||||
|
||||
model = Program
|
||||
list_routes = [
|
||||
AllRoute,
|
||||
ThreadRoute,
|
||||
SearchRoute,
|
||||
DateRoute,
|
||||
]
|
||||
|
||||
detail_sections = [
|
||||
ScheduleSection
|
||||
]
|
||||
|
||||
class EpisodeSet (ViewSet):
|
||||
model = EpisodePost
|
||||
name = 'episodes'
|
||||
|
||||
model = Episode
|
||||
list_routes = [
|
||||
AllRoute,
|
||||
ThreadRoute,
|
||||
SearchRoute,
|
||||
DateRoute,
|
||||
]
|
||||
|
||||
|
||||
class ArticleSet (ViewSet):
|
||||
model = Article
|
||||
list_routes = [
|
||||
AllRoute,
|
||||
ThreadRoute,
|
||||
SearchRoute,
|
||||
DateRoute,
|
||||
]
|
||||
|
||||
|
||||
router = Router()
|
||||
router.register_set(ProgramSet())
|
||||
router.register_set(EpisodeSet())
|
||||
|
Reference in New Issue
Block a user