Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Political Memory
memopol
Commits
5b2c9c11
Commit
5b2c9c11
authored
Jul 01, 2015
by
Arnaud Fabre
Browse files
clean
parent
f22df529
Changes
5
Hide whitespace changes
Inline
Side-by-side
legislature/migrations/0001_initial.py
0 → 100644
View file @
5b2c9c11
# -*- coding: utf-8 -*-
from
__future__
import
unicode_literals
from
django.db
import
models
,
migrations
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
dependencies
=
[
(
'representatives'
,
'0003_auto_20150625_1151'
),
]
operations
=
[
migrations
.
CreateModel
(
name
=
'MemopolRepresentative'
,
fields
=
[
(
'id'
,
models
.
AutoField
(
verbose_name
=
'ID'
,
serialize
=
False
,
auto_created
=
True
,
primary_key
=
True
)),
(
'representative'
,
models
.
OneToOneField
(
parent_link
=
True
,
related_name
=
'extra'
,
null
=
True
,
on_delete
=
django
.
db
.
models
.
deletion
.
SET_NULL
,
to
=
'representatives.Representative'
)),
(
'representative_remote_id'
,
models
.
CharField
(
unique
=
True
,
max_length
=
255
)),
(
'score'
,
models
.
IntegerField
(
default
=
0
)),
(
'country'
,
models
.
ForeignKey
(
to
=
'representatives.Country'
,
null
=
True
)),
],
),
]
political_memory
/__init__.py
→
legislature/migrations
/__init__.py
View file @
5b2c9c11
File moved
political_memory/settings.py
deleted
100644 → 0
View file @
f22df529
# Django settings for political_memory project.
import
os
PROJECT_PATH
=
os
.
path
.
abspath
(
os
.
path
.
split
(
__file__
)[
0
])
SUBPROJECT_PATH
=
os
.
path
.
split
(
PROJECT_PATH
)[
0
]
DEBUG
=
True
TEMPLATE_DEBUG
=
DEBUG
ADMINS
=
(
# ('Your Name', 'your_email@example.com'),
)
MANAGERS
=
ADMINS
DATABASES
=
{
'default'
:
{
'ENGINE'
:
'django.db.backends.sqlite3'
,
'NAME'
:
'db.sqlite'
,
}
}
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
TIME_ZONE
=
'Europe/Brussels'
# http://www.i18nguy.com/unicode/language-identifiers.html
LANGUAGE_CODE
=
'en-us'
SITE_ID
=
1
USE_I18N
=
True
USE_L10N
=
True
USE_TZ
=
True
MEDIA_ROOT
=
''
MEDIA_URL
=
'/medias/'
STATIC_ROOT
=
''
STATIC_URL
=
'/static/'
STATICFILES_DIRS
=
(
os
.
path
.
join
(
SUBPROJECT_PATH
,
"static"
),
)
STATICFILES_FINDERS
=
(
'django.contrib.staticfiles.finders.FileSystemFinder'
,
'django.contrib.staticfiles.finders.AppDirectoriesFinder'
,
# 'django.contrib.staticfiles.finders.DefaultStorageFinder',
)
COFFEESCRIPT_LOCATION
=
SUBPROJECT_PATH
+
'/static/coffeescript/'
SECRET_KEY
=
'z74l8#z&ij&$n_nj*y&3m&=(7f0^kf73fz9ldxy4e&d69gz!(u'
TEMPLATE_LOADERS
=
(
'hamlpy.template.loaders.HamlPyFilesystemLoader'
,
'hamlpy.template.loaders.HamlPyAppDirectoriesLoader'
,
'django.template.loaders.filesystem.Loader'
,
'django.template.loaders.app_directories.Loader'
,
# 'django.template.loaders.eggs.Loader',
)
MIDDLEWARE_CLASSES
=
(
'django.middleware.common.CommonMiddleware'
,
'django.contrib.sessions.middleware.SessionMiddleware'
,
'django.middleware.csrf.CsrfViewMiddleware'
,
'django.contrib.auth.middleware.AuthenticationMiddleware'
,
'django.contrib.messages.middleware.MessageMiddleware'
,
# Uncomment the next line for simple clickjacking protection:
# 'django.middleware.clickjacking.XFrameOptionsMiddleware',
)
if
DEBUG
:
MIDDLEWARE_CLASSES
+=
(
'debug_toolbar.middleware.DebugToolbarMiddleware'
,
)
INTERNAL_IPS
=
(
'127.0.0.1'
,)
ROOT_URLCONF
=
'political_memory.urls'
# Python dotted path to the WSGI application used by Django's runserver.
WSGI_APPLICATION
=
'political_memory.wsgi.application'
TEMPLATE_DIRS
=
(
os
.
path
.
join
(
SUBPROJECT_PATH
,
"templates"
),
)
INSTALLED_APPS
=
(
'django.contrib.auth'
,
'django.contrib.contenttypes'
,
'django.contrib.sessions'
,
'django.contrib.sites'
,
'django.contrib.messages'
,
'django.contrib.staticfiles'
,
'django.contrib.admin'
,
'south'
,
'representatives'
,
'representatives_votes'
,
)
if
DEBUG
:
INSTALLED_APPS
+=
(
'debug_toolbar'
,
'django_pdb'
,
'django_extensions'
,
)
DEBUG_TOOLBAR_PANELS
=
(
'debug_toolbar.panels.version.VersionDebugPanel'
,
'debug_toolbar.panels.timer.TimerDebugPanel'
,
'debug_toolbar.panels.settings_vars.SettingsVarsDebugPanel'
,
'debug_toolbar.panels.headers.HeaderDebugPanel'
,
'debug_toolbar.panels.request_vars.RequestVarsDebugPanel'
,
'debug_toolbar.panels.template.TemplateDebugPanel'
,
'debug_toolbar.panels.sql.SQLDebugPanel'
,
'debug_toolbar.panels.signals.SignalDebugPanel'
,
'debug_toolbar.panels.logger.LoggingPanel'
,
)
FIXTURE_DIRS
=
(
'fixtures'
,
)
LOGGING
=
{
'version'
:
1
,
'disable_existing_loggers'
:
False
,
'filters'
:
{
'require_debug_false'
:
{
'()'
:
'django.utils.log.RequireDebugFalse'
}
},
'handlers'
:
{
'mail_admins'
:
{
'level'
:
'ERROR'
,
'filters'
:
[
'require_debug_false'
],
'class'
:
'django.utils.log.AdminEmailHandler'
}
},
'loggers'
:
{
'django.request'
:
{
'handlers'
:
[
'mail_admins'
],
'level'
:
'ERROR'
,
'propagate'
:
True
,
},
}
}
try
:
from
settings_local
import
*
except
ImportError
:
pass
political_memory/urls.py
deleted
100644 → 0
View file @
f22df529
from
django.conf.urls
import
patterns
,
include
,
url
from
django.contrib
import
admin
from
django.views.generic
import
TemplateView
admin
.
autodiscover
()
urlpatterns
=
patterns
(
''
,
url
(
r
'^$'
,
TemplateView
.
as_view
(
template_name
=
"home.html"
),
name
=
'home'
),
# url(r'^political_memory/', include('foo.urls')),
url
(
r
'^admin/'
,
include
(
admin
.
site
.
urls
)),
)
political_memory/wsgi.py
deleted
100644 → 0
View file @
f22df529
"""
WSGI config for political_memory project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` setting.
Usually you will have the standard Django WSGI application here, but it also
might make sense to replace the whole Django WSGI application with a custom one
that later delegates to the Django one. For example, you could introduce WSGI
middleware here, or combine a Django application with an application of another
framework.
"""
import
os
os
.
environ
.
setdefault
(
"DJANGO_SETTINGS_MODULE"
,
"political_memory.settings"
)
# This application object is used by any WSGI server configured to use this
# file. This includes Django's development server, if the WSGI_APPLICATION
# setting points here.
from
django.core.wsgi
import
get_wsgi_application
application
=
get_wsgi_application
()
# Apply WSGI middleware here.
# from helloworld.wsgi import HelloWorldApplication
# application = HelloWorldApplication(application)
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment