mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-02-02 09:55:52 +00:00
Implement index view throught django generic views
This commit is contained in:
parent
12bedec93e
commit
bd7417f900
@ -5,16 +5,27 @@ from django.views.generic.simple import direct_to_template
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
admin.autodiscover()
|
admin.autodiscover()
|
||||||
|
|
||||||
|
from pyi2phosts.lib.utils import get_b32
|
||||||
from pyi2phosts.extsources.models import ExternalSource
|
from pyi2phosts.extsources.models import ExternalSource
|
||||||
from pyi2phosts.other.views import *
|
import settings
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
url(r'^$', index, name='index'),
|
url(r'^$', direct_to_template, {
|
||||||
|
'template': 'index.html',
|
||||||
|
'extra_context': {
|
||||||
|
'title': settings.SITE_NAME,
|
||||||
|
'domain': settings.DOMAIN,
|
||||||
|
'b64': settings.MY_B64,
|
||||||
|
'b32': get_b32(settings.MY_B64)
|
||||||
|
}
|
||||||
|
}, name='index'),
|
||||||
url(r'^faq/$', direct_to_template, {
|
url(r'^faq/$', direct_to_template, {
|
||||||
'template': 'faq.html',
|
'template': 'faq.html',
|
||||||
'extra_context': {'title': settings.SITE_NAME,
|
'extra_context': {
|
||||||
'sources': ExternalSource.objects.filter(active=True)}
|
'title': settings.SITE_NAME,
|
||||||
}, name='faq' ),
|
'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