Re: Why is my groundwork in django show up in 404 page?

2012-08-24 Thread Masud Khokhar
Hi Melvyn,

Many thanks for clarifying.

@txshon, I would recommend the same as Melvyn, please file a ticket with
their developers.

Best wishes,
Masud

On 24 August 2012 15:46, Melvyn Sopacua <m.r.sopa...@gmail.com> wrote:

> On 24-8-2012 15:42, Masud Khokhar wrote:
>
> > I have never worked with groundwork before, but it seems like you need
> the
> > newly created app URLs in your urls.py file.
>
> That's what groundwork is supposed to do for you:
> <
> https://github.com/madhusudancs/django-groundwork/blob/master/django-groundwork/management/commands/groundwork.py#L21
> >
>
> @Masud: if you don't get a good answer from users here, you may want to
> file a ticket with them.
> --
> Melvyn Sopacua
>
> --
> 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: Why is my groundwork in django show up in 404 page?

2012-08-24 Thread Masud Khokhar
Hi there,

I have never worked with groundwork before, but it seems like you need the
newly created app URLs in your urls.py file. Something like this at the end
of your urls.py file may work.

urlpatterns += patterns('bookapp.views',
url(r'^book/list/$', 'VIEW_NAME', name='list'),
)


On 24 August 2012 14:30, Sergiy Khohlov  wrote:

> you does not have enabled this in urls.py 
>
> 2012/8/24 txshon :
> > I follow the installation steps online about groundwork
> >
> > I use the command to setup groundwork for my project
> >
> >   python manage.py groundwork bookapp Book
> >
> > However, I go to the page
> >
> > http://127.0.0.1:8000/bookapp/book/list/
> >
> > it show up 404 error
> >
> > this is the information on that page
> >
> > Page not found (404)Request Method:GETRequest
> > URL:http://127.0.0.1:8000/bookapp/book/list/
> > Using the URLconf defined in BOOKMS.urls, Django tried these URL
> patterns,
> > in this order:
> >
> > ^admin/doc/
> > ^admin/
> >
> > The current URL, bookapp/book/list/, didn't match any of these.
> >
> > Please help... Thank you
> >
> > @txshon
> >
> > --
> > 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.
>
>

-- 
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: Passing a dict to default page_not_found view

2012-07-21 Thread Masud Khokhar
Hi Russell,

Many thanks for your reply. The template tag approach looks good and I will
try to use this one.

One further question. If I am using the @register.simple_tag decorator, can
I create the view in the views.py file or do I have to create a
templatetags directory and follow the full procedure of creating a tag?

Sorry if this sounds all basic but I am quite new to this.

Thanks a lot in advance.

Best wishes,
Masud

On 21 July 2012 08:52, Russell Keith-Magee <russ...@keith-magee.com> wrote:

> On Sat, Jul 21, 2012 at 10:09 AM, Masud Khokhar <masud.khok...@gmail.com>
> wrote:
> > Hi all,
> >
> > I am using the default 404 view that Django uses. I have created a
> custom 404.html page in my templates directory which automatically gets
> loaded. Is it possible for this page to load a python dictionary or do I
> need to raise http404 myself for that?
> >
> > In essence, what I am trying to do is load a random message in the
> 404.html. There may be a simpler solution for that.
>
> There sure is: Use a template tag instead.
>
>
> https://docs.djangoproject.com/en/1.4/howto/custom-template-tags/#simple-tags
>
> If your custom template tag makes the random call, you don't need to
> put randomly selected text or a randomly selected value into the
> template context.
>
> The template context for the 404 page isn't something that's
> configurable by default, so if you *did* want to go down that path,
> you'd have to write your own 404 view, and set that as your 404
> handler. This isn't especially difficult to do, but the template tag
> approach will be simpler :-)
>
> Yours,
> Russ Magee %-)
>
> --
> 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.



Passing a dict to default page_not_found view

2012-07-20 Thread Masud Khokhar
Hi all,

I am using the default 404 view that Django uses. I have created a custom 
404.html page in my templates directory which automatically gets loaded. Is it 
possible for this page to load a python dictionary or do I need to raise 
http404 myself for that?

In essence, what I am trying to do is load a random message in the 404.html. 
There may be a simpler solution for that.

Many thanks in advance.

Best wishes,
Masud

-- 
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.