Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 21, 2011 19:40:33

g.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Sitemap generation problem


I can't find out how to pass corrent location to the sitemap element.
I have declared:
def items(self):
return Category.objects.all()

How can i generate my correct urls from my urlconf file:
url(r'^category/(?P<category>+)/$', 'show_category',
name='show_category'),

I have no idea hot to do that:/

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 22, 2011 15:35:57

u.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Sitemap generation problem


Try something like this:

def location(self, obj):
return reverse('path.to.your.view.function', args=)

and put it into your sitemap.py


On 21. Jan, 20:40 h., galago <prog...@gmail.com> wrote:
> I can't find out how to pass corrent location to the sitemap element.
> I have declared:
> def items(self):
>         return Category.objects.all()
>
> How can i generate my correct urls from my urlconf file:
> url(r'^category/(?P<category>+)/$', 'show_category',
> name='show_category'),
>
> I have no idea hot to do that:/

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 17th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support