I'm having an issue with my site, in making and incorporating a second app. The first works perfectly.
You can see the demo site here: http://216.158.236.51
but when I try to visit the new url pages created http://216.158.236.51/signup for example, it just gives me a HTTP 404
response.
It gives me a 404
for both the new app pages and for other new pages created within the first app.
I'm pretty sure I did everything correctly from the django side. Not sure if I have to reload the nginx or gunicorn, or what backend problems there are... any advice would be great.
My url patterns look like this:
from django.conf.urls import url, include
from django.contrib import admin
from blackcrowtours import views
from accounts import views
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^accounts/', include('accounts.urls'), name='accounts'),
url(r'^signup/', accounts.views.signup, name='signup'),
url(r'^$', views.home, name='home'),
url(r'^yourtrips/', views.yourtrips, name='yourtrips'),
url(r'^about/', views.about, name='about'),
url(r'^whyus/', views.whyus, name='whyus'),
url(r'^accommodations/', views.accommodations, name='accommodations'),
url(r'^yourguides/', views.yourguides, name='yourguides'),
url(r'^westerneurotrip/', views.westerneurotrip, name='westerneurotrip'),
url(r'^contact/', views.contact, name='contact'),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
account app views
from django.shortcuts import render
from django.contrib.auth.models import User
from django.contrib.auth import authenticate, login
def signup(request):
return render(request, 'accounts/signup.html')
account app urls
from django.conf.urls import url
from . import views
app_name = 'accounts'
urlpatterns = [
url(r'^signup/', views.signup, name='signup'),
url(r'^login/', views.loginview, name='login'),
]
blackcrowtours app views
from django.shortcuts import render
def home(request):
return render (request, 'blackcrowtours/home.html',)
def yourtrips(request):
return render (request, 'blackcrowtours/yourtrips.html',)
def about(request):
return render (request, 'blackcrowtours/about.html',)
def whyus(request):
return render (request, 'blackcrowtours/whyus.html',)
def accommodations(request):
return render (request, 'blackcrowtours/accommodations.html',)
def yourguides(request):
return render (request, 'blackcrowtours/yourguides.html',)
def westerneurotrip(request):
return render (request, 'blackcrowtours/westerneurotrip.html',)
def contact(request):
return render (request, 'blackcrowtours/contact.html',)
All of those views work EXCEPT for the contact url which I just added after the fact.