ladogton2010 commited on
Commit
478adf8
·
1 Parent(s): 41e8f3c
Files changed (4) hide show
  1. Dockerfile +1 -0
  2. app/mysite/urls.py +0 -0
  3. app/polls/urls.py +7 -0
  4. app/polls/views.py +5 -0
Dockerfile CHANGED
@@ -12,6 +12,7 @@ WORKDIR mysite
12
  RUN touch db.sqlite3
13
  RUN sed -i 's/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \["*"\]/g' mysite/settings.py;
14
  RUN python3 manage.py startapp polls
 
15
  CMD python3 manage.py runserver 0:7860
16
 
17
 
 
12
  RUN touch db.sqlite3
13
  RUN sed -i 's/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \["*"\]/g' mysite/settings.py;
14
  RUN python3 manage.py startapp polls
15
+ COPY app .
16
  CMD python3 manage.py runserver 0:7860
17
 
18
 
app/mysite/urls.py ADDED
File without changes
app/polls/urls.py ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ from django.urls import path
2
+
3
+ from . import views
4
+
5
+ urlpatterns = [
6
+ path('', views.index, name='index'),
7
+ ]
app/polls/views.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ from django.http import HttpResponse
2
+
3
+
4
+ def index(request):
5
+ return HttpResponse("Hello, world. You're at the polls index.")