diff options
author | Mike Crute <mcrute@gmail.com> | 2010-05-27 23:17:55 -0400 |
---|---|---|
committer | Mike Crute <mcrute@gmail.com> | 2010-05-27 23:17:55 -0400 |
commit | c866a90a3fc0a0ad9eb595f00b91beb6cd0d0220 (patch) | |
tree | 9a5205e1e9c37ffa6c0e80bcebbb47933959216f | |
parent | d2c225bcb89d07474db2977e67fbe7a3e47606d5 (diff) | |
download | chishop-c866a90a3fc0a0ad9eb595f00b91beb6cd0d0220.tar.bz2 chishop-c866a90a3fc0a0ad9eb595f00b91beb6cd0d0220.tar.xz chishop-c866a90a3fc0a0ad9eb595f00b91beb6cd0d0220.zip |
Relocating default settings and templates into the djangopypi package
-rw-r--r-- | chishop/__init__.py | 2 | ||||
-rw-r--r-- | chishop/media/dists/__init__.py | 0 | ||||
-rw-r--r-- | chishop/production_example.py | 18 | ||||
-rw-r--r-- | chishop/settings.py | 2 | ||||
-rw-r--r-- | chishop/urls.py | 26 | ||||
-rw-r--r-- | djangopypi/htdocs/media/__init__.py (renamed from chishop/conf/__init__.py) | 0 | ||||
-rw-r--r-- | djangopypi/htdocs/media/dists/__init__.py (renamed from chishop/media/__init__.py) | 0 | ||||
-rw-r--r-- | djangopypi/htdocs/media/style/djangopypi.css (renamed from chishop/media/style/djangopypi.css) | 0 | ||||
-rw-r--r-- | djangopypi/manage.py (renamed from chishop/manage.py) | 0 | ||||
-rw-r--r-- | djangopypi/settings.py (renamed from chishop/conf/default.py) | 9 | ||||
-rw-r--r-- | djangopypi/templates/404.html (renamed from chishop/templates/404.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/500.html (renamed from chishop/templates/500.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/admin/base_site.html (renamed from chishop/templates/admin/base_site.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/base.html (renamed from chishop/templates/base.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/base_site.html (renamed from chishop/templates/base_site.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/djangopypi/pypi.html (renamed from chishop/templates/djangopypi/pypi.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/djangopypi/pypi_show_links.html (renamed from chishop/templates/djangopypi/pypi_show_links.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/djangopypi/search.html (renamed from chishop/templates/djangopypi/search.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/djangopypi/search_results.html (renamed from chishop/templates/djangopypi/search_results.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/djangopypi/show_channel.html (renamed from chishop/templates/djangopypi/show_channel.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/djangopypi/show_links.html (renamed from chishop/templates/djangopypi/show_links.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/djangopypi/show_version.html (renamed from chishop/templates/djangopypi/show_version.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/djangopypi/simple.html (renamed from chishop/templates/djangopypi/simple.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/activate.html (renamed from chishop/templates/registration/activate.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/activation_complete.html (renamed from chishop/templates/registration/activation_complete.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/activation_email.txt (renamed from chishop/templates/registration/activation_email.txt) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/activation_email_subject.txt (renamed from chishop/templates/registration/activation_email_subject.txt) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/login.html (renamed from chishop/templates/registration/login.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/logout.html (renamed from chishop/templates/registration/logout.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/registration_closed.html (renamed from chishop/templates/registration/registration_closed.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/registration_complete.html (renamed from chishop/templates/registration/registration_complete.html) | 0 | ||||
-rw-r--r-- | djangopypi/templates/registration/registration_form.html (renamed from chishop/templates/registration/registration_form.html) | 0 | ||||
-rw-r--r-- | djangopypi/urls/__init__.py | 25 | ||||
-rwxr-xr-x | setup.py | 1 |
34 files changed, 29 insertions, 54 deletions
diff --git a/chishop/__init__.py b/chishop/__init__.py index b56a51c..e69de29 100644 --- a/chishop/__init__.py +++ b/chishop/__init__.py | |||
@@ -1,2 +0,0 @@ | |||
1 | VERSION = (0, 1, 1) | ||
2 | __version__ = ".".join(map(str, VERSION)) | ||
diff --git a/chishop/media/dists/__init__.py b/chishop/media/dists/__init__.py deleted file mode 100644 index e69de29..0000000 --- a/chishop/media/dists/__init__.py +++ /dev/null | |||
diff --git a/chishop/production_example.py b/chishop/production_example.py deleted file mode 100644 index b64623e..0000000 --- a/chishop/production_example.py +++ /dev/null | |||
@@ -1,18 +0,0 @@ | |||
1 | from conf.default import * | ||
2 | import os | ||
3 | |||
4 | DEBUG = False | ||
5 | TEMPLATE_DEBUG = DEBUG | ||
6 | |||
7 | ADMINS = ( | ||
8 | ('chishop', 'example@example.org'), | ||
9 | ) | ||
10 | |||
11 | MANAGERS = ADMINS | ||
12 | |||
13 | DATABASE_ENGINE = 'postgresql_psycopg2' | ||
14 | DATABASE_NAME = 'chishop' | ||
15 | DATABASE_USER = 'chishop' | ||
16 | DATABASE_PASSWORD = 'chishop' | ||
17 | DATABASE_HOST = '' | ||
18 | DATABASE_PORT = '' | ||
diff --git a/chishop/settings.py b/chishop/settings.py index e68a4e5..90ee842 100644 --- a/chishop/settings.py +++ b/chishop/settings.py | |||
@@ -1,5 +1,5 @@ | |||
1 | from conf.default import * | ||
2 | import os | 1 | import os |
2 | from djangopypi.settings import * | ||
3 | 3 | ||
4 | DEBUG = True | 4 | DEBUG = True |
5 | TEMPLATE_DEBUG = DEBUG | 5 | TEMPLATE_DEBUG = DEBUG |
diff --git a/chishop/urls.py b/chishop/urls.py deleted file mode 100644 index 5a5dd77..0000000 --- a/chishop/urls.py +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | # -*- coding: utf-8 -*- | ||
2 | from django.conf.urls.defaults import patterns, url, include, handler404, handler500 | ||
3 | from django.conf import settings | ||
4 | from django.contrib import admin | ||
5 | |||
6 | admin.autodiscover() | ||
7 | |||
8 | urlpatterns = patterns('') | ||
9 | |||
10 | # Serve static pages. | ||
11 | if settings.LOCAL_DEVELOPMENT: | ||
12 | urlpatterns += patterns("django.views", | ||
13 | url(r"^%s(?P<path>.*)$" % settings.MEDIA_URL[1:], "static.serve", { | ||
14 | "document_root": settings.MEDIA_ROOT})) | ||
15 | |||
16 | urlpatterns += patterns("", | ||
17 | # Admin interface | ||
18 | url(r'^admin/doc/', include("django.contrib.admindocs.urls")), | ||
19 | url(r'^admin/(.*)', admin.site.root), | ||
20 | |||
21 | # Registration | ||
22 | url(r'^accounts/', include('registration.backends.default.urls')), | ||
23 | |||
24 | # The Chishop | ||
25 | url(r'', include("djangopypi.urls")) | ||
26 | ) | ||
diff --git a/chishop/conf/__init__.py b/djangopypi/htdocs/media/__init__.py index e69de29..e69de29 100644 --- a/chishop/conf/__init__.py +++ b/djangopypi/htdocs/media/__init__.py | |||
diff --git a/chishop/media/__init__.py b/djangopypi/htdocs/media/dists/__init__.py index e69de29..e69de29 100644 --- a/chishop/media/__init__.py +++ b/djangopypi/htdocs/media/dists/__init__.py | |||
diff --git a/chishop/media/style/djangopypi.css b/djangopypi/htdocs/media/style/djangopypi.css index e6fbfd9..e6fbfd9 100644 --- a/chishop/media/style/djangopypi.css +++ b/djangopypi/htdocs/media/style/djangopypi.css | |||
diff --git a/chishop/manage.py b/djangopypi/manage.py index 5e78ea9..5e78ea9 100644 --- a/chishop/manage.py +++ b/djangopypi/manage.py | |||
diff --git a/chishop/conf/default.py b/djangopypi/settings.py index 97002b6..0fb8716 100644 --- a/chishop/conf/default.py +++ b/djangopypi/settings.py | |||
@@ -52,13 +52,13 @@ USE_I18N = True | |||
52 | 52 | ||
53 | # Absolute path to the directory that holds media. | 53 | # Absolute path to the directory that holds media. |
54 | # Example: "/home/media/media.lawrence.com/" | 54 | # Example: "/home/media/media.lawrence.com/" |
55 | here = os.path.abspath(os.path.dirname(os.path.dirname(__file__))) | 55 | here = os.path.abspath(os.path.dirname(__file__)) |
56 | MEDIA_ROOT = os.path.join(here, 'media') | 56 | MEDIA_ROOT = os.path.join(here, 'htdocs', 'media') |
57 | 57 | ||
58 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a | 58 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a |
59 | # trailing slash if there is a path component (optional in other cases). | 59 | # trailing slash if there is a path component (optional in other cases). |
60 | # Examples: "http://media.lawrence.com", "http://example.com/media/" | 60 | # Examples: "http://media.lawrence.com", "http://example.com/media/" |
61 | MEDIA_URL = '/media/' | 61 | MEDIA_URL = '/htdocs/media/' |
62 | 62 | ||
63 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a | 63 | # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a |
64 | # trailing slash. | 64 | # trailing slash. |
@@ -79,9 +79,10 @@ MIDDLEWARE_CLASSES = ( | |||
79 | 'django.middleware.common.CommonMiddleware', | 79 | 'django.middleware.common.CommonMiddleware', |
80 | 'django.contrib.sessions.middleware.SessionMiddleware', | 80 | 'django.contrib.sessions.middleware.SessionMiddleware', |
81 | 'django.contrib.auth.middleware.AuthenticationMiddleware', | 81 | 'django.contrib.auth.middleware.AuthenticationMiddleware', |
82 | 'django.contrib.csrf.middleware.CsrfMiddleware', | ||
82 | ) | 83 | ) |
83 | 84 | ||
84 | ROOT_URLCONF = 'urls' | 85 | ROOT_URLCONF = 'djangopypi.urls' |
85 | 86 | ||
86 | TEMPLATE_CONTEXT_PROCESSORS = ( | 87 | TEMPLATE_CONTEXT_PROCESSORS = ( |
87 | "django.core.context_processors.auth", | 88 | "django.core.context_processors.auth", |
diff --git a/chishop/templates/404.html b/djangopypi/templates/404.html index 9bf4293..9bf4293 100644 --- a/chishop/templates/404.html +++ b/djangopypi/templates/404.html | |||
diff --git a/chishop/templates/500.html b/djangopypi/templates/500.html index b30e431..b30e431 100644 --- a/chishop/templates/500.html +++ b/djangopypi/templates/500.html | |||
diff --git a/chishop/templates/admin/base_site.html b/djangopypi/templates/admin/base_site.html index 9443eb2..9443eb2 100644 --- a/chishop/templates/admin/base_site.html +++ b/djangopypi/templates/admin/base_site.html | |||
diff --git a/chishop/templates/base.html b/djangopypi/templates/base.html index dd797e7..dd797e7 100644 --- a/chishop/templates/base.html +++ b/djangopypi/templates/base.html | |||
diff --git a/chishop/templates/base_site.html b/djangopypi/templates/base_site.html index 5257255..5257255 100644 --- a/chishop/templates/base_site.html +++ b/djangopypi/templates/base_site.html | |||
diff --git a/chishop/templates/djangopypi/pypi.html b/djangopypi/templates/djangopypi/pypi.html index f98cf44..f98cf44 100644 --- a/chishop/templates/djangopypi/pypi.html +++ b/djangopypi/templates/djangopypi/pypi.html | |||
diff --git a/chishop/templates/djangopypi/pypi_show_links.html b/djangopypi/templates/djangopypi/pypi_show_links.html index 13fc2e5..13fc2e5 100644 --- a/chishop/templates/djangopypi/pypi_show_links.html +++ b/djangopypi/templates/djangopypi/pypi_show_links.html | |||
diff --git a/chishop/templates/djangopypi/search.html b/djangopypi/templates/djangopypi/search.html index 8269508..8269508 100644 --- a/chishop/templates/djangopypi/search.html +++ b/djangopypi/templates/djangopypi/search.html | |||
diff --git a/chishop/templates/djangopypi/search_results.html b/djangopypi/templates/djangopypi/search_results.html index dccf61f..dccf61f 100644 --- a/chishop/templates/djangopypi/search_results.html +++ b/djangopypi/templates/djangopypi/search_results.html | |||
diff --git a/chishop/templates/djangopypi/show_channel.html b/djangopypi/templates/djangopypi/show_channel.html index 86d312c..86d312c 100644 --- a/chishop/templates/djangopypi/show_channel.html +++ b/djangopypi/templates/djangopypi/show_channel.html | |||
diff --git a/chishop/templates/djangopypi/show_links.html b/djangopypi/templates/djangopypi/show_links.html index 57a1268..57a1268 100644 --- a/chishop/templates/djangopypi/show_links.html +++ b/djangopypi/templates/djangopypi/show_links.html | |||
diff --git a/chishop/templates/djangopypi/show_version.html b/djangopypi/templates/djangopypi/show_version.html index d3b393a..d3b393a 100644 --- a/chishop/templates/djangopypi/show_version.html +++ b/djangopypi/templates/djangopypi/show_version.html | |||
diff --git a/chishop/templates/djangopypi/simple.html b/djangopypi/templates/djangopypi/simple.html index 6a21d5c..6a21d5c 100644 --- a/chishop/templates/djangopypi/simple.html +++ b/djangopypi/templates/djangopypi/simple.html | |||
diff --git a/chishop/templates/registration/activate.html b/djangopypi/templates/registration/activate.html index bc67771..bc67771 100644 --- a/chishop/templates/registration/activate.html +++ b/djangopypi/templates/registration/activate.html | |||
diff --git a/chishop/templates/registration/activation_complete.html b/djangopypi/templates/registration/activation_complete.html index c8e8aca..c8e8aca 100644 --- a/chishop/templates/registration/activation_complete.html +++ b/djangopypi/templates/registration/activation_complete.html | |||
diff --git a/chishop/templates/registration/activation_email.txt b/djangopypi/templates/registration/activation_email.txt index 0a25329..0a25329 100644 --- a/chishop/templates/registration/activation_email.txt +++ b/djangopypi/templates/registration/activation_email.txt | |||
diff --git a/chishop/templates/registration/activation_email_subject.txt b/djangopypi/templates/registration/activation_email_subject.txt index 93618cc..93618cc 100644 --- a/chishop/templates/registration/activation_email_subject.txt +++ b/djangopypi/templates/registration/activation_email_subject.txt | |||
diff --git a/chishop/templates/registration/login.html b/djangopypi/templates/registration/login.html index 6c7f799..6c7f799 100644 --- a/chishop/templates/registration/login.html +++ b/djangopypi/templates/registration/login.html | |||
diff --git a/chishop/templates/registration/logout.html b/djangopypi/templates/registration/logout.html index 06483a8..06483a8 100644 --- a/chishop/templates/registration/logout.html +++ b/djangopypi/templates/registration/logout.html | |||
diff --git a/chishop/templates/registration/registration_closed.html b/djangopypi/templates/registration/registration_closed.html index c92e80b..c92e80b 100644 --- a/chishop/templates/registration/registration_closed.html +++ b/djangopypi/templates/registration/registration_closed.html | |||
diff --git a/chishop/templates/registration/registration_complete.html b/djangopypi/templates/registration/registration_complete.html index d9a19cf..d9a19cf 100644 --- a/chishop/templates/registration/registration_complete.html +++ b/djangopypi/templates/registration/registration_complete.html | |||
diff --git a/chishop/templates/registration/registration_form.html b/djangopypi/templates/registration/registration_form.html index 719a875..719a875 100644 --- a/chishop/templates/registration/registration_form.html +++ b/djangopypi/templates/registration/registration_form.html | |||
diff --git a/djangopypi/urls/__init__.py b/djangopypi/urls/__init__.py index 50fd02b..72ff41d 100644 --- a/djangopypi/urls/__init__.py +++ b/djangopypi/urls/__init__.py | |||
@@ -1,16 +1,35 @@ | |||
1 | # -*- coding: utf-8 -*- | 1 | # -*- coding: utf-8 -*- |
2 | from django.conf import settings | ||
3 | from django.contrib import admin | ||
2 | from django.conf.urls.defaults import patterns, include | 4 | from django.conf.urls.defaults import patterns, include |
3 | 5 | ||
6 | |||
7 | admin.autodiscover() | ||
8 | |||
9 | |||
4 | urlpatterns = patterns('djangopypi.views', | 10 | urlpatterns = patterns('djangopypi.views', |
11 | (r'^admin/doc/', include('django.contrib.admindocs.urls')), | ||
12 | (r'^admin/(.*)', admin.site.root), | ||
13 | |||
14 | (r'^accounts/', include('registration.backends.default.urls')), | ||
15 | |||
5 | (r'^simple/', include('djangopypi.urls.simple')), | 16 | (r'^simple/', include('djangopypi.urls.simple')), |
6 | (r'^channel/', include('djangopypi.urls.channel')), | 17 | (r'^channel/', include('djangopypi.urls.channel')), |
7 | 18 | ||
8 | (r'^$', 'simple', {'template_name': 'djangopypi/pypi.html'}, | ||
9 | 'djangopypi-pypi'), | ||
10 | |||
11 | (r'^(?P<dist_name>[\w\d_\.\-]+)/$', 'show_links', | 19 | (r'^(?P<dist_name>[\w\d_\.\-]+)/$', 'show_links', |
12 | {'template_name': 'djangopypi/pypi_show_links.html'}, | 20 | {'template_name': 'djangopypi/pypi_show_links.html'}, |
13 | 'djangopypi-pypi_show_links'), | 21 | 'djangopypi-pypi_show_links'), |
14 | 22 | ||
15 | (r'^search', 'search', {}, 'djangopypi-search'), | 23 | (r'^search', 'search', {}, 'djangopypi-search'), |
24 | |||
25 | (r'^$', 'simple', {'template_name': 'djangopypi/pypi.html'}, | ||
26 | 'djangopypi-pypi'), | ||
16 | ) | 27 | ) |
28 | |||
29 | |||
30 | # Serve static pages. | ||
31 | if settings.LOCAL_DEVELOPMENT: | ||
32 | urlpatterns += patterns('django.views', | ||
33 | (r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:], 'static.serve', | ||
34 | {'document_root': settings.MEDIA_ROOT}) | ||
35 | ) | ||
@@ -44,6 +44,7 @@ setup( | |||
44 | 'django>=1.0', | 44 | 'django>=1.0', |
45 | 'docutils', | 45 | 'docutils', |
46 | 'django-registration==0.8-alpha-1', | 46 | 'django-registration==0.8-alpha-1', |
47 | 'django-tagging>=0.3', | ||
47 | ], | 48 | ], |
48 | dependency_links=[ | 49 | dependency_links=[ |
49 | 'http://bitbucket.org/ubernostrum/django-registration/downloads', | 50 | 'http://bitbucket.org/ubernostrum/django-registration/downloads', |