add apps, basic routing, req.txt
This commit is contained in:
parent
5564ffb207
commit
3d69b29067
0
api/api/analytics/__init__.py
Normal file
0
api/api/analytics/__init__.py
Normal file
BIN
api/api/analytics/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
api/api/analytics/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
api/api/analytics/__pycache__/admin.cpython-310.pyc
Normal file
BIN
api/api/analytics/__pycache__/admin.cpython-310.pyc
Normal file
Binary file not shown.
BIN
api/api/analytics/__pycache__/apps.cpython-310.pyc
Normal file
BIN
api/api/analytics/__pycache__/apps.cpython-310.pyc
Normal file
Binary file not shown.
BIN
api/api/analytics/__pycache__/models.cpython-310.pyc
Normal file
BIN
api/api/analytics/__pycache__/models.cpython-310.pyc
Normal file
Binary file not shown.
3
api/api/analytics/admin.py
Normal file
3
api/api/analytics/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
api/api/analytics/apps.py
Normal file
6
api/api/analytics/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class AnalyticsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'analytics'
|
0
api/api/analytics/migrations/__init__.py
Normal file
0
api/api/analytics/migrations/__init__.py
Normal file
3
api/api/analytics/models.py
Normal file
3
api/api/analytics/models.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
3
api/api/analytics/tests.py
Normal file
3
api/api/analytics/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
3
api/api/analytics/views.py
Normal file
3
api/api/analytics/views.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.shortcuts import render
|
||||
|
||||
# Create your views here.
|
BIN
api/api/api/__pycache__/__init__.cpython-310.pyc
Normal file
BIN
api/api/api/__pycache__/__init__.cpython-310.pyc
Normal file
Binary file not shown.
BIN
api/api/api/__pycache__/settings.cpython-310.pyc
Normal file
BIN
api/api/api/__pycache__/settings.cpython-310.pyc
Normal file
Binary file not shown.
@ -31,6 +31,8 @@ ALLOWED_HOSTS = []
|
||||
# Application definition
|
||||
|
||||
INSTALLED_APPS = [
|
||||
'rest_framework',
|
||||
'analytics.apps.AnalyticsConfig',
|
||||
'django.contrib.admin',
|
||||
'django.contrib.auth',
|
||||
'django.contrib.contenttypes',
|
||||
|
@ -1,3 +1,4 @@
|
||||
|
||||
"""api URL Configuration
|
||||
|
||||
The `urlpatterns` list routes URLs to views. For more information please see:
|
||||
@ -14,8 +15,9 @@ Including another URLconf
|
||||
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.contrib import admin
|
||||
from django.urls import path
|
||||
from django.urls import include, path
|
||||
|
||||
urlpatterns = [
|
||||
path('blogs/', include('blogs.urls')),
|
||||
path('admin/', admin.site.urls),
|
||||
]
|
||||
|
0
api/api/blogs/__init__.py
Normal file
0
api/api/blogs/__init__.py
Normal file
3
api/api/blogs/admin.py
Normal file
3
api/api/blogs/admin.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.contrib import admin
|
||||
|
||||
# Register your models here.
|
6
api/api/blogs/apps.py
Normal file
6
api/api/blogs/apps.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.apps import AppConfig
|
||||
|
||||
|
||||
class BlogsConfig(AppConfig):
|
||||
default_auto_field = 'django.db.models.BigAutoField'
|
||||
name = 'blogs'
|
0
api/api/blogs/migrations/__init__.py
Normal file
0
api/api/blogs/migrations/__init__.py
Normal file
4
api/api/blogs/models.py
Normal file
4
api/api/blogs/models.py
Normal file
@ -0,0 +1,4 @@
|
||||
from django.db import models
|
||||
|
||||
# Create your models here.
|
||||
|
3
api/api/blogs/tests.py
Normal file
3
api/api/blogs/tests.py
Normal file
@ -0,0 +1,3 @@
|
||||
from django.test import TestCase
|
||||
|
||||
# Create your tests here.
|
6
api/api/blogs/urls.py
Normal file
6
api/api/blogs/urls.py
Normal file
@ -0,0 +1,6 @@
|
||||
from django.urls import path
|
||||
from . import views
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.index, name='index')
|
||||
]
|
7
api/api/blogs/views.py
Normal file
7
api/api/blogs/views.py
Normal file
@ -0,0 +1,7 @@
|
||||
from django.shortcuts import render
|
||||
from django.http import HttpResponse
|
||||
|
||||
def index(request):
|
||||
return HttpResponse("You're at the Blogs index")
|
||||
|
||||
# Create your views here.
|
5
api/requirements.txt
Normal file
5
api/requirements.txt
Normal file
@ -0,0 +1,5 @@
|
||||
asgiref==3.4.1
|
||||
Django==4.0
|
||||
djangorestframework==3.13.1
|
||||
pytz==2021.3
|
||||
sqlparse==0.4.2
|
Loading…
Reference in New Issue
Block a user