parent
85195734bb
commit
1cf52e3dd3
@ -47,6 +47,8 @@ python3 manage.py startapp ProyectoWebApp
|
|||||||
python3 manage.py runserver 192.168.0.4:8000'
|
python3 manage.py runserver 192.168.0.4:8000'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Creación de las Vistas
|
||||||
|
|
||||||
#### Menu:
|
#### Menu:
|
||||||
- Home
|
- Home
|
||||||
- Servicios
|
- Servicios
|
||||||
@ -75,6 +77,9 @@ def blog(request):
|
|||||||
def contacto(request):
|
def contacto(request):
|
||||||
return HttpResponse("Contacto")
|
return HttpResponse("Contacto")
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Registro de URLs
|
||||||
|
|
||||||
Project/**urls.py**
|
Project/**urls.py**
|
||||||
```
|
```
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
@ -96,7 +101,7 @@ urlpatterns = [
|
|||||||
*urls.py explica como organizar urls para manejar multiples Apps*
|
*urls.py explica como organizar urls para manejar multiples Apps*
|
||||||
|
|
||||||
|
|
||||||
### Organizar URLs
|
### Organizar URLs por App
|
||||||
|
|
||||||
**Including another URLconf**
|
**Including another URLconf**
|
||||||
- 1. **Import** the **include()** function: `from django.urls import include, path`
|
- 1. **Import** the **include()** function: `from django.urls import include, path`
|
||||||
|
Loading…
Reference in New Issue
Block a user