added files for front-end testing

This commit is contained in:
Sanj 2011-02-11 04:34:26 +05:30
parent 4cb2dc8131
commit 1bf0f8f98c
14 changed files with 411 additions and 1 deletions

0
edgware/main/__init__.py Normal file
View File

3
edgware/main/models.py Normal file
View File

@ -0,0 +1,3 @@
from django.db import models
# Create your models here.

23
edgware/main/tests.py Normal file
View File

@ -0,0 +1,23 @@
"""
This file demonstrates two different styles of tests (one doctest and one
unittest). These will both pass when you run "manage.py test".
Replace these 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.failUnlessEqual(1 + 1, 2)
__test__ = {"doctest": """
Another way to test that 1 + 1 is equal to 2.
>>> 1 + 1 == 2
True
"""}

8
edgware/main/views.py Normal file
View File

@ -0,0 +1,8 @@
# Create your views here.
from django.shortcuts import render_to_response
def home(request):
return render_to_response("main/home.html")
def contact(request):
return render_to_response("main/contact.html")

View File

@ -98,6 +98,7 @@ INSTALLED_APPS = (
'django.contrib.admin',
'files',
'editor',
'main',
'tagging',
'django_extensions',
'django.contrib.flatpages',

130
edgware/static/css/main.css Normal file
View File

@ -0,0 +1,130 @@
body, html {
margin: 0px;
padding: 0px;
font-family: "DejaVu Sans", Arial, Verdana, sans-serif;
width: 100%;
height: 100%;
}
h1, h2, h3, h4, p {
margin: 0px;
padding: 0px;
}
#wrapper {
width: 100%;
height: 100%;
}
ul {
list-style-type: none;
}
#header {
width: 100%;
height: 100px;
color: #fff;
background: #684923;
position: relative;
}
#mainTitle {
position: absolute;
left: 100px;
top: 25px;
width: 200px;
}
#mainTitle h1 {
font-size: 20px;
font-weight: bold;
}
#mainTitle h1 a {
color: #fff;
text-decoration: none;
}
#mainTitle h1 a:hover {
color: #ffff00;
}
#pageTitle {
position: absolute;
left: 400px;
top: 25px;
}
#pageTitle h2 {
font-size: 20px;
font-weight: bold;
}
#intro {
position: absolute;
right: 100px;
top: 30px;
}
#intro p {
float: left;
width: 200px;
font-size: 11px;
}
#introPara1 {
margin-right: 15px;
}
#content {
height: 450px;
overflow-y: auto;
}
#footer {
position: absolute;
height: 80px;
bottom: 0px;
width: 100%;
background: #684923;
}
#footer a {
color: #fff;
font-weight: bold;
text-decoration: none;
}
#footer a:hover {
color: #FFC0CB;
}
#nav {
width: 80%;
margin-left: auto;
margin-right: auto;
top: 50px;
}
#footer ul li {
float: left;
margin-right: 30px;
}
#logo {
position: absolute;
bottom: 10px;
right: 10px;
}
#logo a {
color: #fff;
font-size: 18px;
font-weight: bold;
text-decoration: none;
}
#logo a:hover {
color: #000;
}

View File

@ -0,0 +1,34 @@
.centerWrapper {
width: 90%;
margin-left: auto;
margin-right: auto;
padding-top: 15px;
color: #393939;
}
.centerContent {
float: left;
width: 30%;
}
h3 {
font-size: 1.1em;
font-weight: bold;
margin-bottom: 24px;
}
h4 {
font-size: 1.1em;
font-weight: bold;
margin-bottom: 16px;
margin-top: 32px;
}
.centerContent p {
margin-bottom: 10px;
}
.middleContent {
margin-left: 20px;
margin-right: 40px;
}

View File

@ -0,0 +1,19 @@
.centerSentence {
color: #393939;
font-size: 48px;
width: 800px;
height: 350px;
position: relative;
top: 50%;
margin-top: -175px;
margin-left: auto;
margin-right: auto;
}
.centerSentence a {
color: #393939;
}
.centerSentence a:hover {
color: #FF00DB;
}

14
edgware/static/js/main.js Normal file
View File

@ -0,0 +1,14 @@
$(document).ready(function() {
$(window).resize(function() {
var headerHeight = $('#header').height();
var footerHeight = $('#footer').height();
var contentHeight = $(window).height() - (headerHeight + footerHeight);
// alert(contentHeight);
$('#content').css({'height': contentHeight + "px"});
});
$(window).trigger("resize");
});

View File

@ -1,11 +1,13 @@
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="/static/js/jquery.js"></script>
{% block head %}
{% endblock %}
</head>
<body>
{% block content %}
{% block body %}
{% endblock %}

View File

@ -0,0 +1,89 @@
{% extends 'main_base.html' %}
{% block title %} Contact {% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/main/contact.css" />
{% endblock %}
{% block pageTitle %} Contact {% endblock %}
{% block content %}
<div class="centerWrapper">
<div class="centerContent">
<h3>Contact</h3>
<p>
For more information come to <br />
the Centre for Possible Studies <br />
64 Seymour Street <br />
London W1H 5BH <br />
</p>
<p>
+ 44 (0) 20 7298 1535
</p>
<p>
Opening Hours <br />
WednesdaySaturday 25pm
</p>
<p>
Janna Graham, Project Curator <br />
<strong>jannag@serpentinegallery.org</strong>
</p>
<p>
Amal Khalaf, Edgware Road <br />
Project Assistant <br />
<strong>amalk@serpentinegallery.org</strong>
</p>
<p>
Google Map goes here.
</p>
</div>
<div class="centerContent middleContent">
<h3>About</h3>
<p>
<strong>C.A.M.P.</strong> is a Mumbai based collective that
tests the groundcbetween art and the public.
Working with people involved in the infrastruc-
tures of water, cable tv and the internet C.A.M.P.
have created edgwareroad.org, an open pub-
lishing platform for local research to be
distributed as journals, placemats, pamphlets
and webcasts. their residency is a
collaboration with Gasworks and
the Arts Catalyst.
</p>
<p>
<h4>Artists</h4>
CAMP <br />
Susan Hefuna <br />
Lamia Joreige <br />
Hiwa K <br />
no.w.here, with actors Khalid <br />
Abdalla & Cressida Trew <br />
Marwan Rechmaoui <br />
Wael Shawky <br />
Rania Stephan <br />
Ultra-red
</p>
</div>
<div class="centerContent">
<h3>Partners</h3>
<p>
Al Arez, London <br />
Arts Catalyst, London <br />
Church Street Neighbourhood Centre <br />
Cinenova. London <br />
Delfina Foundation, London <br />
Freqout!, London <br />
Gasworks, London <br />
Al Shishawi, London <br />
St. Marylebone School, London <br />
The Showroom Gallery, London <br />
Westminster Academy, London <br />
XTalk, London
</p>
</div>
</div>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends 'main_base.html' %}
{% block title %}
Home
{% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="/static/css/main/home.css" />
{% endblock %}
{% block pageTitle %}
{% endblock %}
{% block content %}
<div class="centerSentence">
Welcome to the <a href="/about">Edgware Road Project</a>.
Here you can create a <a href="/publication">publication</a> or
browse the <a href="/archive">archive</a> of past works
created by the artists involved.
</div>
{% endblock %}

View File

@ -0,0 +1,62 @@
{% extends 'base.html' %}
{% block head %}
<link rel="stylesheet" href="/static/css/main.css" />
<script type="text/javascript" src="/static/js/main.js"></script>
<title>EdgwareRoad: {% block title %} {% endblock %}</title>
{% block extra_head %}
{% endblock %}
{% endblock %}
{% block body %}
<div id="wrapper">
<div id="header">
<div id="mainTitle">
<h1><a href="/" title="Go Home">The Edgware Road Project</a></h1>
</div>
<div id="pageTitle">
<h2>{% block pageTitle %} {% endblock %}</h2>
</div>
<div id="intro">
<p id="introPara1">
Edgware Road.org is a platform for archiving and publishing possible studies about the Edgware Road.
</p>
<p>
It was created by media art collective C.A.M.P. during their residency at the Serpentine Gallery.
</p>
</div>
</div>
<div id="content">
{% block content %} {% endblock %}
</div>
<div id="footer">
<ul id="nav">
<li>
<a href="archive" title="The Edgwareroad.org Archive">Archive</a>
</li>
<li>
<a href="publish" title="Publish!">Publish</a>
</li>
<li> &nbsp;</li>
<li>
<a href="contact" title="Contact Us">About/Contact</a>
</li>
<li>
<a href="faq" title="Frequently Asked Questions">FAQ</a>
</li>
<li> &nbsp;</li>
<li>
<a href="account" title="Login / Sign Up">Login/Sign Up</a>
</li>
<li>
<a href="help" title="Help!">Help</a>
</li>
</ul>
</div>
<div id="logo">
<a href="" title="Serpentine Art Gallery Webpage">Serpentine Art Gallery</a>
</div>
</div>
{% endblock %}

View File

@ -10,6 +10,8 @@ admin.autodiscover()
urlpatterns = patterns('',
# Example:
# (r'^edge/', include('edge.foo.urls')),
(r'^sandbox$', 'main.views.home'),
(r'^sandbox/contact$', 'main.views.contact'),
(r'^$', 'django.views.generic.simple.redirect_to', {'url': '/slider/'}),
(r'^robots.txt(?P<path>)$', 'django.views.static.serve', { 'document_root' : "/home/itf/soc/edgware/static/txt/robots.txt" } ),
# Uncomment the admin/doc line below and add 'django.contrib.admindocs'