On Sun, May 21, 2006 at 10:17:52AM +1000, Malcolm Tredinnick wrote:
> If you also want to say "it is optional to enter this in the admin
> interface", then you also need to set blank = True on the field (this
> won't require any change to your database: it only affects the
> interface).
Perhaps t
That was it, thanks.
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.11.88.14 with SMTP id l14mr31636cwb;
Sat, 20 May 2006 22:43:43 -0700 (PDT)
X-Google-Token: 2kB1SgwqamvLfzriSF0L0wYZRLER
Received: from 69.51.79.113 by 38g2000cwa.googlegroups.com with HTTP;
Sun, 21 May
On Sat, 2006-05-20 at 21:59 -0700, favo wrote:
> I found below in document:
> """
> If your model method starts with "_module_", it'll be a module-level
> function instead of a method. Otherwise, custom module-level functions
> have the same namespace as custom methods.
> """
> is there any exampl
I found below in document:
"""
If your model method starts with "_module_", it'll be a module-level
function instead of a method. Otherwise, custom module-level functions
have the same namespace as custom methods.
"""
is there any example?
I have add a method in model but can't find it in module l
On Sat, 2006-05-20 at 22:15 +, qhfgva wrote:
> Thanks for your response, I'm not having luck with this. It seems like
> the admin interface is requiring ForeignKey fields even when marked as
> null=True.
OK, this problem bites everybody once. It's documented, but easy enough
to miss in all t
On 5/20/06, David Robinson <[EMAIL PROTECTED]> wrote:
> My question is about the site ID in each project's settings.py file.
> What does that number mean in a situation like ours? I appreciated the
> explanation of the difference between an app and a project, but I
> haven't been able to figure o
I'll try to be brief... We're just starting to work on replacing an
existing home-grown content management system with one built with
Django. We've got lots of semi-autonomous departments (a small liberal
arts college). All of the content will be in one database. We'll be
building a bunch o
just as a followup to this.
Scott was using the 'old pre-MR merge' version of this code, when he
updated to the up2date version it worked for him
regards
Ian
On 19/05/2006, at 10:15 PM, Scott Anderson wrote:
>
> Thanks for the reply, Ian.
>
> I have those libraries installed. I'm sure it's ju
oh.. you might also want to have a different pythoninterpreter
add the following to your virtual hosts.
PythonInterpreter xxx_prod
and
PythonInterpreter xxx_dev
On 19/05/2006, at 8:20 AM, Rob Hudson wrote:
>
> I've recently completed a first milestone of a project and want to
> p
to use the Sites you may find the following useful.
class SiteLimitManager(models.Manager):
def get_query_set(self):
return super(SiteLimitManager, self).get_query_set().filter
(site=settings.SITE_ID)
and in your model add:
site = models.ForeignKey(Site, default=settings.SITE
Thanks for your response, I'm not having luck with this. It seems like
the admin interface is requiring ForeignKey fields even when marked as
null=True.
My validator that I wrote seems to be working, but since the fk field
is being required it defeats the purpose.
Here is my model. Is there an
I know there's createsuperuser in old django, however how to now?
--~--~-~--~~~---~--~~
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 unsubscri
Is it possible to change a model's upload_to on a per instance basis?
Essentially, what I'd like to do is this:
class GeneratedFile(models.Model):
source = models.ForeignKey(FileUpload)
generated = models.FileField(upload_to="generated/%d" % self.fileupload_id)
But that of course isn't
On 5/20/06, PythonistL <[EMAIL PROTECTED]> wrote:
>
> Question 1
> I noticed in MySQL that if a table field has NULL value, then I can
> test in Python with that filed with None.
> In otherwords NULL in MySQL is the same as None. in Python
> Is it so or am I wrong?
yes, the null value will be
Jacob,
thanks. That does indeed sound easy.
But -- just so I understand -- I would assume that what this does is
fetch all Photos, in random order, then take the first ten and throuw
the rest away (to be garbage-collected). I'd assume the [:10] to be
applied only after everything's been loaded.
what is wrong with manage.py sqlall ? you can't use that either?
On 5/20/06, reiale <[EMAIL PROTECTED]> wrote:
>
> Do I need to write this myself?
>
> Anyone?
>
> X-Google-Language: ENGLISH,ASCII-7-bit
> Received: by 10.11.53.63 with SMTP id b63mr86158cwa;
> Sat, 20 May 2006 09:31:16 -0700
Do I need to write this myself?
Anyone?
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.11.53.63 with SMTP id b63mr86158cwa;
Sat, 20 May 2006 09:31:16 -0700 (PDT)
X-Google-Token: DHUc4gwAAADxG4JLKb4xAlb28xJmt5Ek
Received: from 70.209.87.70 by j55g2000cwa.googlegroups.com with HTTP
On Thursday 18 May 2006 23:20, Rob Hudson wrote:
> Based on my virtual hosts, can I have the production site list:
> SetEnv DJANGO_SETTINGS_MODULE website.settings
> and the dev site list:
> SetEnv DJANGO_SETTINGS_MODULE website_dev.settings
> and everything work?
>
> Is there something more I ne
Honza and Malcom,
Thanks a lot for help.
L>
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.11.53.63 with SMTP id b63mr86106cwa;
Sat, 20 May 2006 09:28:02 -0700 (PDT)
X-Google-Token: nyuD6QwAAACFEHOnioDiO_ddsVcZbQxx
Received: from 85.160.75.22 by i39g2000cwa.googlegroups.com with H
Thanks, Adrian. That was exactly what I was looking for.
Daniel
X-Google-Language: ENGLISH,ASCII-7-bit
Received: by 10.11.88.14 with SMTP id l14mr25787cwb;
Sat, 20 May 2006 02:09:42 -0700 (PDT)
X-Google-Token: bFDtBgwAAADv0osy9iGpPKN5e1Dqs4cW
Received: from 84.167.179.91 by j33g2000cwa
On Sat, 2006-05-20 at 02:08 -0700, [EMAIL PROTECTED] wrote:
> Jacob,
>
> thanks. That does indeed sound easy.
>
> But -- just so I understand -- I would assume that what this does is
> fetch all Photos, in random order, then take the first ten and throuw
> the rest away (to be garbage-collected)
I seem to be able to log in as a user with the is_active flag not set
to True.
A validator in django.contrib.auth.forms.AuthenticationForm should test
for that.
I'd log a bug, but as far as I can tell there's no place in the bug
database for contrib stuff.
X-Google-Language: ENGLISH,ASCII-7-bit
On May 19, 2006, at 2:44 PM, [EMAIL PROTECTED] wrote:
> I want to add a random picture component to an album app I'm building.
> So I have a class Picture. I want to choose ten to twenty random
> pictures out of all pictures submitted.
> Obviously, I don't want to load all Picture instances (poten
Question 1
I noticed in MySQL that if a table field has NULL value, then I can
test in Python with that filed with None.
In otherwords NULL in MySQL is the same as None. in Python
Is it so or am I wrong?
Question 2.
I also would like to test NULL values in my templates. So I would like
to us
On Sat, 2006-05-20 at 04:15 -0700, PythonistL wrote:
> Question 1
> I noticed in MySQL that if a table field has NULL value, then I can
> test in Python with that filed with None.
> In otherwords NULL in MySQL is the same as None. in Python
> Is it so or am I wrong?
That is the way Django doe
Hi Folks,
I'm sure there's a better solution for this, just not sure what it
is...
I have a 4 step form and I'm currently capturing all posted data
between each step and then re-posting it through hidden input fields
and recapturing it at each successive step. URL redirects won't quite
work for
BINGO!
It works :)
Wow, thanks fellas. Django is up and running and I am a happy newb!
I'll stick around and help out when I can. What comes around goes
around.
Sincerely,
stirman
--~--~-~--~~~---~--~~
You received this message because you are subscribed to
27 matches
Mail list logo