mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-22 20:44:55 +00:00
pyi2phosts/urls.py: add faq pattern using django generic views
This commit is contained in:
parent
080af231d2
commit
12bedec93e
@ -1,13 +1,20 @@
|
|||||||
from django.conf.urls.defaults import *
|
from django.conf.urls.defaults import *
|
||||||
|
from django.views.generic.simple import direct_to_template
|
||||||
|
|
||||||
# Uncomment the next two lines to enable the admin:
|
# Uncomment the next two lines to enable the admin:
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
admin.autodiscover()
|
admin.autodiscover()
|
||||||
|
|
||||||
|
from pyi2phosts.extsources.models import ExternalSource
|
||||||
from pyi2phosts.other.views import *
|
from pyi2phosts.other.views import *
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
url(r'^$', index, name='index'),
|
url(r'^$', index, name='index'),
|
||||||
|
url(r'^faq/$', direct_to_template, {
|
||||||
|
'template': 'faq.html',
|
||||||
|
'extra_context': {'title': settings.SITE_NAME,
|
||||||
|
'sources': ExternalSource.objects.filter(active=True)}
|
||||||
|
}, name='faq' ),
|
||||||
(r'^postkey/', include('pyi2phosts.postkey.urls')),
|
(r'^postkey/', include('pyi2phosts.postkey.urls')),
|
||||||
(r'^jump/', include('pyi2phosts.jump.urls')),
|
(r'^jump/', include('pyi2phosts.jump.urls')),
|
||||||
# Example:
|
# Example:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user