Create views.py
Browse files- Dockerfile +5 -1
- views/views.py +5 -0
Dockerfile
CHANGED
|
@@ -22,7 +22,11 @@ RUN sed -i 's/ALLOWED_HOSTS = \[\]/ALLOWED_HOSTS = \["*"\]/g' miSitio/settings.p
|
|
| 22 |
# Crear app de Poll o encuestas
|
| 23 |
RUN python3 manage.py startapp polls
|
| 24 |
|
| 25 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 26 |
|
| 27 |
# Verificar si python esta instalado
|
| 28 |
# RUN which python || which python3 || which py
|
|
|
|
| 22 |
# Crear app de Poll o encuestas
|
| 23 |
RUN python3 manage.py startapp polls
|
| 24 |
|
| 25 |
+
COPY views/ polls/
|
| 26 |
+
|
| 27 |
+
RUN ls polls/
|
| 28 |
+
|
| 29 |
+
#CMD python3 manage.py runserver 0:7860
|
| 30 |
|
| 31 |
# Verificar si python esta instalado
|
| 32 |
# RUN which python || which python3 || which py
|
views/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.")
|