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)
On Fri, Jun 12, 2009 at 3:53 PM, Robocop wrote:
>
> I'm having an issue when traversing a link on my site. When clicking
> this link, I'm properly routed to the page, however the user i am
> logged in as is logged out for no reason.
How are you determining that the user is logged out?
> The
i have a django application with flex as front end, i am using
amfgateway for it.
i have a fortran executable file which will create a new file called
predict.dat(say) it will take two input files(input.dat, test) under
my project directory.
my code is like this
os.system("/home/me/mypro/s_test")
i am trying to implement a save function on a model class that inherits from
an abstract base class. what i am trying to do is set the field in the base
class only if it isn't already set.
i have the following:
class Base(models.Model):
attribute = models.ForeignKey('Attribute', db_index=Tru
Max,
Just from glancing over the options you have below none of them looked
particularly good to me. The first is only a file field so depending on what
you are doing it may not work for you. The second seemed reasonable but has
no options for setting things like http headers for files or more adv
Hello,
I want to use Amazon S3 for file uploads from users
(models.FileField). I have been searching and have come across these
three plugins/examples to use S3 with django...
http://code.djangoproject.com/wiki/AmazonSimpleStorageService
http://www.sourceguru.net/archives/177
http://code.welldev
On Fri, Jun 12, 2009 at 7:07 PM, Kenneth
Gonsalves wrote:
> I always set it for VirtualHost - AFAIK the docs say to do so.
No.
The docs say to set it to the prefix under which the site is being
served. If the site is located at the root of the server -- e.g., "/"
-- then it is not being served u
On Saturday 13 June 2009 05:37:56 Kenneth Gonsalves wrote:
> > Commenting out that line solved the problem. We're using
> > a VirtualHost definition, so it seems django.root should
> > not be set for a VirtualHost.
>
> I always set it for VirtualHost - AFAIK the docs say to do so.
to clarify, I h
On Friday 12 June 2009 18:35:33 Lars Stavholm wrote:
> > Notice the Request URL, there's a slash missing,
> > something along the way removed the slash.
> >
> > If I try http://mbf//jobs, I end up at the right place.
> >
> > Can anyone tell me what it is that is removing that slash?
>
> Found the
Can you post the model as well?
2009/6/12 Brandon Taylor
>
> Hi Everyone,
>
> I'm using Django trunk, Python 2.6.
>
> I have a model form with a FileField. The relevant portions of the
> HTML are:
>
> enctype="multipart/form-data">
>{{ job_seeker_form.resume }}
>{{ job_seeker_form.resum
Hi Everyone,
I'm using Django trunk, Python 2.6.
I have a model form with a FileField. The relevant portions of the
HTML are:
{{ job_seeker_form.resume }}
{{ job_seeker_form.resume.label_tag }}
{{ job_seeker_form.resume.help_text }}
{{ job_seeker_form.resume.errors }}
In my v
Has anyone seen an issue where the nginx fastcgi is giving me a resource
unavailable error, but it only happens if I have debug set to False?
With debug set to True it never happens, with it set to False it always
happens, but only in one part of our application.
What are the differences with runn
Have a look at this site:
http://blog.haydon.id.au/2008/08/notes-on-practical-django-projects.html
On Jun 11, 1:06 am, jayvandal wrote:
> Hi,
> I bought the book and started the first project. displayed the Flat
> Page. I then downloaded the Tiny0MCE and can't get it to work. are
> there any pla
Hi,
I am trying to modify a blog and article model that will both display
data from a related products model. I read that the way I should do
this is through the ContentTypes framework and generic foreign
relations. I would be grateful for some guidance on how to do this.
I've read the documentat
I'm having an issue when traversing a link on my site. When clicking
this link, I'm properly routed to the page, however the user i am
logged in as is logged out for no reason. The link is part of a menu
that looks as such:
Home
Add Projects
View Projects
{% if user.is_staff %}
Add
On Jun 11, 6:29 pm, ringemup wrote:
> With I18n disabled, I'm getting what looks like a circular import
> error from one of my apps, but with it enabled, the error goes away.
> None of my modules is (to my knowledge) using any I18N features. Any
> clues what might be going on?
Include a trace
On Jun 12, 12:51 am, gganesh wrote:
> hi,
> My app connects to Facebook and as user logins in with facebook
> connect ,i intent to display users friends list .I the process of
> doing so i have written a code as pasted below
>
>
> script>
>
>