Spaces:
Runtime error
Runtime error
Beracles
commited on
Commit
·
51a7cfb
1
Parent(s):
804c739
restruct
Browse files- Dockerfile +1 -1
- pgsns/helloworld/urls.py +24 -0
- pgsns/pgsns/settings.py +6 -6
- pgsns/pgsns/urls.py +3 -3
Dockerfile
CHANGED
|
@@ -26,4 +26,4 @@ COPY . .
|
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
# start server
|
| 29 |
-
CMD python pgsns/manage.py
|
|
|
|
| 26 |
EXPOSE 7860
|
| 27 |
|
| 28 |
# start server
|
| 29 |
+
CMD python pgsns/manage.py runserver 0.0.0.0:7860
|
pgsns/helloworld/urls.py
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
"""
|
| 2 |
+
URL configuration for pgsns project.
|
| 3 |
+
|
| 4 |
+
The `urlpatterns` list routes URLs to views. For more information please see:
|
| 5 |
+
https://docs.djangoproject.com/en/5.0/topics/http/urls/
|
| 6 |
+
Examples:
|
| 7 |
+
Function views
|
| 8 |
+
1. Add an import: from my_app import views
|
| 9 |
+
2. Add a URL to urlpatterns: path('', views.home, name='home')
|
| 10 |
+
Class-based views
|
| 11 |
+
1. Add an import: from other_app.views import Home
|
| 12 |
+
2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
|
| 13 |
+
Including another URLconf
|
| 14 |
+
1. Import the include() function: from django.urls import include, path
|
| 15 |
+
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
| 16 |
+
"""
|
| 17 |
+
from django.urls import path
|
| 18 |
+
from . import views
|
| 19 |
+
|
| 20 |
+
|
| 21 |
+
app_name = 'helloworld'
|
| 22 |
+
urlpatterns = [
|
| 23 |
+
path('', views.root),
|
| 24 |
+
]
|
pgsns/pgsns/settings.py
CHANGED
|
@@ -75,12 +75,12 @@ WSGI_APPLICATION = 'pgsns.wsgi.application'
|
|
| 75 |
# Database
|
| 76 |
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
|
| 77 |
|
| 78 |
-
DATABASES = {
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
}
|
| 84 |
|
| 85 |
|
| 86 |
# Password validation
|
|
|
|
| 75 |
# Database
|
| 76 |
# https://docs.djangoproject.com/en/5.0/ref/settings/#databases
|
| 77 |
|
| 78 |
+
# DATABASES = {
|
| 79 |
+
# 'default': {
|
| 80 |
+
# 'ENGINE': 'django.db.backends.sqlite3',
|
| 81 |
+
# 'NAME': BASE_DIR / 'db.sqlite3',
|
| 82 |
+
# }
|
| 83 |
+
# }
|
| 84 |
|
| 85 |
|
| 86 |
# Password validation
|
pgsns/pgsns/urls.py
CHANGED
|
@@ -15,11 +15,11 @@ Including another URLconf
|
|
| 15 |
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
| 16 |
"""
|
| 17 |
from django.contrib import admin
|
| 18 |
-
from django.urls import path
|
| 19 |
-
|
| 20 |
|
| 21 |
admin.autodiscover()
|
| 22 |
urlpatterns = [
|
| 23 |
path('admin/', admin.site.urls),
|
| 24 |
-
path('',
|
| 25 |
]
|
|
|
|
| 15 |
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
| 16 |
"""
|
| 17 |
from django.contrib import admin
|
| 18 |
+
from django.urls import path, include
|
| 19 |
+
|
| 20 |
|
| 21 |
admin.autodiscover()
|
| 22 |
urlpatterns = [
|
| 23 |
path('admin/', admin.site.urls),
|
| 24 |
+
path('',include("helloworld.urls",namespace="helloworld")),
|
| 25 |
]
|