Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
451 additions
and
60 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,6 +1,7 @@ | ||
[run] | ||
source = app_namespace | ||
omit = app_namespace/tests/* | ||
app_namespace/demo/* | ||
|
||
[report] | ||
exclude_lines = | ||
|
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,16 +1,26 @@ | ||
language: python | ||
python: | ||
- "2.6" | ||
- "2.7" | ||
- "3.2" | ||
- "3.3" | ||
- 2.6 | ||
- 2.7 | ||
- 3.2 | ||
- 3.3 | ||
env: | ||
- DJANGO=1.4 | ||
- DJANGO=1.5 | ||
- DJANGO=1.6 | ||
matrix: | ||
exclude: | ||
- python: 3.2 | ||
env: DJANGO=1.4 | ||
- python: 3.3 | ||
env: DJANGO=1.4 | ||
install: | ||
- pip install -U setuptools | ||
- python bootstrap.py | ||
- ./bin/buildout | ||
- ./bin/buildout versions:django=$DJANGO | ||
before_script: | ||
- ./bin/flake8 app_namespace | ||
script: | ||
- ./bin/cover | ||
- ./bin/test-and-cover | ||
after_success: | ||
- ./bin/coveralls |
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 @@ | ||
"""Demo of the app_namespace app""" |
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,3 @@ | ||
""" | ||
demo.application | ||
""" |
33 changes: 33 additions & 0 deletions
33
app_namespace/demo/application/templates/application/template.html
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,33 @@ | ||
<!doctype html> | ||
<html> | ||
<head> | ||
<meta charset="utf-8"> | ||
<meta name="author" content="Fantomas42"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>{% block title %}Django-app-namespace-template-loader{% endblock title %}</title> | ||
{% block style %} | ||
{% endblock style %} | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<div class="row"> | ||
<div class="col-md-12 col-md-offset-0"> | ||
<h1>{% block header %}Header{% endblock header %}</h1> | ||
<p>{% block content %}Content{% endblock content %}</p> | ||
<ul> | ||
{% block list %} | ||
<li> | ||
<code>application:application/template.html</code> | ||
</li> | ||
{% endblock%} | ||
</ul> | ||
<footer> | ||
<p class="text-right"> | ||
{% block footer %}Footer{% endblock footer %} | ||
</p> | ||
</footer> | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
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,3 @@ | ||
""" | ||
demo.application_extension | ||
""" |
14 changes: 14 additions & 0 deletions
14
app_namespace/demo/application_extension/templates/application/template.html
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,14 @@ | ||
{% extends ":application/template.html" %} | ||
|
||
{% block title %}Django-app-namespace-template-loader{% endblock title %} | ||
|
||
{% block header %}Django-app-namespace-loader{% endblock header %} | ||
|
||
{% block content %}This page has been generated by a combination of extend and override of these templates:{% endblock content %} | ||
|
||
{% block list %} | ||
<li> | ||
<code>application_extension:application/template.html</code> | ||
</li> | ||
{{ block.super }} | ||
{% endblock%} |
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,28 @@ | ||
"""Settings for the app_namespace demo""" | ||
import os | ||
|
||
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__)) | ||
|
||
DEBUG = True | ||
TEMPLATE_DEBUG = DEBUG | ||
|
||
STATIC_URL = '/static/' | ||
|
||
SECRET_KEY = 'secret-key' | ||
|
||
ROOT_URLCONF = 'app_namespace.demo.urls' | ||
|
||
TEMPLATE_LOADERS = ( | ||
'app_namespace.Loader', | ||
'django.template.loaders.filesystem.Loader', | ||
'django.template.loaders.app_directories.Loader', | ||
) | ||
|
||
TEMPLATE_DIRS = ( | ||
os.path.join(PROJECT_ROOT, 'templates') | ||
) | ||
|
||
INSTALLED_APPS = ( | ||
'app_namespace.demo.application_extension', | ||
'app_namespace.demo.application' | ||
) |
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,22 @@ | ||
{% extends ":application/template.html" %} | ||
|
||
{% block title %}Demo - {{ block.super }}{% endblock title %} | ||
|
||
{% block style %} | ||
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.1/css/bootstrap.min.css" rel="stylesheet"> | ||
<style type="text/css"> | ||
body { background-color: #eee; } | ||
.container .row div { background-color: white; } | ||
</style> | ||
{% endblock style %} | ||
|
||
{% block list %} | ||
<li> | ||
<code>application/template.html</code> | ||
</li> | ||
{{ block.super }} | ||
{% endblock list %} | ||
|
||
{% block footer %} | ||
Demo made by <a href="https://github.com/Fantomas42">Fantomas42</a>. | ||
{% endblock footer %} |
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,11 @@ | ||
"""Urls for the app_namespace demo""" | ||
from django.conf.urls import url | ||
from django.conf.urls import patterns | ||
from django.views.generic import TemplateView | ||
|
||
|
||
urlpatterns = patterns( | ||
'', | ||
url(r'^$', TemplateView.as_view( | ||
template_name='application/template.html')), | ||
) |
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
Oops, something went wrong.