Skip to content

Commit ea8a7e8

Browse files
committed
basic django-struct added
0 parents  commit ea8a7e8

14 files changed

Lines changed: 353 additions & 0 deletions

File tree

.gitignore

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
# Django #
2+
*.log
3+
*.pot
4+
*.pyc
5+
__pycache__
6+
db.sqlite3
7+
media
8+
migrations
9+
.vscode
10+
11+
# Backup files #
12+
*.bak
13+
14+
# If you are using PyCharm #
15+
.idea/**/workspace.xml
16+
.idea/**/tasks.xml
17+
.idea/dictionaries
18+
.idea/**/dataSources/
19+
.idea/**/dataSources.ids
20+
.idea/**/dataSources.xml
21+
.idea/**/dataSources.local.xml
22+
.idea/**/sqlDataSources.xml
23+
.idea/**/dynamic.xml
24+
.idea/**/uiDesigner.xml
25+
.idea/**/gradle.xml
26+
.idea/**/libraries
27+
*.iws /out/
28+
29+
# Python #
30+
__pycache__/
31+
*.py[cod]
32+
*$py.class
33+
34+
# C extensions
35+
*.so
36+
37+
# Distribution / packaging
38+
.Python
39+
build/
40+
develop-eggs/
41+
dist/
42+
downloads/
43+
eggs/
44+
.eggs/
45+
lib/
46+
lib64/
47+
parts/
48+
sdist/
49+
var/
50+
wheels/
51+
*.egg-info/
52+
.installed.cfg
53+
*.egg
54+
MANIFEST
55+
56+
# PyInstaller
57+
# Usually these files are written by a python script from a template
58+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
59+
*.manifest
60+
*.spec
61+
62+
# Installer logs
63+
pip-log.txt
64+
pip-delete-this-directory.txt
65+
66+
# Unit test / coverage reports
67+
htmlcov/
68+
.tox/
69+
.coverage
70+
.coverage.*
71+
.cache
72+
nosetests.xml
73+
coverage.xml
74+
*.cover
75+
.hypothesis/
76+
.pytest_cache/
77+
78+
# Translations
79+
*.mo
80+
*.pot
81+
82+
# Django stuff:
83+
*.log
84+
local_settings.py
85+
db.sqlite3
86+
87+
# Flask stuff:
88+
instance/
89+
.webassets-cache
90+
91+
# Scrapy stuff:
92+
.scrapy
93+
94+
# Sphinx documentation
95+
docs/_build/
96+
97+
# PyBuilder
98+
target/
99+
100+
# Jupyter Notebook
101+
.ipynb_checkpoints
102+
103+
# pyenv
104+
.python-version
105+
106+
# celery
107+
celerybeat-schedule.*
108+
109+
# SageMath parsed files
110+
*.sage.py
111+
112+
# Environments
113+
.env
114+
.venv
115+
env/
116+
venv/
117+
ENV/
118+
env.bak/
119+
venv.bak/
120+
121+
# Spyder project settings
122+
.spyderproject
123+
.spyproject
124+
125+
# Rope project settings
126+
.ropeproject
127+
128+
# mkdocs documentation
129+
/site
130+
131+
# mypy
132+
.mypy_cache/
133+
134+
# Sublime Text #
135+
*.tmlanguage.cache
136+
*.tmPreferences.cache
137+
*.stTheme.cache
138+
*.sublime-workspace
139+
*.sublime-project
140+
141+
# sftp configuration file
142+
sftp-config.json
143+
144+
# Package control specific files Package
145+
Control.last-run
146+
Control.ca-list
147+
Control.ca-bundle
148+
Control.system-ca-bundle
149+
GitHub.sublime-settings
150+
151+
# Visual Studio Code #
152+
.vscode/*
153+
!.vscode/settings.json
154+
!.vscode/tasks.json
155+
!.vscode/launch.json
156+
!.vscode/extensions.json
157+
.history

Bitbyte/__init__.py

Whitespace-only changes.

Bitbyte/settings.py

Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
"""
2+
Django settings for Bitbyte project.
3+
4+
Generated by 'django-admin startproject' using Django 2.2.10.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/2.2/topics/settings/
8+
9+
For the full list of settings and their values, see
10+
https://docs.djangoproject.com/en/2.2/ref/settings/
11+
"""
12+
13+
import os
14+
15+
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
16+
BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
17+
18+
19+
# Quick-start development settings - unsuitable for production
20+
# See https://docs.djangoproject.com/en/2.2/howto/deployment/checklist/
21+
22+
# SECURITY WARNING: keep the secret key used in production secret!
23+
SECRET_KEY = '(iq0-z3a*9gye=8x8041-zriu&rudagf7gk2@!afacunuch(z7'
24+
25+
# SECURITY WARNING: don't run with debug turned on in production!
26+
DEBUG = True
27+
28+
ALLOWED_HOSTS = []
29+
30+
31+
# Application definition
32+
33+
INSTALLED_APPS = [
34+
'home',
35+
'django.contrib.admin',
36+
'django.contrib.auth',
37+
'django.contrib.contenttypes',
38+
'django.contrib.sessions',
39+
'django.contrib.messages',
40+
'django.contrib.staticfiles',
41+
]
42+
43+
MIDDLEWARE = [
44+
'django.middleware.security.SecurityMiddleware',
45+
'django.contrib.sessions.middleware.SessionMiddleware',
46+
'django.middleware.common.CommonMiddleware',
47+
'django.middleware.csrf.CsrfViewMiddleware',
48+
'django.contrib.auth.middleware.AuthenticationMiddleware',
49+
'django.contrib.messages.middleware.MessageMiddleware',
50+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
51+
]
52+
53+
ROOT_URLCONF = 'Bitbyte.urls'
54+
55+
TEMPLATES = [
56+
{
57+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
58+
'DIRS': [],
59+
'APP_DIRS': True,
60+
'OPTIONS': {
61+
'context_processors': [
62+
'django.template.context_processors.debug',
63+
'django.template.context_processors.request',
64+
'django.contrib.auth.context_processors.auth',
65+
'django.contrib.messages.context_processors.messages',
66+
],
67+
},
68+
},
69+
]
70+
71+
WSGI_APPLICATION = 'Bitbyte.wsgi.application'
72+
73+
74+
# Database
75+
# https://docs.djangoproject.com/en/2.2/ref/settings/#databases
76+
77+
DATABASES = {
78+
'default': {
79+
'ENGINE': 'django.db.backends.sqlite3',
80+
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
81+
}
82+
}
83+
84+
85+
# Password validation
86+
# https://docs.djangoproject.com/en/2.2/ref/settings/#auth-password-validators
87+
88+
AUTH_PASSWORD_VALIDATORS = [
89+
{
90+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
91+
},
92+
{
93+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
94+
},
95+
{
96+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
97+
},
98+
{
99+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
100+
},
101+
]
102+
103+
104+
# Internationalization
105+
# https://docs.djangoproject.com/en/2.2/topics/i18n/
106+
107+
LANGUAGE_CODE = 'en-us'
108+
109+
TIME_ZONE = 'UTC'
110+
111+
USE_I18N = True
112+
113+
USE_L10N = True
114+
115+
USE_TZ = True
116+
117+
118+
# Static files (CSS, JavaScript, Images)
119+
# https://docs.djangoproject.com/en/2.2/howto/static-files/
120+
121+
STATIC_URL = '/static/'

Bitbyte/urls.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from django.conf.urls import url
2+
from django.contrib import admin
3+
from django.urls import include, path
4+
from home.views import *
5+
from django.conf import settings
6+
from django.conf.urls.static import static
7+
8+
urlpatterns = [
9+
path('admin/', admin.site.urls),
10+
path('home/', home, name='home'),
11+
]

Bitbyte/wsgi.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
WSGI config for Bitbyte project.
3+
4+
It exposes the WSGI callable as a module-level variable named ``application``.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/
8+
"""
9+
10+
import os
11+
12+
from django.core.wsgi import get_wsgi_application
13+
14+
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Bitbyte.settings')
15+
16+
application = get_wsgi_application()

home/__init__.py

Whitespace-only changes.

home/admin.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.contrib import admin
2+
3+
# Register your models here.

home/apps.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class HomeConfig(AppConfig):
5+
name = 'home'

home/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.

home/templates/home.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h1>HOME PAGE...</h1>

0 commit comments

Comments
 (0)