From 05f8cc4122caa9cc40e1df6e412b0dcfab7c6d40 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Marek=20St=C4=99pniowski?= Date: Mon, 3 Aug 2009 16:34:37 +0200 Subject: [PATCH] Dodanie katalogu z projektem. --- project/__init__.py | 0 project/dev.sqlite | Bin 0 -> 29696 bytes project/manage.py | 18 ++++++++ project/settings.py | 110 ++++++++++++++++++++++++++++++++++++++++++++ project/urls.py | 26 +++++++++++ 5 files changed, 154 insertions(+) create mode 100644 project/__init__.py create mode 100644 project/dev.sqlite create mode 100755 project/manage.py create mode 100644 project/settings.py create mode 100644 project/urls.py diff --git a/project/__init__.py b/project/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/project/dev.sqlite b/project/dev.sqlite new file mode 100644 index 0000000000000000000000000000000000000000..4c9666af5b8d721b26f433edd600d23d50de38f4 GIT binary patch literal 29696 zcmeHQdu$v>8Qb!O#^XTJGnzWIJL^X=~U%{nVr=Q9;mP8Ui!r6PwpfdhbhR+c%An?nDrR~sq- z3&EPVkn6K9L=xazxS|if3*UzS(hBvQjKUCL2z-DDcso(&?X4(jY(hzcs|BUK+$INK zgWrXpfw$o~*u%fWzsBF=U*fa;MgA%9CioF}8RS3=_<_j%jr%$GGHP(-%irtbB4F%- zl9y9zRz*f9TUeLXe5JJ8pb_GTK+1l}U`=i)`E@I+Mle{1dR*LDFpPUuQYlN9sAMq7 zUKck8hAg7X$moewD$dK@1_zZ$IH)k3KhfplhC#nBh*V=4I5X1e;)1|$?O!dIGljfc z7oinLIt)Ht3gy!UX+^o+7!6jcOqqx{Eq}Jn#hnL1i^OChUqRr>mEEH1qGBlxlg_pp z4XEgv22{SKfxpF=13ZQrZafeR>qxVqmL^!vp;0R9szAp(wZ< zDK?(ntpex=B5sC@UEKn@&)5uSr$*FUX*RHfbmb-uHA;K00D{25`n72lw7tc2wGvHS zxDN}pg^06RuV#%%`=ExXiHt$O?J31WC{|O{s8MJ`Y+f3O$`H50MUenkV_e)CiMAou z!qp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3^*{r^#Ib|#l0@aPd>`~T6;0UH5B;87v)f9!cm_W%F@ literal 0 HcmV?d00001 diff --git a/project/manage.py b/project/manage.py new file mode 100755 index 00000000..8e180f0e --- /dev/null +++ b/project/manage.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python +from django.core.management import execute_manager +try: + import settings # Assumed to be in the same directory. +except ImportError: + import sys + sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__) + sys.exit(1) + +if __name__ == "__main__": + # Append lib and apps directories to PYTHONPATH + from os import path + import sys + + PROJECT_ROOT = path.realpath(path.dirname(__file__)) + sys.path += [PROJECT_ROOT + '/../apps', PROJECT_ROOT + '/../lib'] + + execute_manager(settings) diff --git a/project/settings.py b/project/settings.py new file mode 100644 index 00000000..6f0f6941 --- /dev/null +++ b/project/settings.py @@ -0,0 +1,110 @@ +# -*- coding: utf-8 -*- +from os import path + +PROJECT_ROOT = path.realpath(path.dirname(__file__)) + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +ADMINS = ( + (u'Marek Stępniowski', 'marek@stepniowski.com'), +) + +MANAGERS = ADMINS + +DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. +DATABASE_NAME = PROJECT_ROOT + '/dev.sqlite' # Or path to database file if using sqlite3. +DATABASE_USER = '' # Not used with sqlite3. +DATABASE_PASSWORD = '' # Not used with sqlite3. +DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. +DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. + +# Local time zone for this installation. Choices can be found here: +# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name +# although not all choices may be available on all operating systems. +# If running in a Windows environment this must be set to the same as your +# system time zone. +TIME_ZONE = 'Europe/Warsaw Poland' + +# Language code for this installation. All choices can be found here: +# http://www.i18nguy.com/unicode/language-identifiers.html +LANGUAGE_CODE = 'pl' + +SITE_ID = 1 + +# If you set this to False, Django will make some optimizations so as not +# to load the internationalization machinery. +USE_I18N = True + +# Absolute path to the directory that holds media. +# Example: "/home/media/media.lawrence.com/" +MEDIA_ROOT = PROJECT_ROOT + '/media/' +STATIC_ROOT = PROJECT_ROOT + '/static/' + +# URL that handles the media served from MEDIA_ROOT. Make sure to use a +# trailing slash if there is a path component (optional in other cases). +# Examples: "http://media.lawrence.com", "http://example.com/media/" +MEDIA_URL = '/media/' +STATIC_URL = '/static/' + +# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a +# trailing slash. +# Examples: "http://foo.com/media/", "/media/". +ADMIN_MEDIA_PREFIX = '/admin-media/' + +# Make this unique, and don't share it with anybody. +SECRET_KEY = 'ife@x^_lak+x84=lxtr!-ur$5g$+s6xt85gbbm@e_fk6q3r8=+' + +# List of callables that know how to import templates from various sources. +TEMPLATE_LOADERS = ( + 'django.template.loaders.filesystem.load_template_source', + 'django.template.loaders.app_directories.load_template_source', +# 'django.template.loaders.eggs.load_template_source', +) + +MIDDLEWARE_CLASSES = ( + 'django.middleware.common.CommonMiddleware', + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.middleware.doc.XViewMiddleware', +) + +ROOT_URLCONF = 'urls' + +TEMPLATE_DIRS = ( + PROJECT_ROOT + '/templates' +) + +# CSS and JS files to compress +# COMPRESS_CSS = { +# 'all': { +# 'source_filenames': ('css/master.css', 'css/jquery.date_input.css', 'css/jquery.countdown.css',), +# 'output_filename': 'css/all.min.css', +# } +# } +# +# COMPRESS_JS = { +# 'all': { +# 'source_filenames': ('js/jquery.js', 'js/jquery.date_input.js', 'js/jquery.date_input-pl.js', +# 'js/jquery.countdown.js', 'js/jquery.countdown-pl.js',), +# 'output_filename': 'js/all.min.js', +# } +# } +# +# COMPRESS_CSS_FILTERS = None + +INSTALLED_APPS = ( + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.sites', + 'django.contrib.admin', + 'django.contrib.admindocs', +) + + +try: + from localsettings import * +except ImportError: + pass + diff --git a/project/urls.py b/project/urls.py new file mode 100644 index 00000000..e3399662 --- /dev/null +++ b/project/urls.py @@ -0,0 +1,26 @@ +from django.conf.urls.defaults import * +from django.contrib import admin +from django.conf import settings + + +admin.autodiscover() + + +urlpatterns = patterns('', + # Example: + # (r'^platforma/', include('platforma.foo.urls')), + + # Admin panel + url(r'^admin/doc/', include('django.contrib.admindocs.urls')), + url(r'^admin/(.*)', admin.site.root), +) + + +# Static files +if settings.DEBUG: + urlpatterns += patterns('', + url(r'^%s(?P.+)$' % settings.MEDIA_URL[1:], 'django.views.static.serve', + {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}), + url(r'^%s(?P.+)$' % settings.STATIC_URL[1:], 'django.views.static.serve', + {'document_root': settings.STATIC_ROOT, 'show_indexes': True}), + ) -- 2.20.1