From 9b1ccc8df0b704e1742f204a45c829ea32f5959f Mon Sep 17 00:00:00 2001 From: okalintu Date: Wed, 18 May 2016 19:27:22 +0300 Subject: [PATCH] initial commit --- .gitignore | 4 ++ manage.py | 10 +++ readme.md | 8 +++ sikweb/__init__.py | 0 sikweb/readme.md | 0 sikweb/settings-sample.py | 121 ++++++++++++++++++++++++++++++++++ sikweb/urls.py | 22 +++++++ sikweb/wsgi.py | 16 +++++ webapp/__init__.py | 0 webapp/admin.py | 3 + webapp/apps.py | 5 ++ webapp/migrations/__init__.py | 0 webapp/models.py | 3 + webapp/reame.md | 0 webapp/static/css/readme.md | 0 webapp/static/html/readme.md | 0 webapp/static/js/readme.md | 0 webapp/static/readme.md | 0 webapp/tests.py | 3 + webapp/views.py | 3 + 20 files changed, 198 insertions(+) create mode 100644 .gitignore create mode 100755 manage.py create mode 100644 readme.md create mode 100644 sikweb/__init__.py create mode 100644 sikweb/readme.md create mode 100644 sikweb/settings-sample.py create mode 100644 sikweb/urls.py create mode 100644 sikweb/wsgi.py create mode 100644 webapp/__init__.py create mode 100644 webapp/admin.py create mode 100644 webapp/apps.py create mode 100644 webapp/migrations/__init__.py create mode 100644 webapp/models.py create mode 100644 webapp/reame.md create mode 100644 webapp/static/css/readme.md create mode 100644 webapp/static/html/readme.md create mode 100644 webapp/static/js/readme.md create mode 100644 webapp/static/readme.md create mode 100644 webapp/tests.py create mode 100644 webapp/views.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5f2b342 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +*.swp +sikweb/settings.py +*~ +*.pyc diff --git a/manage.py b/manage.py new file mode 100755 index 0000000..2cbbf39 --- /dev/null +++ b/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sikweb.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..47f9b0b --- /dev/null +++ b/readme.md @@ -0,0 +1,8 @@ +virtualenv -p python3 virtualenv.sikweb + + + + +Unsorted + +pip install --upgrade pip \ No newline at end of file diff --git a/sikweb/__init__.py b/sikweb/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/sikweb/readme.md b/sikweb/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/sikweb/settings-sample.py b/sikweb/settings-sample.py new file mode 100644 index 0000000..46ca739 --- /dev/null +++ b/sikweb/settings-sample.py @@ -0,0 +1,121 @@ +""" +Django settings for sikweb project. + +Generated by 'django-admin startproject' using Django 1.9. + +For more information on this file, see +https://docs.djangoproject.com/en/1.9/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.9/ref/settings/ +""" + +import os + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = '7p$85^4ibb^p4-=vs44b7!y0e-zemugze18@a#30&71=a8)dp(' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = [ + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', +] + +MIDDLEWARE_CLASSES = [ + 'django.middleware.security.SecurityMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', +] + +ROOT_URLCONF = 'sikweb.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'sikweb.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.9/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Password validation +# https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators + +AUTH_PASSWORD_VALIDATORS = [ + { + 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', + }, + { + 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', + }, +] + + +# Internationalization +# https://docs.djangoproject.com/en/1.9/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.9/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/sikweb/urls.py b/sikweb/urls.py new file mode 100644 index 0000000..cbd031e --- /dev/null +++ b/sikweb/urls.py @@ -0,0 +1,22 @@ +"""sikweb URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.9/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Add an import: from blog import urls as blog_urls + 2. Import the include() function: from django.conf.urls import url, include + 3. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) +""" +from django.conf.urls import url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', admin.site.urls), +] diff --git a/sikweb/wsgi.py b/sikweb/wsgi.py new file mode 100644 index 0000000..3ca2cbc --- /dev/null +++ b/sikweb/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for sikweb project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "sikweb.settings") + +application = get_wsgi_application() diff --git a/webapp/__init__.py b/webapp/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/webapp/admin.py b/webapp/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/webapp/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/webapp/apps.py b/webapp/apps.py new file mode 100644 index 0000000..fcacfff --- /dev/null +++ b/webapp/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class WebappConfig(AppConfig): + name = 'webapp' diff --git a/webapp/migrations/__init__.py b/webapp/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/webapp/models.py b/webapp/models.py new file mode 100644 index 0000000..71a8362 --- /dev/null +++ b/webapp/models.py @@ -0,0 +1,3 @@ +from django.db import models + +# Create your models here. diff --git a/webapp/reame.md b/webapp/reame.md new file mode 100644 index 0000000..e69de29 diff --git a/webapp/static/css/readme.md b/webapp/static/css/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/webapp/static/html/readme.md b/webapp/static/html/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/webapp/static/js/readme.md b/webapp/static/js/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/webapp/static/readme.md b/webapp/static/readme.md new file mode 100644 index 0000000..e69de29 diff --git a/webapp/tests.py b/webapp/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/webapp/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/webapp/views.py b/webapp/views.py new file mode 100644 index 0000000..91ea44a --- /dev/null +++ b/webapp/views.py @@ -0,0 +1,3 @@ +from django.shortcuts import render + +# Create your views here.