diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000000000000000000000000000000000..6f9bd2eb272b00d65af7fe60f90f3c534a9ebaeb --- /dev/null +++ b/.travis.yml @@ -0,0 +1,10 @@ +sudo: false +language: python +python: + - "2.7" +install: + - pip install django + - pip install -e git+https://github.com/political-memory/django-representatives.git#egg=representatives + - pip install -e . +script: + - test_project/manage.py migrate diff --git a/README.md b/README.md new file mode 100644 index 0000000000000000000000000000000000000000..c366f37b2174b9d4256cf3197d02663a771e01f6 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +[](https://travis-ci.org/political-memory/django-representatives-votes) diff --git a/setup.py b/setup.py index 1909f8954d8741fd94c69c44ec990ee2249b0c7a..473a8101fdeb7400486d57f94ae741ead2b61bf0 100644 --- a/setup.py +++ b/setup.py @@ -12,6 +12,9 @@ setup( include_package_data=True, license='GPLv3', keywords='django government parliament votes', + install_requires=[ + 'django-representatives', + ], classifiers=[ 'Development Status :: 1 - Alpha/Planning', 'Environment :: Web Environment', diff --git a/test_project/manage.py b/test_project/manage.py new file mode 100755 index 0000000000000000000000000000000000000000..0fc36a34c27f8863de0560f451ddbfa5fa957f46 --- /dev/null +++ b/test_project/manage.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python +import os +import sys + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/test_project/test_project/__init__.py b/test_project/test_project/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/test_project/test_project/settings.py b/test_project/test_project/settings.py new file mode 100644 index 0000000000000000000000000000000000000000..d5f18520906f732e2efd660c3c97f4d0b43f29cc --- /dev/null +++ b/test_project/test_project/settings.py @@ -0,0 +1,104 @@ +""" +Django settings for test_project project. + +Generated by 'django-admin startproject' using Django 1.8.5. + +For more information on this file, see +https://docs.djangoproject.com/en/1.8/topics/settings/ + +For the full list of settings and their values, see +https://docs.djangoproject.com/en/1.8/ref/settings/ +""" + +# Build paths inside the project like this: os.path.join(BASE_DIR, ...) +import os + +BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) + + +# Quick-start development settings - unsuitable for production +# See https://docs.djangoproject.com/en/1.8/howto/deployment/checklist/ + +# SECURITY WARNING: keep the secret key used in production secret! +SECRET_KEY = 'hul=ds-wua5*3r+o2k-%&jlleub99q7dot+lb(((v*^-@yk%g7' + +# SECURITY WARNING: don't run with debug turned on in production! +DEBUG = True + +ALLOWED_HOSTS = [] + + +# Application definition + +INSTALLED_APPS = ( + 'django.contrib.admin', + 'django.contrib.auth', + 'django.contrib.contenttypes', + 'django.contrib.sessions', + 'django.contrib.messages', + 'django.contrib.staticfiles', + 'representatives', + 'representatives_votes', +) + +MIDDLEWARE_CLASSES = ( + 'django.contrib.sessions.middleware.SessionMiddleware', + 'django.middleware.common.CommonMiddleware', + 'django.middleware.csrf.CsrfViewMiddleware', + 'django.contrib.auth.middleware.AuthenticationMiddleware', + 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', + 'django.contrib.messages.middleware.MessageMiddleware', + 'django.middleware.clickjacking.XFrameOptionsMiddleware', + 'django.middleware.security.SecurityMiddleware', +) + +ROOT_URLCONF = 'test_project.urls' + +TEMPLATES = [ + { + 'BACKEND': 'django.template.backends.django.DjangoTemplates', + 'DIRS': [], + 'APP_DIRS': True, + 'OPTIONS': { + 'context_processors': [ + 'django.template.context_processors.debug', + 'django.template.context_processors.request', + 'django.contrib.auth.context_processors.auth', + 'django.contrib.messages.context_processors.messages', + ], + }, + }, +] + +WSGI_APPLICATION = 'test_project.wsgi.application' + + +# Database +# https://docs.djangoproject.com/en/1.8/ref/settings/#databases + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), + } +} + + +# Internationalization +# https://docs.djangoproject.com/en/1.8/topics/i18n/ + +LANGUAGE_CODE = 'en-us' + +TIME_ZONE = 'UTC' + +USE_I18N = True + +USE_L10N = True + +USE_TZ = True + + +# Static files (CSS, JavaScript, Images) +# https://docs.djangoproject.com/en/1.8/howto/static-files/ + +STATIC_URL = '/static/' diff --git a/test_project/test_project/urls.py b/test_project/test_project/urls.py new file mode 100644 index 0000000000000000000000000000000000000000..7dc47ea440461eab941518b8e3061d43506f38b9 --- /dev/null +++ b/test_project/test_project/urls.py @@ -0,0 +1,21 @@ +"""test_project URL Configuration + +The `urlpatterns` list routes URLs to views. For more information please see: + https://docs.djangoproject.com/en/1.8/topics/http/urls/ +Examples: +Function views + 1. Add an import: from my_app import views + 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') +Class-based views + 1. Add an import: from other_app.views import Home + 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') +Including another URLconf + 1. Add an import: from blog import urls as blog_urls + 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) +""" +from django.conf.urls import include, url +from django.contrib import admin + +urlpatterns = [ + url(r'^admin/', include(admin.site.urls)), +] diff --git a/test_project/test_project/wsgi.py b/test_project/test_project/wsgi.py new file mode 100644 index 0000000000000000000000000000000000000000..cb26c81145664287d53b3820f8e0c2807cd3826d --- /dev/null +++ b/test_project/test_project/wsgi.py @@ -0,0 +1,16 @@ +""" +WSGI config for test_project project. + +It exposes the WSGI callable as a module-level variable named ``application``. + +For more information on this file, see +https://docs.djangoproject.com/en/1.8/howto/deployment/wsgi/ +""" + +import os + +from django.core.wsgi import get_wsgi_application + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "test_project.settings") + +application = get_wsgi_application()