Skip to content

Commit

Permalink
Added django application template.
Browse files Browse the repository at this point in the history
  • Loading branch information
svetlyak40wt committed May 22, 2009
1 parent bfc55bb commit 362b2ca
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
*.pyc
.*.swp
1 change: 0 additions & 1 deletion src/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
from version import __version__
5 changes: 5 additions & 0 deletions src/admin.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.contrib import admin
from models import *

admin.site.register(TestModel)

10 changes: 10 additions & 0 deletions src/models.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
from django.db import models
from django.utils.translation import ugettext_lazy as _

class TestModel( models.Model ):
name = models.CharField( _('Title'), max_length = 40, blank=True)

class Meta:
verbose_name = _('Test model')
verbose_name_plural = _('Test models')

1 change: 1 addition & 0 deletions src/templates/app_template/message.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<h1>Blah</h1>
Empty file added src/templatetags/__init__.py
Empty file.
8 changes: 8 additions & 0 deletions src/templatetags/app_tags.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
from django import template
from django.conf import settings

register = template.Library()

@register.inclusion_tag('app_template/message.html')
def counter(object):
return dict('settings': settings)
5 changes: 5 additions & 0 deletions src/urls.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from django.conf.urls.defaults import *

urlpatterns = patterns('',
(r'^/$', 'django_app_template.views.empty_view'),
)
2 changes: 2 additions & 0 deletions src/views.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
def empty_view(request):
pass

0 comments on commit 362b2ca

Please sign in to comment.