Skip to content
This repository was archived by the owner on Jan 22, 2021. It is now read-only.

Hi! I cleaned up your code for you! #35

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Copyright (c) 2008-2009, Nathan Borror
All rights reserved.

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

Redistributions of source code must retain the above copyright notice, this list
of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this
Expand Down
16 changes: 8 additions & 8 deletions basic/blog/templates/admin/blog/post/change_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,19 @@
var content = ''
content += '{% get_inline_types as inline_list %}'
content += '<label>Body inlines:</label>'

content += '<strong>Inline type:</strong> '
content += '<select id="id_inline_content_type" onchange="document.getElementById(\'lookup_id_inline\').href = \'../../../\'+this.value+\'/\';" style="margin-right:20px;">'
content += ' <option>----------</option>'
content += ' {% for inline in inline_list %}'
content += ' <option value="{{ inline.content_type.app_label }}/{{ inline.content_type.model }}">{{ inline.content_type.app_label|capfirst }}: {{ inline.content_type.model|capfirst }}</option>'
content += ' {% endfor %}'
content += '</select> '

content += '<strong>Object:</strong> '
content += '<input type="text" class="vIntegerField" id="id_inline" size="10" /> '
content += '<a id="lookup_id_inline" href="#" class="related-lookup" onclick="if(document.getElementById(\'id_inline_content_type\').value != \'----------\') { return showRelatedObjectLookupPopup(this); }" style="margin-right:20px;"><img src="{% admin_media_prefix %}img/admin/selector-search.gif" width="16" height="16" alt="Loopup" /></a> '

content += '<strong>Class:</strong> '
content += '<select id="id_inline_class">'
content += ' <option value="small_left">Small left</option>'
Expand All @@ -32,25 +32,25 @@
content += ' <option value="large_right">Large right</option>'
content += ' <option value="full">Full</option>'
content += '</select>'

content += '<input type="button" value="Add" style="margin-left:10px;" onclick="return insertInline(document.getElementById(\'id_inline_content_type\').value, document.getElementById(\'id_inline\').value, document.getElementById(\'id_inline_class\').value)" />'
content += '<p class="help">Insert inlines into your body by choosing an inline type, then an object, then a class.</p>'

var div = document.createElement('div');
div.setAttribute('style', 'margin-top:10px;');
div.innerHTML = content;

body_div.insertBefore(div, document.getElementById('id_body').nextSibling);
}

function insertInline(type, id, classname) {
if (type != '----------' && id != '') {
inline = '<inline type="'+type.replace('/', '.')+'" id="'+id+'" class="'+classname+'" />';
body = document.getElementById('id_body');
body.value = body.value + inline + '\n';
}
}

addEvent(window, 'load', InlineInit);
</script>
{% endblock %}
2 changes: 1 addition & 1 deletion basic/blog/templates/blog/post_archive_year.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ <h2>{% trans "Post archive for" %} {{ year }}</h2>
{% endblock %}


{% block content %}
{% block content %}
<ul class="link_list">
{% for month in date_list %}
<li><a href="{% url blog_index %}{{ year }}/{{ month|date:"b" }}/" title="{% trans "View items posted this month" %}">{{ month|date:"F" }}</a></li>
Expand Down
2 changes: 1 addition & 1 deletion basic/blog/templates/blog/post_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ <h3 class="title"><a href="{{ post.get_absolute_url }}" title="{% trans "View th
</div>
{% endfor %}
</div>

{% if is_paginated %}
<p class="pagination">
{% if has_next %}
Expand Down
4 changes: 2 additions & 2 deletions basic/blog/templates/blog/post_search.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ <h2>{% trans "Search" %}</h2>
<input type="submit" class="button" value="{% trans "Search" %}">
</p>
</form>

{% if message %}
<p class="message">{{ message }}</p>
{% endif %}

{% if object_list %}
<div class="post_list">
{% for post in object_list %}
Expand Down
8 changes: 4 additions & 4 deletions basic/books/templates/books/book_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ <h2>Books</h2>
{% load markup %}
<h3>{{ object.full_title }}
{% if object.subtitle %}<em>{{ object.subtitle }}</em>{% endif %}</h3>

{% if object.cover %}
<a class="cover" href="{{ object.amazon_url }}"><img src="{{ object.cover.url }}" alt="Book cover"></a>
{% else %}
<div class="no_cover"></div>
{% endif %}

<ul class="info_list">
<li>Author{{ object.authors.all|pluralize }}: {% for author in object.authors.all %}<a href="{{ author.get_absolute_url }}">{{ author.full_name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</li>
<li>Publisher: <a href="{{ object.publisher.get_absolute_url }}">{{ object.publisher.full_title }}</a></li>
Expand All @@ -29,14 +29,14 @@ <h3>{{ object.full_title }}
<li>Genre: {% for genre in object.genre.all %}{{ genre.title }}{% if not forloop.last %}, {% endif %}{% endfor %}</li>
<li>ISBN: {{ object.isbn }} (<a href="{{ object.amazon_url }}">Amazon</a>)</li>
</ul>

{% if object.description %}
<div class="description">
<h4>Description</h4>
{{ object.description|markdown:"safe" }}
</div>
{% endif %}

{% if object.highlight_set.all %}
<div class="highlights">
<h4>Highlights</h4>
Expand Down
2 changes: 1 addition & 1 deletion basic/comments/templates/comments/form.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load stringutils comments i18n %}

<form action="{% comment_form_target %}" method="post">{% csrf_token %}


{% for field in form %}
{% if field.name == "honeypot" %}
Expand Down
84 changes: 42 additions & 42 deletions basic/groups/fixtures/groups.json
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
[
{
"pk": 1,
"model": "groups.group",
"pk": 1,
"model": "groups.group",
"fields": {
"tease": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"creator": 100,
"is_active": true,
"modified": "2010-07-04 12:37:27",
"created": "2010-07-04 00:33:59",
"invite_only": false,
"title": "Infinite Summer",
"slug": "infinite-summer",
"tease": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.",
"creator": 100,
"is_active": true,
"modified": "2010-07-04 12:37:27",
"created": "2010-07-04 00:33:59",
"invite_only": false,
"title": "Infinite Summer",
"slug": "infinite-summer",
"icon": ""
}
},
},
{
"pk": 1,
"model": "groups.grouppage",
"pk": 1,
"model": "groups.grouppage",
"fields": {
"body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"group": 1,
"created": "2010-07-04 12:37:27",
"title": "About",
"modified": "2010-07-04 12:37:27",
"body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"group": 1,
"created": "2010-07-04 12:37:27",
"title": "About",
"modified": "2010-07-04 12:37:27",
"slug": "about"
}
},
},
{
"pk": 1,
"model": "groups.grouptopic",
"pk": 1,
"model": "groups.grouptopic",
"fields": {
"group": 1,
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"created": "2010-07-04 00:38:12",
"title": "I have a topic to talk about",
"is_active": true,
"modified": "2010-07-04 12:39:12",
"group": 1,
"description": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.",
"created": "2010-07-04 00:38:12",
"title": "I have a topic to talk about",
"is_active": true,
"modified": "2010-07-04 12:39:12",
"user": 100
}
},
},
{
"pk": 1,
"model": "groups.groupmessage",
"pk": 1,
"model": "groups.groupmessage",
"fields": {
"created": "2010-07-04 00:38:17",
"is_active": true,
"modified": "2010-07-04 00:38:17",
"topic": 1,
"user": 100,
"created": "2010-07-04 00:38:17",
"is_active": true,
"modified": "2010-07-04 00:38:17",
"topic": 1,
"user": 100,
"message": "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
}
},
},
{
"pk": 1,
"model": "groups.groupmember",
"pk": 1,
"model": "groups.groupmember",
"fields": {
"status": 0,
"group": 1,
"user": 100,
"modified": "2010-07-04 00:33:59",
"status": 0,
"group": 1,
"user": 100,
"modified": "2010-07-04 00:33:59",
"created": "2010-07-04 00:33:59"
}
}
Expand Down
2 changes: 1 addition & 1 deletion basic/groups/templates/groups/group_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ <h3>All groups</h3>
</ul>
</div>
{% endif %}

{% if user.is_authenticated %}
<p><a class="button" href="{% url groups:create %}?next={{ request.path }}">Start a group</a></p>
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion basic/groups/templates/groups/pages/page_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@

{{ page.body|markdown }}

<p class="byline">Modifed {{ page.modified|timesince }} ago.
<p class="byline">Modifed {{ page.modified|timesince }} ago.
{% if group|is_owner:user %}<a class="edit" href="{% url groups:page_edit group.slug, page.slug %}">Edit</a>{% endif %}</p>
{% endblock %}
2 changes: 1 addition & 1 deletion basic/media/templates/inlines/media_photo.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
{% else %}

<div{% if class %} class="{{ class }}"{% endif %}>
{% for object in object_list %}
{% for object in object_list %}
<p class="photo">
<a href="{% url photo_detail object.slug %}" title="{% trans "View the full image" %}"><img src="{{ settings.MEDIA_URL }}{{ object.photo }}" alt="{{ object }}" /></a>
</p>
Expand Down
2 changes: 1 addition & 1 deletion basic/media/templates/media/video_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ <h2>{{ object.title }}</h2>


{% block content %}

{% endblock %}
6 changes: 3 additions & 3 deletions basic/movies/templates/movies/movie_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ <h2>Movies</h2>
{% load markup %}
<h3>{{ object.full_title }}
{% if object.subtitle %}<em>{{ object.subtitle }}</em></h3>{% endif %}

{% if object.cover %}
<a class="cover" href="{{ object.amazon_url }}"><img src="{{ object.cover_url }}" alt="Movie cover"></a>
{% else %}
<div class="no_cover"></div>
{% endif %}

<ul class="info_list">
<li>Directors: {% for director in object.directors.all %}<a href="{{ director.get_absolute_url }}">{{ director.full_name }}</a>{% if not forloop.last %}, {% endif %}{% endfor %}</li>
<li>Studio: <a href="{{ object.studio.get_absolute_url }}">{{ object.studio.full_title }}</a></li>
<li>Released: {{ object.released|date:"d F Y" }}</li>
<li>Genre: {% for genre in object.genre.all %}{{ genre.title }}{% if not forloop.last %}, {% endif %}{% endfor %}</li>
<li>ASIN: {{ object.asin }} (<a href="{{ object.amazon_url }}">Amazon</a>)</li>
</ul>

{% if object.review %}
<div class="review">
<h4>Review</h4>
Expand Down
12 changes: 6 additions & 6 deletions basic/music/templates/music/album_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,27 +15,27 @@ <h2>Music Albums</h2>
{% load markup %}
<h3>{{ object.full_title }}
<em><a href="{{ object.band.get_absolute_url }}">{{ object.band.full_title }}</a></em></h3>

{% if object.cover %}
<a class="cover" href="{{ object.amazon_url }}"><img src="{{ object.cover_url }}" alt="Album cover"></a>
{% else %}
<div class="no_cover"></div>
{% endif %}

<ul class="info_list">
<li>Label: <a href="{{ object.label.get_absolute_url }}">{{ object.label.full_title }}</a></li>
<li>Released: {{ object.released|date:"d F Y" }}</li>
<li>Genre: {% for genre in object.genre.all %}{{ genre.title }}{% if not forloop.last %}, {% endif %}{% endfor %}</li>
<li>ASIN: {{ object.asin }} (<a href="{{ object.amazon_url }}">Amazon</a>)</li>
</ul>

{% if object.review %}
<div class="review">
<h3>Review</h3>
{{ object.review|markdown:"safe" }}
</div>
{% endif %}

{% if object.band.album_set.all %}
{% ifnotequal object.band.album_set.count 1 %}
<h4>Other albums</h4>
Expand All @@ -48,7 +48,7 @@ <h4>Other albums</h4>
</ul>
{% endifnotequal %}
{% endif %}

{% if object.tracks.all %}
<h4>Mp3's</h4>
<ul>
Expand All @@ -57,5 +57,5 @@ <h4>Mp3's</h4>
{% endfor %}
</ul>
{% endif %}

{% endblock %}
4 changes: 2 additions & 2 deletions basic/music/templates/music/band_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ <h2>Music Bands</h2>

{% block content %}
<h3>{{ object.full_title }} <em><a href="{{ object.website }}">Website</a></em></h3>

{% if object.musicians.all %}
<h4>Members</h4>
<ul class="link_list">
Expand All @@ -22,7 +22,7 @@ <h4>Members</h4>
{% endfor %}
</ul>
{% endif %}

{% if object.album_set.all %}
<h4>Albums</h4>
<ul class="link_list">
Expand Down
2 changes: 1 addition & 1 deletion basic/music/templates/music/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ <h2>Music</h2>
{% endblock %}

{% block content %}

{% endblock %}
Loading