Exemple #1
0
    def urls(self):
        ret = patterns('',
                (r'^$', self.auth_required(self.root_view), {}, '%s_root'%self.root_prefix),
                )

        for module in self.get_modules():
            ret.extend(patterns('', (r'^(?P<module>%s)/'%module.name, include(module.get_urls()))))

        return ret
Exemple #2
0
    def get_urls(self):
        ret = patterns('',
                (r'^$', self.site.login_req(self.home_view), {}, 'admin_%s_home'%self.name.lower()),
                )

        for module in self.get_modules():
            ret.extend(patterns('',
                (r'^(?P<module>%s)/'%module.name.lower(), include(module.get_urls())),
                ))

        return ret
Exemple #3
0
    def urls(self):
        ret = patterns('',
                (r'^$', self.login_req(self.home_view), {}, 'admin_home'),
                (r'^login/$', self.login_form, {}, 'admin_login'),
                (r'^logout/$', self.logout_view, {}, 'admin_logout'),
                (r'^change-password/$', self.change_password_form, {}, 'admin_change_password'),
                (r'^set/site/(?P<pk>[\w-]+)/$', self.set_site, {}, 'admin_set_site'),
                (r'^stats/$', self.login_req(self.stats_view), {}, 'admin_stats'),
                )

        for app in self.get_applications():
            ret.extend(patterns('',
                (r'^(?P<app>%s)/'%app.name.lower(), include(app.get_urls())),
                ))

        return ret