def test_all_app_containing_moderator_module_should_be_registered(self): auto_discover() if django_17(): self.assertTrue("tests.moderator" in sys.modules.keys()) else: from moderation import moderation self.assertTrue(Book in moderation._registered_models)
from django.conf.urls import patterns, include, url from emailusernames.forms import EmailAuthenticationForm from repsf.accounts.forms import ISFAuthForm from accounts import views import settings from moderation.helpers import auto_discover # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() auto_discover() urlpatterns = patterns( "", # Examples: # Uncomment the admin/doc line below to enable admin documentation: url(r"^admin/doc/", include("django.contrib.admindocs.urls")), # Uncomment the next line to enable the admin: url(r"^admin/", include(admin.site.urls)), url(r"^$", "repsf.map.views.home", name="home"), url( r"^accounts/login/?$", "django.contrib.auth.views.login", {"template_name": "login.html", "authentication_form": ISFAuthForm}, name="login", ), url(r"^accounts/create/?$", "repsf.accounts.views.create", name="register"), url(r"^accounts/profile/?$", "repsf.accounts.views.read", name="show_user"), url(r"^accounts/logout/?$", "repsf.accounts.views.end_session", name="logout"), url(r"^locations/edit/(?P<id>\d+)/?$", "repsf.map.views.update", name="update_location"),
from django.conf.urls.defaults import patterns, include, handler500, url from django.conf import settings from django.contrib import admin from moderation.helpers import auto_discover admin.autodiscover() auto_discover() handler500 # Pyflakes urlpatterns = patterns( '', (r'^admin/', include(admin.site.urls)), (r'^accounts/login/$', 'django.contrib.auth.views.login'), ) if settings.DEBUG: urlpatterns += patterns( '', (r'^media/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.MEDIA_ROOT }), ) urlpatterns += patterns( '', (r'^static/(?P<path>.*)$', 'django.views.static.serve', { 'document_root': settings.STATIC_ROOT }), )
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from moderation.helpers import auto_discover from main.views import * admin.autodiscover() auto_discover() # from moderation app -alway keep below admin.autodiscover() urlpatterns = patterns( '', url(r'^grappelli/', include('grappelli.urls')), #for admin urls url('', include('social.apps.django_app.urls', namespace='social')), #for social auth urls url(r'^admin/', include(admin.site.urls)), #additional admin urls url(r'^search$', 'main.views.search', name="search"), url(r'^$', 'main.views.home', name='home'), #home url url(r'^logout/', 'main.views.logout_view', name='logout'), #Sample Templates url(r'', include('main.urls')), #Teach and Learn ) #Access Static Files if in development if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL,
def test_all_app_containing_moderator_module_should_be_registered(self): auto_discover() self.assertTrue("tests.moderator" in sys.modules.keys())
from django.conf import settings from django.conf.urls import patterns, include, url from django.conf.urls.static import static from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin from moderation.helpers import auto_discover from main.views import * admin.autodiscover() auto_discover()# from moderation app -alway keep below admin.autodiscover() urlpatterns = patterns('', url(r'^grappelli/', include('grappelli.urls')), #for admin urls url('', include('social.apps.django_app.urls', namespace='social')), #for social auth urls url(r'^admin/', include(admin.site.urls)), #additional admin urls url(r'^search$','main.views.search',name="search"), url(r'^$', 'main.views.home', name='home'),#home url url(r'^logout/', 'main.views.logout_view', name='logout'),#Sample Templates url(r'',include('main.urls')),#Teach and Learn ) #Access Static Files if in development if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
def test_all_app_containing_moderator_module_should_be_registered(self): auto_discover() from moderation import moderation self.assertTrue(Book in moderation._registered_models)