Merge lp:~nataliabidart/locolander/add-media into lp:locolander

Proposed by Natalia Bidart
Status: Merged
Approved by: Natalia Bidart
Approved revision: 10
Merged at revision: 5
Proposed branch: lp:~nataliabidart/locolander/add-media
Merge into: lp:locolander
Diff against target: 351 lines (+196/-16)
13 files modified
.bzrignore (+1/-0)
README (+1/-1)
locolander/locolander/settings.py (+9/-0)
locolander/locolanderweb/static/css/reset.css (+47/-0)
locolander/locolanderweb/static/css/style.css (+70/-0)
locolander/locolanderweb/templates/base.html (+29/-1)
locolander/locolanderweb/templates/locolanderweb/home.html (+1/-1)
locolander/locolanderweb/templates/locolanderweb/project/_list.html (+7/-5)
locolander/locolanderweb/templates/locolanderweb/project/add.html (+4/-6)
locolander/locolanderweb/templates/registration/logged_out.html (+6/-0)
locolander/locolanderweb/templates/registration/login.html (+14/-0)
locolander/locolanderweb/urls.py (+6/-1)
locolander/locolanderweb/views.py (+1/-1)
To merge this branch: bzr merge lp:~nataliabidart/locolander/add-media
Reviewer Review Type Date Requested Status
Matias Bordese Approve
Review via email: mp+170910@code.launchpad.net

Commit message

- Added css stylesheets plus some more templates.

To post a comment you must log in.
Revision history for this message
Matias Bordese (matiasb) wrote :

Looks good.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.bzrignore'
--- .bzrignore 1970-01-01 00:00:00 +0000
+++ .bzrignore 2013-06-21 21:42:24 +0000
@@ -0,0 +1,1 @@
1locolander.db
02
=== modified file 'README'
--- README 2013-06-21 01:48:40 +0000
+++ README 2013-06-21 21:42:24 +0000
@@ -2,7 +2,7 @@
2LocoLander2LocoLander
3==========3==========
44
5.. image:: doc/img/locolander.png5.. image:: locolander/locolanderweb/media/locolander.png
66
77
8To Do8To Do
99
=== removed directory 'doc'
=== removed directory 'doc/img'
=== modified file 'locolander/locolander/settings.py'
--- locolander/locolander/settings.py 2013-06-21 15:34:22 +0000
+++ locolander/locolander/settings.py 2013-06-21 21:42:24 +0000
@@ -1,5 +1,12 @@
1# Django settings for locolander project.1# Django settings for locolander project.
22
3import os
4
5from django.core.urlresolvers import reverse
6
7
8PROJECT_DIR = os.path.abspath(os.path.dirname(__file__))
9
3DEBUG = True10DEBUG = True
4TEMPLATE_DEBUG = DEBUG11TEMPLATE_DEBUG = DEBUG
512
@@ -156,6 +163,8 @@
156 }163 }
157}164}
158165
166LOGIN_URL = reverse('login')
167LOGIN_REDIRECT_URL = reverse('home')
159168
160try:169try:
161 from local_setting import *170 from local_setting import *
162171
=== added directory 'locolander/locolanderweb/static/css'
=== added file 'locolander/locolanderweb/static/css/reset.css'
--- locolander/locolanderweb/static/css/reset.css 1970-01-01 00:00:00 +0000
+++ locolander/locolanderweb/static/css/reset.css 2013-06-21 21:42:24 +0000
@@ -0,0 +1,47 @@
1/**
2 * Eric Meyer's Reset CSS v2.0 (http://meyerweb.com/eric/tools/css/reset/)
3 * http://cssreset.com
4 */
5html, body, div, span, applet, object, iframe,
6h1, h2, h3, h4, h5, h6, p, blockquote, pre,
7a, abbr, acronym, address, big, cite, code,
8del, dfn, em, img, ins, kbd, q, s, samp,
9small, strike, strong, sub, sup, tt, var,
10b, u, i, center,
11dl, dt, dd, ol, ul, li,
12fieldset, form, label, legend,
13table, caption, tbody, tfoot, thead, tr, th, td,
14article, aside, canvas, details, embed,
15figure, figcaption, footer, header, hgroup,
16menu, nav, output, ruby, section, summary,
17time, mark, audio, video {
18 margin: 0;
19 padding: 0;
20 border: 0;
21 font-size: 100%;
22 font: inherit;
23 vertical-align: baseline;
24}
25/* HTML5 display-role reset for older browsers */
26article, aside, details, figcaption, figure,
27footer, header, hgroup, menu, nav, section {
28 display: block;
29}
30body {
31 line-height: 1;
32}
33ol, ul {
34 list-style: none;
35}
36blockquote, q {
37 quotes: none;
38}
39blockquote:before, blockquote:after,
40q:before, q:after {
41 content: '';
42 content: none;
43}
44table {
45 border-collapse: collapse;
46 border-spacing: 0;
47}
048
=== added file 'locolander/locolanderweb/static/css/style.css'
--- locolander/locolanderweb/static/css/style.css 1970-01-01 00:00:00 +0000
+++ locolander/locolanderweb/static/css/style.css 2013-06-21 21:42:24 +0000
@@ -0,0 +1,70 @@
1/* Remove the following once the reset.css is enabled */
2* {
3 margin: 0;
4 padding: 0;
5}
6
7ol, ul {
8 list-style: none;
9}
10
11/* end remove */
12
13#header,
14#content,
15#footer {
16 padding: 10px;
17}
18
19#header {
20 background: #BCBCBC;
21}
22
23#nav {
24 float: right;
25 padding: 5px;
26}
27
28#nav li {
29 display: inline;
30 padding: 5px;
31}
32
33a {
34 color: black;
35 text-decoration: none;
36}
37
38.errorlist {
39 color: red;
40 float: right;
41 padding: 5px;
42}
43
44#messages .message {
45 padding: 10px;
46 margin: 10px;
47 font-size: larger;
48}
49
50#messages .message.info,
51#messages .message.success {
52 background: #66cc66;
53 border: solid green 1px;
54}
55
56#messages .message.warning {
57 background: #ffff88;
58 border: solid #ffff00 1px;
59}
60
61#messages .message.error {
62 background: #FF4545;
63 border: solid red 1px;
64}
65
66.actions {
67 padding: 10px;
68 margin-top: 10px;
69 border-top: dotted grey 1px;
70}
071
=== added directory 'locolander/locolanderweb/static/images'
=== renamed file 'doc/img/locolander.png' => 'locolander/locolanderweb/static/images/locolander.png'
=== modified file 'locolander/locolanderweb/templates/base.html'
--- locolander/locolanderweb/templates/base.html 2013-06-21 15:34:22 +0000
+++ locolander/locolanderweb/templates/base.html 2013-06-21 21:42:24 +0000
@@ -1,13 +1,41 @@
1{% load staticfiles %}
2
1<html>3<html>
2 <head>4 <head>
3 <title>{% block html-title %}Loco Lander{% endblock html-title %}</title>5 <title>{% block html-title %}Loco Lander{% endblock html-title %}</title>
6 {% comment %}
7 <link rel="stylesheet" href="{% static 'css/reset.css' %}" />
8 {% endcomment %}
9 <link rel="stylesheet" href="{% static 'css/style.css' %}" />
4 {% block head-extra %}{% endblock head-extra %}10 {% block head-extra %}{% endblock head-extra %}
5 </head>11 </head>
612
7 <body>13 <body>
14 <div id="header">
15 <a href="{% url 'home'%}">
16 <img src="{% static 'images/locolander.png' %}" width="50px" />
17 </a>
18 <ul id="nav">
19 {% if user.is_authenticated %}
20 <li><a href="{% url 'project-list' %}">Your projects</a></li>
21 <li><a href="{% url 'logout' %}">Logout</a></li>
22 {% else %}
23 <li><a href="{% url 'login' %}">Login</a></li>
24 {% endif %}
25 </div>
26 </div>
827
9 <div id="content">28 <div id="content">
10 {% block content %}{% endblock content %}29 <div id="messages">
30 {% if messages %}
31 <ul>
32 {% for message in messages %}
33 <li class="message {{ message.tags }}">{{ message }}</li>
34 {% endfor %}
35 </ul>
36 {% endif %}
37 </div>
38 {% block content %}{% endblock content %}
11 </div>39 </div>
1240
13 <div id="footer">41 <div id="footer">
1442
=== modified file 'locolander/locolanderweb/templates/locolanderweb/home.html'
--- locolander/locolanderweb/templates/locolanderweb/home.html 2013-06-21 20:34:15 +0000
+++ locolander/locolanderweb/templates/locolanderweb/home.html 2013-06-21 21:42:24 +0000
@@ -1,7 +1,7 @@
1{% extends "base.html" %}1{% extends "base.html" %}
22
3{% block content %}3{% block content %}
4<h1>Welcome!</h1>4<h1>Welcome {{ user.username }}!</h1>
55
6{% include "locolanderweb/project/_list.html" %}6{% include "locolanderweb/project/_list.html" %}
77
88
=== modified file 'locolander/locolanderweb/templates/locolanderweb/project/_list.html'
--- locolander/locolanderweb/templates/locolanderweb/project/_list.html 2013-06-21 20:28:55 +0000
+++ locolander/locolanderweb/templates/locolanderweb/project/_list.html 2013-06-21 21:42:24 +0000
@@ -1,17 +1,19 @@
1<div id="projects">1<div id="projects">
2{% if projects %}2{% if projects %}
3 <h3>Your projects:</h3>3 <h2>Your projects:</h2>
4 <table>4 <table class="project-list">
5 {% for p in projects %}5 {% for p in projects %}
6 <tr>6 <tr>
7 <th>{{ p.name }}</th>7 <th>{{ p.name }}</th>
8 <td>{{ p.url }}</td>8 <td><a href="{{ p.url }}">{{ p.url }}</a></td>
9 </tr>9 </tr>
10 {% endfor %}10 {% endfor %}
11 </table>11 </table>
12{% else %}12{% else %}
13 <h3>No projects.</h3>13 <h2>Currently you have no projects.</h2>
14{% endif %}14{% endif %}
1515
16<a href="{% url 'project-add' %}">Add a new project</a>16 <div class="actions">
17 <a href="{% url 'project-add' %}">Add a new project</a>
18 </div>
17</div>19</div>
1820
=== modified file 'locolander/locolanderweb/templates/locolanderweb/project/add.html'
--- locolander/locolanderweb/templates/locolanderweb/project/add.html 2013-06-21 15:34:22 +0000
+++ locolander/locolanderweb/templates/locolanderweb/project/add.html 2013-06-21 21:42:24 +0000
@@ -6,16 +6,14 @@
6<div id="project-create">6<div id="project-create">
77
8<form action="." method="POST">8<form action="." method="POST">
9 {% csrf_token %}
9 <table>10 <table>
10 {{ form.as_table }}11 {{ form.as_table }}
11 <tr>
12 <td />
13 <td class="text-left">
14 <input type="submit" name="create" value="Add" />
15 </td>
16 </table>12 </table>
13 <div class="actions">
14 <input type="submit" name="create" value="Add" />
15 </div>
17</form>16</form>
1817
19</div>18</div>
20
21{% endblock content %}19{% endblock content %}
2220
=== added directory 'locolander/locolanderweb/templates/registration'
=== added file 'locolander/locolanderweb/templates/registration/logged_out.html'
--- locolander/locolanderweb/templates/registration/logged_out.html 1970-01-01 00:00:00 +0000
+++ locolander/locolanderweb/templates/registration/logged_out.html 2013-06-21 21:42:24 +0000
@@ -0,0 +1,6 @@
1{% extends "base.html" %}
2
3{% block content %}
4<h1>You've been logged out.</h1>
5<p><a href="{% url 'login' %}">Login back again</a></p>
6{% endblock content %}
07
=== added file 'locolander/locolanderweb/templates/registration/login.html'
--- locolander/locolanderweb/templates/registration/login.html 1970-01-01 00:00:00 +0000
+++ locolander/locolanderweb/templates/registration/login.html 2013-06-21 21:42:24 +0000
@@ -0,0 +1,14 @@
1{% extends "base.html" %}
2
3{% block content %}
4<form action="." method="POST">
5 {% csrf_token %}
6 <table id="login">
7 {{ form.as_table }}
8 </table>
9 <div class="actions">
10 <input type="submit" name="login" value="Login">
11 </div>
12 <input type="hidden" name="next" value="{{ next }}" />
13</form>
14{% endblock content %}
015
=== modified file 'locolander/locolanderweb/urls.py'
--- locolander/locolanderweb/urls.py 2013-06-21 15:34:22 +0000
+++ locolander/locolanderweb/urls.py 2013-06-21 21:42:24 +0000
@@ -1,7 +1,12 @@
1from django.conf.urls import patterns, include, url1from django.conf.urls import patterns, include, url
22
3
4urlpatterns = patterns(3urlpatterns = patterns(
4 'django.contrib.auth.views',
5 url(r'^login/$', 'login', name='login'),
6 url(r'^logout/$', 'logout_then_login', name='logout'),
7)
8
9urlpatterns += patterns(
5 'locolanderweb.views',10 'locolanderweb.views',
6 url(r'^$', 'home', name='home'),11 url(r'^$', 'home', name='home'),
7 url(r'^projects/$', 'project_list', name='project-list'),12 url(r'^projects/$', 'project_list', name='project-list'),
813
=== modified file 'locolander/locolanderweb/views.py'
--- locolander/locolanderweb/views.py 2013-06-21 20:34:15 +0000
+++ locolander/locolanderweb/views.py 2013-06-21 21:42:24 +0000
@@ -31,7 +31,7 @@
31 messages.success(request, 'Project %s added.' % project.name)31 messages.success(request, 'Project %s added.' % project.name)
32 return HttpResponseRedirect(reverse('project-list'))32 return HttpResponseRedirect(reverse('project-list'))
3333
34 messages.warning(request, 'Errors!')34 messages.error(request, 'Please correct the errors below.')
35 else:35 else:
36 form = ProjectForm(owner=request.user)36 form = ProjectForm(owner=request.user)
3737

Subscribers

People subscribed via source and target branches

to all changes: