On 15 Apr, 00:05, fizban <[EMAIL PROTECTED]> wrote:
>
> I have finally solved my problem re-writing "myview":
>
> def myview(request, **kwargs):
>
> extra_context = {
> 'year': kwargs['year'],
> 'month': kwargs['month'],
> 'day':
On 14 Apr, 20:43, fizban <[EMAIL PROTECTED]> wrote:
> So there must be something wrong in the way I pass data to myview
> (it's either year/month/day/slug/ or the queryset). The queryset
> itself, however is setup right because it works when I use
> 'object_detail' instead of myview. Same goes
On 14 Apr, 19:33, "Norman Harman" <[EMAIL PROTECTED]> wrote:
>
> myview should be in the views.py of your app. The urlpatterns above is
> pointing to some django views file. You shouldn't edit the django
> source if you can avoid it.
myview resides in views.py and I'm importing it correctly
fizban wrote:
>
> On 14 Apr, 16:54, "Norman Harman" <[EMAIL PROTECTED]> wrote:
>
>> Why don't you use the extra_context parameter to generic views? Or am I
>> misunderstanding what you are trying to do?
>>
>> def myview(request):
>>context = dict()
>>context["my_custom_var"] = "wwgd"
On 14 Apr, 16:54, "Norman Harman" <[EMAIL PROTECTED]> wrote:
> Why don't you use the extra_context parameter to generic views? Or am I
> misunderstanding what you are trying to do?
>
> def myview(request):
> context = dict()
> context["my_custom_var"] = "wwgd"
> return
Why don't you use the extra_context parameter to generic views? Or am I
misunderstanding what you are trying to do?
def myview(request):
context = dict()
context["my_custom_var"] = "wwgd"
return generic_view(request, extra_context = context, bla=blah,...)
--
Norman J. Harman Jr.
I mean: ok I can use the {% with %} tag, but why do I have to parse
some object's date (one or more time doesn't really matter) if the
view has those variables already set up (gets them from the urlconf)?
I don't know, it doesn't probably matter at all on performance, but
I'm used to avoid any
On 14 Apr, 11:48, "James Bennett" <[EMAIL PROTECTED]> wrote:
> On Mon, Apr 14, 2008 at 4:41 AM, fizban <[EMAIL PROTECTED]> wrote:
> > In fact by default it only returns "object" (or the
> > template_object_name name you pass), but I need it to return "year",
> > "month" and "day" too. This is
On Mon, Apr 14, 2008 at 4:41 AM, fizban <[EMAIL PROTECTED]> wrote:
> In fact by default it only returns "object" (or the
> template_object_name name you pass), but I need it to return "year",
> "month" and "day" too. This is because in my *_detail.html template
> I'd have to keep on
Hello,
I'm trying to extend django.views.generic.date_based (specifically
object_detail). The goal is to make it return more context variables
(is that how they are called?) then it is supposed to return.
In fact by default it only returns "object" (or the
template_object_name name you pass),
10 matches
Mail list logo