Пример #1
0
    def urls(self):
        index_view = generic.TemplateView.as_view(
            template_name='demo/index.html')

        return frontend.ModuleURLResolver(
            '^', [url('^$', index_view, name="index")],
            module=self,
            app_name='demo',
            namespace='demo')

    def index_url(self):
        return '/'

    def installed(self):
        return True


modules.register(Demo())

if django.VERSION < (1, 7):
    admin.autodiscover()

from material.frontend import urls as frontend_urls  # NOQA

urlpatterns = [
    url(r'^accounts/login/$', auth.login, name='login'),
    url(r'^accounts/logout/$', auth.logout, name='logout'),
    url(r'^', include('demo.website')),
    url(r'', include(frontend_urls)),
]
Пример #2
0
    @property
    def urls(self):
        index_view = generic.TemplateView.as_view(template_name='demo/index.html')

        return frontend.ModuleURLResolver(
            '^', [url('^$', index_view, name="index")],
            module=self, app_name='demo', namespace='demo')

    def index_url(self):
        return '/'

    def installed(self):
        return True

modules.register(Demo())


if django.VERSION < (1, 7):
    admin.autodiscover()


from material.frontend import urls as frontend_urls  # NOQA

urlpatterns = [
    url(r'^accounts/login/$', auth.login, name='login'),
    url(r'^accounts/logout/$', auth.logout, name='logout'),
    url(r'^', include('demo.website')),
    url(r'', include(frontend_urls)),
]
Пример #3
0
    def urls(self):
        index_view = generic.TemplateView.as_view(
            template_name='../templates/material/frontend/base_site.html')

        return frontend.ModuleURLResolver(
            '^', [url('^$', index_view, name="index")],
            module=self,
            app_name='it_purchase_app',
            namespace='it_purchase_app')

    def index_url(self):
        return '/'

    def installed(self):
        return True


modules.register(Purchase())

from material.frontend import urls as frontend_urls  # NOQA

urlpatterns = [
    re_path('i18n/', include('django.conf.urls.i18n')),
]

urlpatterns += i18n_patterns(
    url(r'', include(frontend_urls)),
    url(r'^login/$', auth.login, name='login'),
    url(r'^logout/$', auth.logout, name='logout'),
)