create setup.py to install openslides

This commit is contained in:
Oskar Hahn 2012-02-09 16:57:10 +01:00
parent 21a13b4d1a
commit 6498095e2b
33 changed files with 136 additions and 32 deletions

View File

@ -7,3 +7,8 @@
~$ ~$
\.DS_Store$ \.DS_Store$
^docs/_build ^docs/_build
^dist/
^versiontools
syntax:glob
*.egg-info

10
MANIFEST.in Normal file
View File

@ -0,0 +1,10 @@
include AUTHORS
include LICENSE
include INSTALL
include CHANGELOG
include initial_data.json
include manage.py
include THANKS
recursive-include openslides/static *
recursive-include openslides/locale *.mo *.po
recursive-include openslides *.html

View File

@ -12,12 +12,6 @@
from django.core.management import execute_manager from django.core.management import execute_manager
import os, site
SITE_ROOT = os.path.realpath(os.path.dirname(__file__))
site.addsitedir(os.path.join(SITE_ROOT, 'openslides'))
try: try:
from openslides import settings from openslides import settings
except ImportError: except ImportError:

View File

@ -1,7 +1,5 @@
VERSION = (1, 2, 0, 'alpha', 0) VERSION = (1, 2, 0, 'alpha', 0)
from django.template import add_to_builtins
def get_version(version=None): def get_version(version=None):
"""Derives a PEP386-compliant version number from VERSION.""" """Derives a PEP386-compliant version number from VERSION."""
if version is None: if version is None:
@ -69,5 +67,7 @@ def hg_version():
return version return version
import os, site
add_to_builtins('django.templatetags.i18n') SITE_ROOT = os.path.realpath(os.path.dirname(__file__))
site.addsitedir(SITE_ROOT)

View File

@ -1,5 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block submenu %} {% block submenu %}
{% url item_overview as url_itemoverview %} {% url item_overview as url_itemoverview %}

View File

@ -1,4 +1,7 @@
{% extends "agenda/base_agenda.html" %} {% extends "agenda/base_agenda.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Item" %}{% endblock %} {% block title %}{{ block.super }} - {%trans "Item" %}{% endblock %}
{% block content %} {% block content %}

View File

@ -1,5 +1,8 @@
{% extends "agenda/base_agenda.html" %} {% extends "agenda/base_agenda.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Agenda" %}{% endblock %} {% block title %}{{ block.super }} - {% trans "Agenda" %}{% endblock %}
{% block header %} {% block header %}

View File

@ -1,5 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block submenu %} {% block submenu %}
{% url application_overview as url_applicationoverview %} {% url application_overview as url_applicationoverview %}

View File

@ -1,4 +1,8 @@
{% extends "application/base_application.html" %} {% extends "application/base_application.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Application" %}{% endblock %} {% block title %}{{ block.super }} - {%trans "Application" %}{% endblock %}
{% block content %} {% block content %}

View File

@ -1,11 +1,14 @@
{% extends "application/base_application.html" %} {% extends "application/base_application.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Import applications" %} {% endblock %} {% block title %}{{ block.super }} - {%trans "Import applications" %} {% endblock %}
{% block content %} {% block content %}
<h1>{%trans "Import applications" %}</h1> <h1>{%trans "Import applications" %}</h1>
<p>{% trans 'Select a CSV file to import applications!' %}</p> <p>{% trans 'Select a CSV file to import applications!' %}</p>
<p>{% trans '(Required comma separated values: <code>number, title, text, reason, first_name, last_name</code> - <code>number</code> and <code>reason</code> are optional and may be empty)' %} </p> <p>{% trans '(Required comma separated values: <code>number, title, text, reason, first_name, last_name</code> - <code>number</code> and <code>reason</code> are optional and may be empty)' %} </p>
<form enctype="multipart/form-data" action="" method="post">{% csrf_token %} <form enctype="multipart/form-data" action="" method="post">{% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<button class="button" type="submit"> <button class="button" type="submit">

View File

@ -1,6 +1,9 @@
{% extends "application/base_application.html" %} {% extends "application/base_application.html" %}
{% block title %}{{ block.super }} - {%trans "Applications" %}{% endblock %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Applications" %}{% endblock %}
{% block content %} {% block content %}
<h1>{%trans "Applications" %}</h1> <h1>{%trans "Applications" %}</h1>
@ -13,7 +16,7 @@
<input type="checkbox" name="number" onchange="document.forms['filter'].submit()" <input type="checkbox" name="number" onchange="document.forms['filter'].submit()"
{% if 'on' in request.GET.number %}checked{% endif %}> {%trans "Without number" %} &nbsp; {% if 'on' in request.GET.number %}checked{% endif %}> {%trans "Without number" %} &nbsp;
<input type="checkbox" name="status" onchange="document.forms['filter'].submit()" <input type="checkbox" name="status" onchange="document.forms['filter'].submit()"
{% if 'on' in request.GET.status %}checked{% endif %}> {%trans "Status" %}: {% if 'on' in request.GET.status %}checked{% endif %}> {%trans "Status" %}:
<select class="default-input" name="statusvalue" onchange="{% if 'on' in request.GET.status %}document.forms['filter'].submit(){% endif %}"> <select class="default-input" name="statusvalue" onchange="{% if 'on' in request.GET.status %}document.forms['filter'].submit(){% endif %}">
<option value="pub" {% if 'pub' in request.GET.statusvalue %}selected{% endif %}>{%trans "Not yet permitted" %}</option> <option value="pub" {% if 'pub' in request.GET.statusvalue %}selected{% endif %}>{%trans "Not yet permitted" %}</option>
<option value="per" {% if 'on' in request.GET.status and 'per' in request.GET.statusvalue %}selected{% endif %}>{%trans "Permitted" %}</option> <option value="per" {% if 'on' in request.GET.status and 'per' in request.GET.statusvalue %}selected{% endif %}>{%trans "Permitted" %}</option>

View File

@ -1,4 +1,7 @@
{% extends 'application/base_application.html' %} {% extends 'application/base_application.html' %}
{% load i18n %}
{% block title %}{{ block.super }} - {{ poll }}{% endblock %} {% block title %}{{ block.super }} - {{ poll }}{% endblock %}
{% if perms.application.can_manage_application %} {% if perms.application.can_manage_application %}

View File

@ -1,6 +1,10 @@
{% extends "application/base_application.html" %} {% extends "application/base_application.html" %}
{% block title %}{{ block.super }} - {% trans "Application" %} "{{ version.title }}"{% endblock %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Application" %} "{{ version.title }}"{% endblock %}
{% block content %} {% block content %}
<div id="sidebar"> <div id="sidebar">

View File

@ -1,5 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block header %} {% block header %}
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/assignment.css" /> <link type="text/css" rel="stylesheet" media="all" href="/static/styles/assignment.css" />

View File

@ -1,4 +1,7 @@
{% extends "assignment/base_assignment.html" %} {% extends "assignment/base_assignment.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Election" %}{% endblock %} {% block title %}{{ block.super }} - {%trans "Election" %}{% endblock %}
{% block content %} {% block content %}

View File

@ -1,4 +1,8 @@
{% extends "assignment/base_assignment.html" %} {% extends "assignment/base_assignment.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Elections" %}{% endblock %} {% block title %}{{ block.super }} - {%trans "Elections" %}{% endblock %}
{% block content %} {% block content %}

View File

@ -1,4 +1,7 @@
{% extends 'assignment/base_assignment.html' %} {% extends 'assignment/base_assignment.html' %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Poll" %} "{{ poll }}"{% endblock %} {% block title %}{{ block.super }} - {%trans "Poll" %} "{{ poll }}"{% endblock %}
{% block content %} {% block content %}

View File

@ -1,4 +1,8 @@
{% extends "assignment/base_assignment.html" %} {% extends "assignment/base_assignment.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {% trans "Assignment" %} "{{ assignment }}"{% endblock %} {% block title %}{{ block.super }} - {% trans "Assignment" %} "{{ assignment }}"{% endblock %}
{% block content %} {% block content %}

View File

@ -19,8 +19,9 @@ TEMPLATE_DEBUG = DEBUG
AUTH_PROFILE_MODULE = 'participant.Profile' AUTH_PROFILE_MODULE = 'participant.Profile'
AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'openslides.system.auth.AnonymousAuth',) AUTHENTICATION_BACKENDS = ('django.contrib.auth.backends.ModelBackend', 'openslides.system.auth.AnonymousAuth',)
LOGIN_URL = '/login/' LOGIN_URL = '/login/'
LOGIN_REDIRECT_URL = '/agenda/' LOGIN_REDIRECT_URL = '/'
ADMINS = ( ADMINS = (
# ('Your Name', 'your_email@domain.com'), # ('Your Name', 'your_email@domain.com'),

View File

@ -1,5 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block submenu %} {% block submenu %}
{% url user_overview as url_users %} {% url user_overview as url_users %}

View File

@ -1,4 +1,7 @@
{% extends "participant/base_participant.html" %} {% extends "participant/base_participant.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Participant" %} {% endblock %} {% block title %}{{ block.super }} - {%trans "Participant" %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,4 +1,7 @@
{% extends "participant/base_participant.html" %} {% extends "participant/base_participant.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "User Group" %} {% endblock %} {% block title %}{{ block.super }} - {%trans "User Group" %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,4 +1,7 @@
{% extends "participant/base_participant.html" %} {% extends "participant/base_participant.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Groups" %}{% endblock %} {% block title %}{{ block.super }} - {%trans "Groups" %}{% endblock %}
{% block content %} {% block content %}

View File

@ -1,4 +1,7 @@
{% extends "participant/base_participant.html" %} {% extends "participant/base_participant.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Import participants" %} {% endblock %} {% block title %}{{ block.super }} - {%trans "Import participants" %} {% endblock %}
{% block content %} {% block content %}

View File

@ -1,14 +1,13 @@
{% extends "participant/base_participant.html" %} {% extends "participant/base_participant.html" %}
{% load i18n %}
{% block mainmenu %} {% block mainmenu %}
<ul> <ul>
<li class="selected"><a href="{% url user_login %}" title="">{%trans "Login" %}</a></li> <li class="selected"><a href="{% url user_login %}" title="">{%trans "Login" %}</a></li>
</ul> </ul>
{% endblock %} {% endblock %}
{% block submenu %}
{% endblock %}
{% block content %} {% block content %}
<h1>{%trans "Login" %}</h1> <h1>{%trans "Login" %}</h1>

View File

@ -1,4 +1,7 @@
{% extends "participant/base_participant.html" %} {% extends "participant/base_participant.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Participants" %}{% endblock %} {% block title %}{{ block.super }} - {%trans "Participants" %}{% endblock %}
{% block content %} {% block content %}

View File

@ -1,4 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Your Settings" %}{% endblock %} {% block title %}{{ block.super }} - {%trans "Your Settings" %}{% endblock %}
{% block submenu %} {% block submenu %}
@ -10,7 +13,7 @@
<form action="" method="post">{% csrf_token %} <form action="" method="post">{% csrf_token %}
{{ form_user.as_p }} {{ form_user.as_p }}
{{ form_password.as_p }} {{ form_password.as_p }}
<button class="button" type="submit"> <button class="button" type="submit">
<span class="icon ok">{%trans 'Save' %}</span> <span class="icon ok">{%trans 'Save' %}</span>
</button> </button>
@ -21,4 +24,4 @@
</a> </a>
</form> </form>
<p></p> <p></p>
{% endblock %} {% endblock %}

View File

@ -1,5 +1,8 @@
{% extends "base-projector.html" %} {% extends "base-projector.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block content %} {% block content %}
<h1>{% get_config 'event_name' %}</h1> <h1>{% get_config 'event_name' %}</h1>
{% get_config 'event_description' %} {% get_config 'event_description' %}

View File

@ -1,9 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block submenu %}
{% endblock %}
{% block content %} {% block content %}
<h1>{{ error }}</h1> <h1>{{ error }}</h1>

View File

@ -1,9 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block submenu %}
{% endblock %}
{% block content %} {% block content %}
<h1>{%trans "Page not found."%}</h1> <h1>{%trans "Page not found."%}</h1>

View File

@ -1,9 +1,7 @@
{% extends "base.html" %} {% extends "base.html" %}
{% load tags %} {% load tags %}
{% load i18n %}
{% block submenu %}
{% endblock %}
{% block content %} {% block content %}
<h1>{%trans "Server Error"%}</h1> <h1>{%trans "Server Error"%}</h1>

View File

@ -1,9 +1,11 @@
{% load tags %}
{% load i18n %}
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head> <head>
{% load tags %}
<title>{% block title %}{% get_config 'event_name' %}{% endblock %}</title> <title>{% block title %}{% get_config 'event_name' %}{% endblock %}</title>
<link type="text/css" rel="stylesheet" media="all" href="/static/styles/base.css" /> <link type="text/css" rel="stylesheet" media="all" href="/static/styles/base.css" />
<link rel="shortcut icon" href="/static/images/favicon.png" type="image/png" /> <link rel="shortcut icon" href="/static/images/favicon.png" type="image/png" />

33
setup.py Normal file
View File

@ -0,0 +1,33 @@
from setuptools import setup
from setuptools import find_packages
from openslides import get_version
setup(
name='openslides',
description='Presentation-System',
version=get_version(),
url='http://openslides.org',
author='OpenSlides-Team',
author_email='support@openslides.org',
license='GPL2+',
packages=find_packages(),
include_package_data = True,
classifiers = [
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environment',
'Intended Audience :: Other Audience',
'Framework :: Django',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Operating System :: OS Independent',
'Programming Language :: Python',
],
setup_requires=[
'versiontools >= 1.6',
],
install_requires=[
'django >= 1.3',
'reportlab',
'pil',
]
)