Re: Adding context data to a TemplateView?

2012-04-22 Thread Buddy Lindsey, Jr.

This should help you out with adding extra context to TemplateView

http://godjango.com/15-class-based-views-part-1-templateview-and-redirectview/

Roy Smith wrote:


I'm using a generic TemplateView (django-1.4), but I want to be able
to add something to the context. Is that possible?

The docs at
https://docs.djangoproject.com/en/1.4/topics/generic-views/#adding-extra-context 


talk about "an extra optional parameter, extra_context", but I don't
get what they're trying to explain. I tried the obvious:

url(r'^about$',
TemplateView.as_view(template_name='legal_ipsum/about.html',
extra_context={'pagename': 'about'})
),

in my urls.py file, but that just raises: "TemplateView() received an
invalid keyword 'extra_context'". What am I missing here?

--
Roy Smith
r...@panix.com 



--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Missing manage.py

2012-04-16 Thread Buddy Lindsey, Jr.
If you are using Django 1.4 check in the application folder of your 
project below your project folder. It should be in there.


Faeez Abd Rahman wrote:


Hi,

I have a problem whenever I create a new project using the start
project command, no manage.py file is created.

I'm using Mac OS X. Thank you in advance

--
You received this message because you are subscribed to the Google
Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.