never mind...i found my error after i got th pydev debugger to work
with django. I didn't know that i was getting the whole object...i was
under the impression i was just getting the primary key.
i have to say django is really neat!!
jake, thx for your help
greets
stephane
--~--~-~
this is my bullet class in models.py:
class Bullet(models.Model):
id_bullet = models.AutoField(primary_key=True)
content = models.TextField(help_text="Text field to enter
content")
fk_day = models.ForeignKey(Day, help_text="Day the entry belongs
to")
fk_rubric = models.ForeignKey(
hi rufman,
Rufman wrote:
> def get_absolute_url(self):
> return
> urlresolvers.reverse('pyOrganize.pyworkbook.views.bullet.viewBullets',
> kwargs={'day_id': self.fk_day,
> 'rubric_id': self.fk_rubric})
just a guess - if self.fk_day is a ForeignKey
> I'd strongly recommend you to form your url in models.py. Create a
> function to your bullet class named get_absolute_url() and call it in
> template Today
this is my function:
def get_absolute_url(self):
return
urlresolvers.reverse('pyOrganize.pyworkbook.views.bullet.viewBullets',
I tried both methods and what i found out was that im getting an empty
link...how can that happen i.e how can i fix the problem?
thx for your help
On Aug 28, 8:13 am, Rufman <[EMAIL PROTECTED]> wrote:
> >http://www.djangoproject.com/documentation/templates/#url
>
> I tried that already...but its
>
> http://www.djangoproject.com/documentation/templates/#url
I tried that already...but its not working for me...or i just don't
know whats happening. I always get a link to the current page. i.e the
page links to itself. i can't seem to find more documentation to the
url tag, so that i could s
On 8/27/07, Rufman <[EMAIL PROTECTED]> wrote:
> Does anyone have an idea how i can get the day_id and rubric_id in a
> link, if they are not attributes of the model that is being displayed?
> (if i were hard coding with PHP i would just make them get or post
> parameters)
http://www.djangoproject
> i want to make a link in my template dynamic. e.g. I want to click on
> a "rubric" that links to a view that displays all the content. I have
> the following URL patterns to reach the rubric: /rubric/view and to
> reach the content /bullet///view --> the link i
> need in the template that rende
hey
i want to make a link in my template dynamic. e.g. I want to click on
a "rubric" that links to a view that displays all the content. I have
the following URL patterns to reach the rubric: /rubric/view and to
reach the content /bullet///view --> the link i
need in the template that renders th
9 matches
Mail list logo