Changeset wblankonin,3 in infrastruktur


Ignore:
Timestamp:
09/13/2010 03:41:57 PM (7 years ago)
Author:
mdamt <mdamt@…>
branch-nick:
wbi
revision id:
mdamt@adikih-20100913084157-2ajpf49s1ilzjaxj
Message:

w.blankon.in is ready to roll

Location:
wblankonin
Files:
41 added
2 edited

Legend:

Unmodified
Added
Removed
  • wblankonin/settings.py

    r1 r3  
    11# Django settings for wbi project. 
     2import os 
     3import os.path 
     4PROJECT_PATH = os.path.dirname(os.path.abspath(__file__)) 
    25 
    36DEBUG = True 
     
    1013MANAGERS = ADMINS 
    1114 
    12 DATABASE_ENGINE = ''           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 
    13 DATABASE_NAME = ''             # Or path to database file if using sqlite3. 
     15DATABASE_ENGINE = 'sqlite3'           # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 
     16DATABASE_NAME = 'wbi.db'             # Or path to database file if using sqlite3. 
    1417DATABASE_USER = ''             # Not used with sqlite3. 
    1518DATABASE_PASSWORD = ''         # Not used with sqlite3. 
     
    3639# Absolute path to the directory that holds media. 
    3740# Example: "/home/media/media.lawrence.com/" 
    38 MEDIA_ROOT = '' 
     41MEDIA_ROOT = unicode(os.path.join(PROJECT_PATH, 'media'))  
    3942 
    4043# URL that handles the media served from MEDIA_ROOT. Make sure to use a 
    4144# trailing slash if there is a path component (optional in other cases). 
    4245# Examples: "http://media.lawrence.com", "http://example.com/media/" 
    43 MEDIA_URL = '' 
     46MEDIA_URL = '/media/' 
    4447 
    4548# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 
     
    6265    'django.contrib.sessions.middleware.SessionMiddleware', 
    6366    'django.contrib.auth.middleware.AuthenticationMiddleware', 
     67    'ittybitty.middleware.IttyBittyURLMiddleware', 
    6468) 
    6569 
     
    7074    # Always use forward slashes, even on Windows. 
    7175    # Don't forget to use absolute paths, not relative paths. 
     76     os.path.join(PROJECT_PATH, 'templates'), 
    7277) 
    7378 
     
    7782    'django.contrib.sessions', 
    7883    'django.contrib.sites', 
     84    'ittybitty', 
    7985) 
  • wblankonin/urls.py

    r1 r3  
    11from django.conf.urls.defaults import * 
     2from wblankonin.views import * 
     3from django.conf import settings 
    24 
    35# Uncomment the next two lines to enable the admin: 
     
    1517    # Uncomment the next line to enable the admin: 
    1618    # (r'^admin/', include(admin.site.urls)), 
     19    (r'^$', index), 
     20    (r'^jadi/(?P<url>.*)$', shorten), 
     21    (r'^JADI/(?P<url>.*)$', shorten_raw), 
     22    (r'^m/(?P<path>.*)$', 'django.views.static.serve', 
     23    {'document_root': settings.MEDIA_ROOT}), 
     24    (r'^(?P<code>.*)$', jump), 
    1725) 
Note: See TracChangeset for help on using the changeset viewer.