why create and get_or_create can't use id to set foerign key ?
for example I can't write like below:
Star.objects.get_or_create(user=request.user,title_id=title_id)
I have to write like this:
try:
Star.objects.get(user=request.user,title=title_id)
except Star.DoesNotExist:
On 9/23/07, Tristan King <[EMAIL PROTECTED]> wrote:
>
> you were close :)
> "return unicode(self)" instead
Almost. That alone would also end on and infinite loop on CPython.
This is directly from django.db.models.Model:
def __str__(self):
if hasattr(self, '__unicode__'):
you were close :)
"return unicode(self)" instead
i've attached a test file to the bug i submitted at:
https://sourceforge.net/tracker/index.php?func=detail=1800378_id=12867=112867
On Sun, 2007-09-23 at 12:55 -0700, Charlie Groves wrote:
> Hi Tristan,
>
> Would you mind coming up with a small
Deryck Hodge said the following:
> Another use case to consider:
>
> {{ MEDIA_URL }}{{ photo.get_absolute_url }}
>
> No way to avoid an extra slash if your get_absolute_url begins with a
> slash, which is common. I'm not passionate about what we recommend,
> but just wanted to remind that
That is really good. Thanks :)
On Sep 19, 1:44 pm, Ned Batchelder <[EMAIL PROTECTED]> wrote:
> I agree that a favicon is one of those fit-and-finish touches that helps
> complete a website. Attached are my attempts. I agree with Todd that
> "dj" is a better reminder of Django, and the color
On 9/21/07, msaelices <[EMAIL PROTECTED]> wrote:
>
> The problem is the [[TOC]] proccessor situated on top:
>
> http://code.djangoproject.com/wiki/Tutorials
Works for me (now).
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the