I've only been using django for a few weeks. I had NO prior Python
experience. I've been cracking a couple of hours a day on a site that
aggregates RSS feeds and I've already got it working nicely. I've
played with PHP and Rails before, and django feels to me like it's the
easiest to use. I'm amaz
d is: it will stop working when
> you switch
> to an other database backend.
> but aside from that: what are you trying to archive?
> looks a lot like what the get_or_create() shortcut does...
>
> On Jun 13, 8:42 am, koepked wrote:
>
> > Is it bad practice to rely on
Is it bad practice to rely on db exceptions to indicate an attempt at
writing duplicate values to a "keyed" column? For example, in some
code I'm working on, I have the following:
x = ContentItem(title=e_title)
try:
x.save()
except MySQLError:
x = ContentItem.objects.get(title=e_title)
3 matches
Mail list logo