Skip to content

Commit 4d123f1

Browse files
committed
Init Proj Layout
0 parents  commit 4d123f1

17 files changed

+266
-0
lines changed

.gitignore

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
#### joe made this: http://goel.io/joe
2+
3+
#####=== Python ===#####
4+
5+
# Byte-compiled / optimized / DLL files
6+
__pycache__/
7+
*.py[cod]
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
env/
15+
build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
*.egg-info/
26+
.installed.cfg
27+
*.egg
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.coverage
43+
.cache
44+
nosetests.xml
45+
coverage.xml
46+
47+
# Translations
48+
*.mo
49+
*.pot
50+
51+
# Django stuff:
52+
*.log
53+
54+
# Sphinx documentation
55+
docs/_build/
56+
57+
# PyBuilder
58+
target/
59+
60+
db.sqlite3

apps/commands/__init__.py

Whitespace-only changes.

apps/commands/admin.py

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

apps/commands/apps.py

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from django.apps import AppConfig
2+
3+
4+
class CommandsConfig(AppConfig):
5+
name = 'apps.commands'

apps/commands/migrations/__init__.py

Whitespace-only changes.

apps/commands/models.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.db import models
2+
3+
# Create your models here.

apps/commands/tests.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.test import TestCase
2+
3+
# Create your tests here.

apps/commands/views.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.shortcuts import render
2+
3+
# Create your views here.

config/__init__.py

Whitespace-only changes.

config/settings/__init__.py

Whitespace-only changes.

config/settings/base.py

+131
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
"""
2+
Django settings for ohmycommand project.
3+
4+
Generated by 'django-admin startproject' using Django 1.9.4.
5+
6+
For more information on this file, see
7+
https://docs.djangoproject.com/en/1.9/topics/settings/
8+
9+
For the full list of settings and their values, see
10+
https://docs.djangoproject.com/en/1.9/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.dirname(os.path.abspath(__file__))))
17+
18+
19+
# Quick-start development settings - unsuitable for production
20+
# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/
21+
22+
# SECURITY WARNING: keep the secret key used in production secret!
23+
SECRET_KEY = 'k%f#%)o6uj6#$mf!&d42h=a)doc^wd9=c8476xp=frsb6k^d^z'
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+
'django.contrib.admin',
35+
'django.contrib.auth',
36+
'django.contrib.contenttypes',
37+
'django.contrib.sessions',
38+
'django.contrib.messages',
39+
'django.contrib.staticfiles',
40+
]
41+
42+
THIRD_PARTY = [
43+
44+
]
45+
46+
PROJ_APPS = [
47+
'apps.commands.apps.CommandsConfig',
48+
]
49+
50+
INSTALLED_APPS += THIRD_PARTY + PROJ_APPS
51+
52+
MIDDLEWARE_CLASSES = [
53+
'django.middleware.security.SecurityMiddleware',
54+
'django.contrib.sessions.middleware.SessionMiddleware',
55+
'django.middleware.common.CommonMiddleware',
56+
'django.middleware.csrf.CsrfViewMiddleware',
57+
'django.contrib.auth.middleware.AuthenticationMiddleware',
58+
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
59+
'django.contrib.messages.middleware.MessageMiddleware',
60+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
61+
]
62+
63+
ROOT_URLCONF = 'config.urls'
64+
65+
TEMPLATES = [
66+
{
67+
'BACKEND': 'django.template.backends.django.DjangoTemplates',
68+
'DIRS': [],
69+
'APP_DIRS': True,
70+
'OPTIONS': {
71+
'context_processors': [
72+
'django.template.context_processors.debug',
73+
'django.template.context_processors.request',
74+
'django.contrib.auth.context_processors.auth',
75+
'django.contrib.messages.context_processors.messages',
76+
],
77+
},
78+
},
79+
]
80+
81+
WSGI_APPLICATION = 'config.wsgi.application'
82+
83+
84+
# Database
85+
# https://docs.djangoproject.com/en/1.9/ref/settings/#databases
86+
87+
DATABASES = {
88+
'default': {
89+
'ENGINE': 'django.db.backends.sqlite3',
90+
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
91+
}
92+
}
93+
94+
95+
# Password validation
96+
# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators
97+
98+
AUTH_PASSWORD_VALIDATORS = [
99+
{
100+
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
101+
},
102+
{
103+
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
104+
},
105+
{
106+
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
107+
},
108+
{
109+
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
110+
},
111+
]
112+
113+
114+
# Internationalization
115+
# https://docs.djangoproject.com/en/1.9/topics/i18n/
116+
117+
LANGUAGE_CODE = 'en-us'
118+
119+
TIME_ZONE = 'UTC'
120+
121+
USE_I18N = True
122+
123+
USE_L10N = True
124+
125+
USE_TZ = True
126+
127+
128+
# Static files (CSS, JavaScript, Images)
129+
# https://docs.djangoproject.com/en/1.9/howto/static-files/
130+
131+
STATIC_URL = '/static/'

config/settings/dev.py

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .base import *

config/urls.py

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"""ohmycommand URL Configuration
2+
3+
The `urlpatterns` list routes URLs to views. For more information please see:
4+
https://docs.djangoproject.com/en/1.9/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: url(r'^$', 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: url(r'^$', Home.as_view(), name='home')
12+
Including another URLconf
13+
1. Import the include() function: from django.conf.urls import url, include
14+
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
15+
"""
16+
from django.conf.urls import url
17+
from django.contrib import admin
18+
19+
urlpatterns = [
20+
url(r'^admin/', admin.site.urls),
21+
]

config/wsgi.py

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
"""
2+
WSGI config for ohmycommand 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/1.9/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", "config.settings.dev")
15+
16+
application = get_wsgi_application()

manage.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/usr/bin/env python
2+
import os
3+
import sys
4+
5+
if __name__ == "__main__":
6+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.dev")
7+
8+
from django.core.management import execute_from_command_line
9+
10+
execute_from_command_line(sys.argv)

requirements/base.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Created by "reqpy"
2+
#https://github.com/gopar/reqpy
3+
Django==1.9.4
4+
djangorestframework==3.3.3
5+
Markdown==2.6.6

requirements/dev.txt

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Created by "reqpy"
2+
#https://github.com/gopar/reqpy
3+
-r base.txt
4+
django-extensions==1.6.1
5+
six==1.10.0

0 commit comments

Comments
 (0)