test2

Ryan Stuart ryan.stuart.85 at gmail.com
Wed Mar 25 00:55:36 EDT 2015


On Wed, Mar 25, 2015 at 1:11 PM, Tiglath Suriol <tiglathsuriol at gmail.com>
wrote:

> # Make this unique, and don't share it with anybody.
>

.......


> SECRET_KEY = '42=kv!a-il*!4j&7v+0(@a at vq_3j-+ysatta@l6-h63odj2)75'
>
> # List of callables that know how to import templates from various sources.
> TEMPLATE_LOADERS = (
>     'django.template.loaders.filesystem.Loader',
>     'django.template.loaders.app_directories.Loader',
> #     'django.template.loaders.eggs.Loader',
> )
>
> MIDDLEWARE_CLASSES = (
>     'django.middleware.common.CommonMiddleware',
>     'django.middleware.csrf.CsrfViewMiddleware',
>     'django.contrib.sessions.middleware.SessionMiddleware',
>     'django.contrib.auth.middleware.AuthenticationMiddleware',
>     'django.contrib.messages.middleware.MessageMiddleware',
>     # Uncomment the next line for simple clickjacking protection:
>     # 'django.middleware.clickjacking.XFrameOptionsMiddleware',
> )
>
> CACHES = {
>     'default': {
>         'BACKEND': 'django.core.cache.backends.memcached.MemcachedCache',
>         'LOCATION': '127.0.0.1:11211',
>     }
> }
>
> SESSION_ENGINE = 'django.contrib.sessions.backends.cache'
>
> ROOT_URLCONF = 'ipdb.urls'
>
> # Python dotted path to the WSGI application used by Django's runserver.
> WSGI_APPLICATION = 'ipdb.wsgi.application'
>
> TEMPLATE_DIRS = (
>     # Put strings here, like "/home/html/django_templates" or
> "C:/www/django/templates".
>     # Always use forward slashes, even on Windows.
>     # Don't forget to use absolute paths, not relative paths.
>     PROJECT_PATH + '/ipdb/asset/templates', # Change this to your own
> directory.
> )
>
> INSTALLED_APPS = (
>     'django.contrib.auth',
>     'django.contrib.contenttypes',
>     'django.contrib.sessions',
>     'django.contrib.sites',
>     'django.contrib.messages',
>     'django.contrib.staticfiles',
>     # Uncomment the next line to enable the admin:
>     'django.contrib.admin',
>     # Uncomment the next line to enable admin documentation:
>     'django.contrib.admindocs',
>     'django.contrib.flatpages',
>     'ipdb.asset',
>     'registration',
> )
>
> #
> # Send logs to the console and to a file.
> #
> LOGGING = {
>     'version': 1,
>     'disable_existing_loggers': True,
>     'formatters': {
>         'standard': {
>             'format' : "[%(asctime)s] %(levelname)s [%(name)s:%(lineno)s]
> %(message)s",
>             'datefmt' : "%d/%b/%Y %H:%M:%S"
>         },
>     },
>     'handlers': {
>         'null': {
>             'level':'DEBUG',
>             'class':'django.utils.log.NullHandler',
>         },
>         'logfile': {
>             'level':'DEBUG',
>             'class':'logging.handlers.RotatingFileHandler',
>             'filename': LOG_DIR + "/ipdb.log",
>             'maxBytes': 50000,
>             'backupCount': 2,
>             'formatter': 'standard',
>         },
>         'console':{
>             'level':'DEBUG',
>             'class':'logging.StreamHandler',
>             'formatter': 'standard'
>         },
>     },
>     'loggers': {
>         'django': {
>             'handlers':['console'],
>             'propagate': True,
>             'level':'DEBUG',
>         },
>         'django.db.backends': {
>             'handlers': ['console'],
>             'level': 'DEBUG',
>             'propagate': False,
>         }#from django.conf.urls.defaults import patterns, include, url
> from django.conf import *
> from django.conf.urls.static import static
> from django.views.static import serve
> from django.conf.urls import *
> #from ip_db.views import ipdb_input_add, ipdb_input_start,
> ipdb_input_delete, ipdb_input_save, ipdb_api_add, ipdb_api_search
> from asset.views import api_add, api_search,  gui_search, gui_add,
> ipdb_overview, api_file
> from asset.utils.elastic_func import country_tally, grid,
> newest_to_oldest, country_tally_web_top10, country_tally_web, asset_tally
> from django.http import HttpResponsePermanentRedirect
> from django.shortcuts import render_to_response
> from django.contrib import admin
> admin.autodiscover()
>
> import os
>
> PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
>
> # Uncomment the next two lines to enable the admin:
> from django.contrib import admin
> admin.autodiscover()
>
> urlpatterns = patterns('asset.views',
>     # Examples:
>     # url(r'^$', 'ipdb.views.home', name='home'),
>     # url(r'^ipdb/', include('ipdb.foo.urls')),
>
>     # Uncomment the admin/doc line below to enable admin documentation:
>
>     # Uncomment the next line to enable the admin:
>     url(r'^admin/', include(admin.site.urls)),
>     #(r'^accounts/', include('registration.urls')),
>     (r'^$', lambda request:
> HttpResponsePermanentRedirect('/asset/overview')),
>     (r'^heatmap/', country_tally),
>     (r'^grid/',grid),
>     (r'^nto/',newest_to_oldest),
>     (r'^ctwtt/',country_tally_web_top10),
>     (r'^ctw/',country_tally_web),
>     (r'^at/',asset_tally),
>
>      #(r'^/$', ipdb_overview), #Start
>      #(r'^$', ipdb_overview), #Start
>     (r'^asset/overview/$', ipdb_overview), #Start
>     (r'^input/$', gui_add),
>     (r'^search/$', gui_search),
>     (r'^search$', gui_search),
>     # (r'^delete/$', ipdb_input_delete),
>     (r'^api/add/$', api_add), #check sensornet urls.py and
> views/sensors.py for cool tricks.
>     (r'^api/search/$', api_search), #check sensornet urls.py and
> views/sensors.py for cool tricks.
>     (r'^api/file/$', api_file),
>
>     #(r'^asset/media/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root':  os.path.join(PROJECT_PATH, '../asset/media')}),
>
>     #(r'^ip_db/media/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root':  os.path.join(PROJECT_PATH, 'ip_db/media')}),
>     #(r'^media/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root':  os.path.join(PROJECT_PATH, 'media')}),
>     #(r'^static/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root':  '/home/sensornet/static'}),
>
>     # extjs4 stuff
>     #(r'^asset/overview/extjs/(?P<path>.*)$', 'serve', {'document_root':
> os.path.join(PROJECT_PATH, '../asset/extjs')}),
>     #(r'^extjs/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root':  os.path.join(PROJECT_PATH, '../ip_db/extjs')}),
>     #(r'^extjs/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root':  '/home/totis/tree/ipdb/django/ipdb/asset/static/extjs'}),
> ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
>         'ipdb.asset': {
>             'handlers': ['console', 'logfile'],
>             'level': 'DEBUG',
>         },
>     }
> }
>
> ===========
>
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>



-- 
Ryan Stuart, B.Eng
Software Engineer

ABN: 81-206-082-133
W: http://www.textisbeautiful.net/
M: +61-431-299-036
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150325/b41531f7/attachment.html>


More information about the Python-list mailing list