Sai Krishna K  committed d56be46

added custom title

  • Participants
  • Parent commits f729a42

Comments (0)

Files changed (5)

File index/

 	form = about_adminForm,blog_modaladmin),about_Admin),about_Admin)

File index/

 	def __unicode__(self):
 		return 'there can only be on item here edit the same thing :P'
+class title(models.Model):
+	blog_title = models.CharField(max_length=50)
+	def __unicode__(self):
+		return 'there can only be on item here edit the same thing :P'

File index/templates/base_page.html

             <span class="icon-bar"></span>
           <a class="brand" href="#">
-          	<a class="brand" href="/">w4rlock's blog</a>
+          	<a class="brand" href="/">{% load get_title %}{{'x'|get_title}}'s blog</a>
           <div class="nav-collapse">
             <ul class="nav">
 <div class="container" id="page_footer" style="">
-        <p style="color: black">w4rlock's blog</p>
+        <p style="color: black">{% load get_title %}{{'x'|get_title}}'s blog</p>
          <ul id="technologies">
               <li><a href="">Django 1.4</a></li>

File index/templatetags/

Empty file added.

File index/templatetags/

+# this_about = about_model.objects.all()[0]
+from django import template
+from index.models import title as title_model
+register = template.Library()
+def get_title(parser):
+	try:
+		title = title_model.objects.all()[0]
+		this_title = title.blog_title
+	except Exception, e:
+		this_title='No title'
+	return this_title
+# @register.filter
+# def upcomming_count(parser):
+# 	movies_in_theater=movie_theater_status.objects.filter(release_status='D')
+# 	return movies_in_theater.count()