Permalink
Browse files

setup docs

  • Loading branch information...
1 parent a32efa6 commit 5e4e7b18ee1feea5285f2006cf6dbcf0708dead8 Agustin Pizarro committed Apr 15, 2012
Showing with 244 additions and 151 deletions.
  1. +1 −0 .gitignore
  2. +19 −0 .project
  3. +14 −0 .pydevproject
  4. +22 −0 README
  5. 0 agora/__init__.py
  6. +3 −0 agora/models.py
  7. +16 −0 agora/tests.py
  8. +1 −0 agora/views.py
  9. +3 −2 settings.py
  10. +121 −121 templates/base.html
  11. +27 −27 templates/home_loggedin.html
  12. +6 −0 urls.py
  13. +11 −1 views.py
View
@@ -3,3 +3,4 @@ env/*
*.sqlite
custom_settings.py
*.kdev4*
+env
View
@@ -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>
View
@@ -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>
View
@@ -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
+
View
No changes.
View
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
View
@@ -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)
View
@@ -0,0 +1 @@
+# Create your views here.
View
@@ -1,5 +1,7 @@
# Django settings for votering project.
+import os
+
DEBUG = True
TEMPLATE_DEBUG = DEBUG
@@ -87,7 +89,6 @@
ROOT_URLCONF = 'urls'
-import os
ROOT_PATH = os.path.dirname(__file__)
TEMPLATE_DIRS = (
os.path.join(ROOT_PATH, 'templates'),
@@ -112,4 +113,4 @@
# settings file
from custom_settings import *
except:
- pass
+ pass
View
@@ -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>
Oops, something went wrong.

0 comments on commit 5e4e7b1

Please sign in to comment.