Skip to content

Commit

Permalink
setup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Agustin Pizarro committed Apr 15, 2012
1 parent a32efa6 commit 5e4e7b1
Show file tree
Hide file tree
Showing 13 changed files with 244 additions and 151 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -3,3 +3,4 @@ env/*
*.sqlite
custom_settings.py
*.kdev4*
env
19 changes: 19 additions & 0 deletions .project
@@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>agora-ciudadana</name>
<comment></comment>
<projects>
<project>agora-ciudadana</project>
</projects>
<buildSpec>
<buildCommand>
<name>org.python.pydev.PyDevBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.python.pydev.pythonNature</nature>
<nature>org.python.pydev.django.djangoNature</nature>
</natures>
</projectDescription>
14 changes: 14 additions & 0 deletions .pydevproject
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<?eclipse-pydev version="1.0"?>

<pydev_project>
<pydev_variables_property name="org.python.pydev.PROJECT_VARIABLE_SUBSTITUTION">
<key>DJANGO_MANAGE_LOCATION</key>
<value>manage.py</value>
</pydev_variables_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_INTERPRETER">Default</pydev_property>
<pydev_property name="org.python.pydev.PYTHON_PROJECT_VERSION">python 2.7</pydev_property>
<pydev_pathproperty name="org.python.pydev.PROJECT_SOURCE_PATH">
<path>/agora-ciudadana</path>
</pydev_pathproperty>
</pydev_project>
22 changes: 22 additions & 0 deletions README
@@ -0,0 +1,22 @@
To work on the project you just need these packages installed on your computer:

python 2.7+
python-virtualenv
python-pip

if all those are installed just 'cd' to the project folder and execute:

mkdir env
virtualenv env
source env/bin/activate
./setup_env.sh


virtualenv will create a python enviroment for this project
./setup_env will download all dependencies and install them locally (no need for root privileges) just for the project

to create the database:
./manage.py syncdb
to test the webapp and then browse to http://localhost:8000
./manage.py runserver 127.0.0.1:8000

Empty file added agora/__init__.py
Empty file.
3 changes: 3 additions & 0 deletions agora/models.py
@@ -0,0 +1,3 @@
from django.db import models

# Create your models here.
16 changes: 16 additions & 0 deletions agora/tests.py
@@ -0,0 +1,16 @@
"""
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""

from django.test import TestCase


class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 always equals 2.
"""
self.assertEqual(1 + 1, 2)
1 change: 1 addition & 0 deletions agora/views.py
@@ -0,0 +1 @@
# Create your views here.
5 changes: 3 additions & 2 deletions settings.py
@@ -1,5 +1,7 @@
# Django settings for votering project.

import os

DEBUG = True
TEMPLATE_DEBUG = DEBUG

Expand Down Expand Up @@ -87,7 +89,6 @@

ROOT_URLCONF = 'urls'

import os
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE_DIRS = (
os.path.join(ROOT_PATH, 'templates'),
Expand All @@ -112,4 +113,4 @@
# settings file
from custom_settings import *
except:
pass
pass
242 changes: 121 additions & 121 deletions templates/base.html
Expand Up @@ -3,128 +3,128 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="telephone=no" name="format-detection">
<link href="{{MEDIA_URL}}favicon.png" rel="icon" type="image/png">
<title>{{ SITE_NAME }} - {% block title %}{% trans "Home" %}{% endblock %}</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<meta content="telephone=no" name="format-detection">
<link href="{{MEDIA_URL}}favicon.png" rel="icon" type="image/png">
<title>{{ SITE_NAME }} - {% block title %}{% trans "Home" %}{% endblock %}</title>
</head>
<body>
<div id="header-wrapper">
<div id="header">
<h1 id="logo">
<a href="{ % url home %}"><span>{{ SITE_NAME }}</span></a>
</h1>
<ul id="main-menu">
<li id="main-menu-vote">
<a href="{ % url main-vote %}">{% trans "Vote" %}</a>
</li>
<li id="main-menu-voting-new">
<a href="{ % url main-vote %}">{% trans "Create Voting" %}</a>
</li>
<li id="main-menu-agora-new">
<a href="{ % url agora-new %}">{% trans "Create Agora" %}</a>
</li>
</ul>
<form id="search-form" action="{ % url search-form %}">
{% csrf_token %}
<input type="text" value="" placeholder="{% trans "Search" %}" name="q"/>
</form>
<ul id="user-menu">
<li id="user-help">
<a href="{ % url user-help %}">{% trans "Help" %}</a>
</li>
{% if not user or not user.is_authenticated %}
<li id="user-register">
<a href="{ % url user-register %}">{% trans "Register" %}</a>
</li>
<li id="user-login">
<a href="{ % url user-login %}">{% trans "Log In" %}</a>
</li>
{% else %}
<li id="user-preferences">
<a href="{ % url user-preferences %}">{{ user.username }}</a>
</li>
{% endif %}
</ul>
<div>
</div>
<div id="sections-wrapper">
<div id="sections">
<ul>
<li id="section-agoras">
<a href="{ % url agora-list %}">{% trans "Agoras" %}</a>
</li>
<li id="section-votings">
<a href="{ % url votings-list %}">{% trans "Votings" %}</a>
</li>
<li id="section-delegates">
<a href="{ % url delegates-list %}">{% trans "Delegates" %}</a>
</li>
</ul>
</div>
</div>
<div id="running-board-wrapper {% block running-board-wrapper-class %} {% endblock %}">
<div id="running-board">
{% block running-board %}
{% endblock %}
</div>
</div>
<div id="content-wrapper">
<div id="content">
<div id="flash-messages">
</div>
{% block content %}
{% endblock %}
</div>
</div>
<div id="footer-wrapper">
<div id="upper-footer">
<div id="footer-discover">
<h5>{% trans "Discover" %}</h5>
<ul>
<li id="footer-about">
<a href="{ % url about %}">{% trans "About" %}</a>
</li>
<li id="footer-libre-software">
<a href="{ % url libre-software %}">{% trans "Libre Software" %}</a>
</li>
<li id="footer-blog">
<a href="{ % url blog %}">{% trans "Blog" %}</a>
</li>
<li id="footer-status">
<a href="{ % url status %}">{% trans "Status" %}</a>
</li>
</ul>
</div>
<div id="header-wrapper">
<div id="header">
<h1 id="logo">
<a href="{% url home %}"><span>{{ SITE_NAME }}</span></a>
</h1>
<ul id="main-menu">
<li id="main-menu-vote">
<a href="{ % url main-vote %}">{% trans "Vote" %}</a>
</li>
<li id="main-menu-voting-new">
<a href="{ % url main-vote %}">{% trans "Create Voting" %}</a>
</li>
<li id="main-menu-agora-new">
<a href="{ % url agora-new %}">{% trans "Create Agora" %}</a>
</li>
</ul>
<form id="search-form" action="{ % url search-form %}">
{% csrf_token %}
<input type="text" value="" placeholder="{% trans "Search" %}" name="q"/>
</form>
<ul id="user-menu">
<li id="user-help">
<a href="{ % url user-help %}">{% trans "Help" %}</a>
</li>
{% if not user or not user.is_authenticated %}
<li id="user-register">
<a href="{ % url user-register %}">{% trans "Register" %}</a>
</li>
<li id="user-login">
<a href="{ % url user-login %}">{% trans "Log In" %}</a>
</li>
{% else %}
<li id="user-preferences">
<a href="{ % url user-preferences %}">{{ user.username }}</a>
</li>
{% endif %}
</ul>
<div>
</div>
<div id="sections-wrapper">
<div id="sections">
<ul>
<li id="section-agoras">
<a href="{ % url agora-list %}">{% trans "Agoras" %}</a>
</li>
<li id="section-votings">
<a href="{ % url votings-list %}">{% trans "Votings" %}</a>
</li>
<li id="section-delegates">
<a href="{ % url delegates-list %}">{% trans "Delegates" %}</a>
</li>
</ul>
</div>
</div>
<div id="running-board-wrapper {% block running-board-wrapper-class %} {% endblock %}">
<div id="running-board">
{% block running-board %}
{% endblock %}
</div>
</div>
<div id="content-wrapper">
<div id="content">
<div id="flash-messages">
</div>
{% block content %}
{% endblock %}
</div>
</div>
<div id="footer-wrapper">
<div id="upper-footer">
<div id="footer-discover">
<h5>{% trans "Discover" %}</h5>
<ul>
<li id="footer-about">
<a href="{ % url about %}">{% trans "About" %}</a>
</li>
<li id="footer-libre-software">
<a href="{ % url libre-software %}">{% trans "Libre Software" %}</a>
</li>
<li id="footer-blog">
<a href="{ % url blog %}">{% trans "Blog" %}</a>
</li>
<li id="footer-status">
<a href="{ % url status %}">{% trans "Status" %}</a>
</li>
</ul>
</div>

<div id="footer-connect">
<h5>{% trans "Connect" %}</h5>
<ul>
<li id="footer-twitter">
<a href="{ % url twitter %}">{% trans "Follow on twitter" %}</a>
</li>
<li id="footer-facebook">
<a href="{ % url twitter %}">{% trans "Follow on facebook" %}</a>
</li>
<li id="footer-contact-and-press">
<a href="{ % url contact-and-press %}">{% trans "Contact & Press" %}</a>
</li>
</ul>
</div>
</div>
<div id="lower-footer">
<ul>
<li id="footer-terms-of-service">
<a href="{ % url terms-of-service %}">{% trans "Terms of Service" %}</a>
</li>
<li id="footer-privacy-policy">
<a href="{ % url privacy-policy %}">{% trans "Privacy Policy" %}</a>
</li>
<li id="footer-security">
<a href="{ % url security %}">{% trans "Security" %}</a>
</li>
</ul>
</div>
</div>
<div id="footer-connect">
<h5>{% trans "Connect" %}</h5>
<ul>
<li id="footer-twitter">
<a href="{ % url twitter %}">{% trans "Follow on twitter" %}</a>
</li>
<li id="footer-facebook">
<a href="{ % url facebook %}">{% trans "Follow on facebook" %}</a>
</li>
<li id="footer-contact-and-press">
<a href="{ % url contact-and-press %}">{% trans "Contact & Press" %}</a>
</li>
</ul>
</div>
</div>
<div id="lower-footer">
<ul>
<li id="footer-terms-of-service">
<a href="{ % url terms-of-service %}">{% trans "Terms of Service" %}</a>
</li>
<li id="footer-privacy-policy">
<a href="{ % url privacy-policy %}">{% trans "Privacy Policy" %}</a>
</li>
<li id="footer-security">
<a href="{ % url security %}">{% trans "Security" %}</a>
</li>
</ul>
</div>
</div>
</body>
</html>
</html>

0 comments on commit 5e4e7b1

Please sign in to comment.