Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from worthwhile/feat/improved-preview
Improved the preview list and related functionality
- Loading branch information
Showing
7 changed files
with
49 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,26 @@ | ||
{% for index, name, types in notifications %} | ||
{{ name }} ({% for type in types %}<a href="{% url 'herald_preview' index type %}">{{ type }}</a>{% if not forloop.last %}, {% endif %}{% endfor %})<br/> | ||
{% endfor %} | ||
<style> | ||
table { | ||
width:100%; | ||
} | ||
|
||
th { | ||
text-align: left; | ||
} | ||
</style> | ||
|
||
<h1>Notification Preview</h1> | ||
|
||
<table> | ||
<tr> | ||
<th>Name</th> | ||
<th>Preview Link(s)</th> | ||
<th>Bases</th> | ||
</tr> | ||
{% for index, name, types, bases in notifications %} | ||
<tr> | ||
<td>{{ name }}</td> | ||
<td>{% for type in types %}<a href="{% url 'herald_preview' index type %}">{{ type }}</a>{% if not forloop.last %}, {% endif %}{% endfor %} </td> | ||
<td>{% for base in bases %}{{ base }}{% if not forloop.last %}, {% endif %}{% endfor %}</td> | ||
</tr> | ||
{% endfor %} | ||
</table> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/usr/bin/env python | ||
import os, sys | ||
sys.path.append(os.path.join(os.path.dirname(__file__), 'herald')) | ||
os.environ['DJANGO_SETTINGS_MODULE'] = 'tests.settings' | ||
from django.core import management | ||
if __name__ == "__main__": | ||
management.execute_from_command_line() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,6 +28,8 @@ | |
|
||
ROOT_URLCONF = 'tests.urls' | ||
|
||
DEBUG = True | ||
|
||
USE_TZ = True | ||
|
||
SECRET_KEY = 'foobar' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters