made production changes and added post user foreign key relation
This commit is contained in:
@ -15,12 +15,15 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path,include
|
||||
from django.urls import path, include, re_path
|
||||
from . import views
|
||||
from django.conf.urls.static import static
|
||||
from django.conf import settings
|
||||
from django.views.static import serve
|
||||
|
||||
urlpatterns = [
|
||||
re_path(r'^media/(?P<path>.*)$', serve, {'document_root': settings.MEDIA_ROOT}),
|
||||
re_path(r'^static/(?P<path>.*)$', serve, {'document_root': settings.STATIC_ROOT}),
|
||||
path('admin/', admin.site.urls),
|
||||
path('', views.hompage),
|
||||
path('about/',views.about),
|
||||
@ -28,4 +31,5 @@ urlpatterns = [
|
||||
path('users/', include('users.urls'))
|
||||
]
|
||||
|
||||
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||
|
||||
#urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) replaced by -> regular expressions
|
||||
Reference in New Issue
Block a user