I'm trying to deploy my code on digitalocean
vps
server and I checked everything million times but I still have the same problem.
When I try to access admin page it works but I cannot access any other page. I am not running django code local it's running on a public ip.
Can anyone help me with it ?
Here is my main urls.py file:
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('api-auth/', include('rest_framework.urls'), name='rest_framework'),
path('posts/', include('posts.urls')),
path('dictionary/', include('dictionary.urls')),
]
Here is my post/urls.py file:
from django.urls import path
from . import views
app_name = "posts"
urlpatterns = [
path('', views.post_list,name = "list"),
path('create/', views.post_create,name="create"),
path('<slug:slug>/', views.post_detail,name="detail"),
path('<slug:slug>/edit/', views.post_update,name="update"),
path('<slug:slug>/delete/', views.post_delete,name="delete"),
]
DEBUG=True
) ? Does it work when you run in in your local machine? – Ralf Sep 14 '18 at 13:51urls.py
for theposts
app? Please add it to your question. – Ralf Sep 14 '18 at 14:01