chartManD commited on
Commit
e02f943
·
1 Parent(s): 5ebccc7

Update Dockerfile

Browse files
Files changed (3) hide show
  1. Dockerfile +2 -7
  2. app/miSitio/urls.py +22 -0
  3. app/urls.py +0 -7
Dockerfile CHANGED
@@ -22,14 +22,9 @@ 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
- RUN ls miSitio -l
26
- RUN cat miSitio/urls.py
27
 
28
- #COPY . .
29
-
30
- RUN ls polls/
31
-
32
- #CMD python3 manage.py runserver 0:7860
33
 
34
  # Verificar si python esta instalado
35
  # RUN which python || which python3 || which py
 
22
  # Crear app de Poll o encuestas
23
  RUN python3 manage.py startapp polls
24
 
25
+ COPY app .
 
26
 
27
+ CMD python3 manage.py runserver 0:7860
 
 
 
 
28
 
29
  # Verificar si python esta instalado
30
  # RUN which python || which python3 || which py
app/miSitio/urls.py ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """miSitio URL Configuration
2
+
3
+ The `urlpatterns` list routes URLs to views. For more information please see:
4
+ https://docs.djangoproject.com/en/3.2/topics/http/urls/
5
+ Examples:
6
+ Function views
7
+ 1. Add an import: from my_app import views
8
+ 2. Add a URL to urlpatterns: path('', views.home, name='home')
9
+ Class-based views
10
+ 1. Add an import: from other_app.views import Home
11
+ 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home')
12
+ Including another URLconf
13
+ 1. Import the include() function: from django.urls import include, path
14
+ 2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
15
+ """
16
+ from django.contrib import admin
17
+ from django.urls import include, path
18
+
19
+ urlpatterns = [
20
+ path('polls/', include('polls.urls')),
21
+ path('admin/', admin.site.urls),
22
+ ]
app/urls.py DELETED
@@ -1,7 +0,0 @@
1
- from django.contrib import admin
2
- from django.urls import include, path
3
-
4
- urlpatterns = [
5
- path('polls/', include('polls.urls')),
6
- path('admin/', admin.site.urls),
7
- ]