Hi, I found the problem, I had a problem with the local database. Now it works.
Thanks, Uri. *Uri Even-Chen* [image: photo] Phone: +972-54-3995700 Email: u...@speedy.net Website: http://www.speedysoftware.com/uri/en/ <http://www.facebook.com/urievenchen> <http://plus.google.com/+urievenchen> <http://www.linkedin.com/in/urievenchen> <http://github.com/urievenchen> <http://twitter.com/urievenchen> On Wed, Dec 14, 2016 at 4:31 PM, Uri Even-Chen <u...@speedy.net> wrote: > Dear Django Users, > > I'm trying to move the main view into a new main app (folder) inside > speedy/mail. Currently the file urls.py is like this: > > from django.conf import settings > from django.conf.urls import url, include > from . import views > from django.conf.urls.static import static > urlpatterns = [ > url(r'^feedback/', include('speedy.net.feedback.urls', namespace='feedback > ')), > url(r'^', views.MainPageView.as_view(), name='main_page_view'), > ] > if settings.DEBUG: > urlpatterns = static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) > + urlpatterns > try: > import debug_toolbar > urlpatterns += [ > url(r'^__debug__/', include(debug_toolbar.urls)), > ] > except ImportError: > pass > > Now I want to move the main page url & view to speedy/mail/main/urls.py > and views.py. Now the urls.py is like this: > > from django.conf import settings > from django.conf.urls import url, include > from django.conf.urls.static import static > > urlpatterns = [ > url(r'^feedback/', include('speedy.net.feedback.urls', > namespace='feedback')), > url(r'', include('speedy.mail.main.urls', namespace='main')), > ] > > if settings.DEBUG: > urlpatterns = static(settings.MEDIA_URL, > document_root=settings.MEDIA_ROOT) + urlpatterns > > try: > import debug_toolbar > urlpatterns += [ > url(r'^__debug__/', include(debug_toolbar.urls)), > ] > except ImportError: > pass > > > And speedy/mail/main/urls.py is like this: > > > from django.conf.urls import url > > from . import views > > urlpatterns = [ > url(r'', views.MainPageView.as_view(), name='main_page_view'), > ] > > > But the problem is it doesn't work, I get this error message: > > DoesNotExist at / > > Site matching query does not exist. > > I also tried with r'^' instead of r'' but it still doesn't work. What did > I do wrong? > > Thanks, > Uri. > > > *Uri Even-Chen* > [image: photo] Phone: +972-54-3995700 > Email: u...@speedy.net > Website: http://www.speedysoftware.com/uri/en/ > <http://www.facebook.com/urievenchen> > <http://plus.google.com/+urievenchen> > <http://www.linkedin.com/in/urievenchen> <http://github.com/urievenchen> > <http://twitter.com/urievenchen> > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at https://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAMQ2MsFwDWd%3DgeOLC%2Bm8hjgvM%3Dfoq39uoOrBZ%3DGmPiJmF5ouow%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.