Skip to content

Commit 70409a2

Browse files
committed
Initial checkin
1 parent 168c436 commit 70409a2

22 files changed

Lines changed: 882 additions & 0 deletions

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,12 @@ $RECYCLE.BIN/
4141
Network Trash Folder
4242
Temporary Items
4343
.apdisk
44+
45+
# Django stuff
46+
debug.log
47+
*.sqlite3
48+
/tutorial/__pycache__/*
49+
!/tutorial/migrations
50+
/tutorial/migrations/*
51+
!/tutorial/migrations/__init__.py
52+
/python_tutorial/__pycache__/*

LICENSE.TXT

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
python_tutorial, https://github.com/jasonjoh/python_tutorial
2+
3+
Copyright (c) Microsoft Corporation
4+
All rights reserved.
5+
6+
MIT License:
7+
8+
Permission is hereby granted, free of charge, to any person obtaining
9+
a copy of this software and associated documentation files (the
10+
""Software""), to deal in the Software without restriction, including
11+
without limitation the rights to use, copy, modify, merge, publish,
12+
distribute, sublicense, and/or sell copies of the Software, and to
13+
permit persons to whom the Software is furnished to do so, subject to
14+
the following conditions:
15+
16+
The above copyright notice and this permission notice shall be
17+
included in all copies or substantial portions of the Software.
18+
19+
THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND,
20+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
22+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
23+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
24+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
25+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 447 additions & 0 deletions
Large diffs are not rendered by default.

manage.py

Lines changed: 10 additions & 0 deletions
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", "python_tutorial.settings")
7+
8+
from django.core.management import execute_from_command_line
9+
10+
execute_from_command_line(sys.argv)

python_tutorial/__init__.py

Whitespace-only changes.

python_tutorial/settings.py

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
"""
2+
Django settings for python_tutorial project.
3+
4+
For more information on this file, see
5+
https://docs.djangoproject.com/en/1.7/topics/settings/
6+
7+
For the full list of settings and their values, see
8+
https://docs.djangoproject.com/en/1.7/ref/settings/
9+
"""
10+
11+
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
12+
import os
13+
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
14+
15+
16+
# Quick-start development settings - unsuitable for production
17+
# See https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/
18+
19+
# SECURITY WARNING: keep the secret key used in production secret!
20+
SECRET_KEY = 'v@*)_*6xx)#t@4np043msmvg%^ez2p46ke#2*dtsf_bnvgxjuj'
21+
22+
# SECURITY WARNING: don't run with debug turned on in production!
23+
DEBUG = True
24+
25+
TEMPLATE_DEBUG = True
26+
27+
ALLOWED_HOSTS = []
28+
29+
30+
# Application definition
31+
32+
INSTALLED_APPS = (
33+
'django.contrib.admin',
34+
'django.contrib.auth',
35+
'django.contrib.contenttypes',
36+
'django.contrib.sessions',
37+
'django.contrib.messages',
38+
'django.contrib.staticfiles',
39+
'tutorial',
40+
)
41+
42+
MIDDLEWARE_CLASSES = (
43+
'django.contrib.sessions.middleware.SessionMiddleware',
44+
'django.middleware.common.CommonMiddleware',
45+
'django.middleware.csrf.CsrfViewMiddleware',
46+
'django.contrib.auth.middleware.AuthenticationMiddleware',
47+
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',
48+
'django.contrib.messages.middleware.MessageMiddleware',
49+
'django.middleware.clickjacking.XFrameOptionsMiddleware',
50+
)
51+
52+
ROOT_URLCONF = 'python_tutorial.urls'
53+
54+
WSGI_APPLICATION = 'python_tutorial.wsgi.application'
55+
56+
57+
# Database
58+
# https://docs.djangoproject.com/en/1.7/ref/settings/#databases
59+
60+
DATABASES = {
61+
'default': {
62+
'ENGINE': 'django.db.backends.sqlite3',
63+
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
64+
}
65+
}
66+
67+
# Internationalization
68+
# https://docs.djangoproject.com/en/1.7/topics/i18n/
69+
70+
LANGUAGE_CODE = 'en-us'
71+
72+
TIME_ZONE = 'UTC'
73+
74+
USE_I18N = True
75+
76+
USE_L10N = True
77+
78+
USE_TZ = True
79+
80+
81+
# Static files (CSS, JavaScript, Images)
82+
# https://docs.djangoproject.com/en/1.7/howto/static-files/
83+
84+
STATIC_URL = '/static/'

python_tutorial/urls.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from django.conf.urls import patterns, include, url
2+
from django.contrib import admin
3+
4+
urlpatterns = patterns('',
5+
# Invoke the home view in the tutorial app by default
6+
url(r'^$', 'tutorial.views.home', name='home'),
7+
# Defer any URLS to the /tutorial directory to the tutorial app
8+
url(r'^tutorial/', include('tutorial.urls', namespace='tutorial')),
9+
url(r'^admin/', include(admin.site.urls)),
10+
)

python_tutorial/wsgi.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""
2+
WSGI config for python_tutorial 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.7/howto/deployment/wsgi/
8+
"""
9+
10+
import os
11+
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "python_tutorial.settings")
12+
13+
from django.core.wsgi import get_wsgi_application
14+
application = get_wsgi_application()

readme-images/django_welcome.PNG

29.6 KB
Loading

readme-images/inbox-listing.PNG

32.4 KB
Loading

0 commit comments

Comments
 (0)