Criando apps com manage.py startapp do Django
This commit is contained in:
0
aula207_ola_django/blog/__init__.py
Normal file
0
aula207_ola_django/blog/__init__.py
Normal file
3
aula207_ola_django/blog/admin.py
Normal file
3
aula207_ola_django/blog/admin.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
||||||
6
aula207_ola_django/blog/apps.py
Normal file
6
aula207_ola_django/blog/apps.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class BlogConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'blog'
|
||||||
0
aula207_ola_django/blog/migrations/__init__.py
Normal file
0
aula207_ola_django/blog/migrations/__init__.py
Normal file
3
aula207_ola_django/blog/models.py
Normal file
3
aula207_ola_django/blog/models.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
# Create your models here.
|
||||||
3
aula207_ola_django/blog/tests.py
Normal file
3
aula207_ola_django/blog/tests.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
||||||
3
aula207_ola_django/blog/views.py
Normal file
3
aula207_ola_django/blog/views.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
||||||
0
aula207_ola_django/home/__init__.py
Normal file
0
aula207_ola_django/home/__init__.py
Normal file
3
aula207_ola_django/home/admin.py
Normal file
3
aula207_ola_django/home/admin.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.contrib import admin
|
||||||
|
|
||||||
|
# Register your models here.
|
||||||
6
aula207_ola_django/home/apps.py
Normal file
6
aula207_ola_django/home/apps.py
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
from django.apps import AppConfig
|
||||||
|
|
||||||
|
|
||||||
|
class HomeConfig(AppConfig):
|
||||||
|
default_auto_field = 'django.db.models.BigAutoField'
|
||||||
|
name = 'home'
|
||||||
0
aula207_ola_django/home/migrations/__init__.py
Normal file
0
aula207_ola_django/home/migrations/__init__.py
Normal file
3
aula207_ola_django/home/models.py
Normal file
3
aula207_ola_django/home/models.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.db import models
|
||||||
|
|
||||||
|
# Create your models here.
|
||||||
3
aula207_ola_django/home/tests.py
Normal file
3
aula207_ola_django/home/tests.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.test import TestCase
|
||||||
|
|
||||||
|
# Create your tests here.
|
||||||
3
aula207_ola_django/home/views.py
Normal file
3
aula207_ola_django/home/views.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
from django.shortcuts import render
|
||||||
|
|
||||||
|
# Create your views here.
|
||||||
@@ -18,9 +18,6 @@ from django.contrib import admin
|
|||||||
from django.http import HttpResponse
|
from django.http import HttpResponse
|
||||||
from django.urls import path
|
from django.urls import path
|
||||||
|
|
||||||
# HTTP Request <-> HTTP Response
|
|
||||||
# MVT (MVC)
|
|
||||||
|
|
||||||
|
|
||||||
def home(request):
|
def home(request):
|
||||||
print('home')
|
print('home')
|
||||||
|
|||||||
Reference in New Issue
Block a user