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$
^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
import os, site
SITE_ROOT = os.path.realpath(os.path.dirname(__file__))
site.addsitedir(os.path.join(SITE_ROOT, 'openslides'))
try:
from openslides import settings
except ImportError:

View File

@ -1,7 +1,5 @@
VERSION = (1, 2, 0, 'alpha', 0)
from django.template import add_to_builtins
def get_version(version=None):
"""Derives a PEP386-compliant version number from VERSION."""
if version is None:
@ -69,5 +67,7 @@ def hg_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" %}
{% load tags %}
{% load i18n %}
{% block submenu %}
{% url item_overview as url_itemoverview %}

View File

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

View File

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

View File

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

View File

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

View File

@ -1,11 +1,14 @@
{% extends "application/base_application.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Import applications" %} {% endblock %}
{% block content %}
<h1>{%trans "Import applications" %}</h1>
<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.as_p }}
<button class="button" type="submit">

View File

@ -1,6 +1,9 @@
{% extends "application/base_application.html" %}
{% block title %}{{ block.super }} - {%trans "Applications" %}{% endblock %}
{% load tags %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Applications" %}{% endblock %}
{% block content %}
<h1>{%trans "Applications" %}</h1>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,4 +1,7 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{{ block.super }} - {%trans "Your Settings" %}{% endblock %}
{% block submenu %}

View File

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

View File

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

View File

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

View File

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

View File

@ -1,9 +1,11 @@
{% load tags %}
{% load i18n %}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
{% load tags %}
<title>{% block title %}{% get_config 'event_name' %}{% endblock %}</title>
<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" />

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',
]
)