johnsu01 wrote:
>Using trunk, I have a model that has a number of fields which are
>CharFields, that I would like to be optional but if they are filled
>out, unique.
>
>
I may be well wrong but I don't think you can express this at DB level.
Uniqueness at DB level includes empty value (even NU
Ivan Sagalaev wrote:
> if model.get_list(**{'self.field_name'+'__exact':field_data})
>
>
Ouch :-) Make this 'get_list' to be 'get_count' instead...
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
On Mon, 2006-03-06 at 11:25 +0300, Ivan Sagalaev wrote:
> johnsu01 wrote:
>
> >Using trunk, I have a model that has a number of fields which are
> >CharFields, that I would like to be optional but if they are filled
> >out, unique.
> >
> >
> I may be well wrong but I don't think you can express
[EMAIL PROTECTED] wrote:
> Are there any hooks that I don't know about where I could kick off a
> scheduler when my project is initialized by Django? I saw a response to
> another post mentioning to use a system scheduler (cron, etc.). I
> *could* do this, but would rather use the sched lib. Any i
I'm having the same issue - 500 errors trying to run hello.fcgi...
I didn't install any fancy new svn however. So you're saying the
problem just solved itself? :-\
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dj
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
common problem, try upgrading your mysql libraries (mysql client itself)
or @server set password for your user like :
SET PASSWORD FOR some_user '@' some_host ' = OLD_PASSWORD(' newpwd ');
Ian wrote:
> I am trying to run django from svn under Mac
Malcolm Tredinnick wrote:
>In a correct SQL implementation, NULL is not comparable to anything,
>
>
Yes... It should be :-). And as you said implementation is the whole
another businness. johnsu01 talked about MySQL and given its history of
not very strong adherence to standard but preferring
An other probel i didn' spot.
the comments i thought i added for one object (recipe) only, are
actualy mapped to all recipes.
its like one comment aply to all entries !
even better, when i go to the admin part / free comments i get this :
AssertionError at /cefinban/admin/comments/freecomments/
On Mon, 2006-03-06 at 12:59 +0300, Ivan Sagalaev wrote:
> Malcolm Tredinnick wrote:
>
> >In a correct SQL implementation, NULL is not comparable to anything,
> >
> >
> Yes... It should be :-). And as you said implementation is the whole
> another businness. johnsu01 talked about MySQL and give
Hi
One of the great design philosohies I love about Django is the
decoupling. However when trying to use the template engine on its own,
the import refers the django setttings module env variable, which turn
should point to a settings.py which in turn is part of a project ?
This seems coupled to
FIXED :
all of this was because of the slug field wich was pk.
It needed ID to be pk, i therfore changed name and slug to unique.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
Is there a way to get a model's content_type_id?
I need it to store an object's id and content_type_id in another
table.
Currently I solved this by using an sql-statement but maybe there is
some 'hidden' property or function like:
self.content_type or self.get_content_type
--~--~-~--~--
If a field isn't required, then it isn't validated. I need to do a
conditional validation: if a field value is blank or not selected, then
validate these other fields which are not ordinarily validated.
Is there a way to force a formfield through the validators even if
is_required=False ?
Luke
I think I've found my solution in django/core/validators.py where the
docs make a passing reference.
Theres a range of "RequiredIf..." and "ValidateIf..." types to pick
from that should cover my needs.
Will the docs on custom manipulators/validators be padded out some in
the future, or is magic
On 6 mar 2006, at 12.30, ChaosKCW wrote:
> Hi
>
> One of the great design philosohies I love about Django is the
> decoupling. However when trying to use the template engine on its own,
> the import refers the django setttings module env variable, which turn
> should point to a settings.py which
I've been experiencing the same with Django on Dreamhost. But after some
frustrating 500 errors, my first Django app miraculously started to run
fine. I just waited a few minutes.
I noticed that once, I would get 500 after some compile error in my code. I
don't get 500 for every compilation er
On 3/6/06, ChaosKCW <[EMAIL PROTECTED]> wrote:
> This seems coupled to me ? Is there a way to use the template engine on
> its own ? Or am just missing the obvious ?
Great minds think alike/Fools never differ :-) Check out:
http://code.djangoproject.com/ticket/1321
This came up a few weeks ago
My first reaction to Django was "hey, this looks nice, maybe it could be
ported to Boo, my favourite language at the moment?" On second thought, I'd
rather see Django run on IronPython. You could use Boo with that, if you
wanted to. I would be very interesting to see if Django+IronPython could
Hi Folks,
I have an application that I'd written in an older version of Django
that I'm upgrading to 0.91 and for some reason I'm having problems with
the views.
Here's an excerpt from my urls.py
(r'^admin/', include('django.contrib.admin.urls.admin')),
(r'^jobmonitor/$', include('greenleaftech
On 3/6/06, tomass <[EMAIL PROTECTED]> wrote:
(r'^jobmonitor/$', include('greenleaftech.jobmonitor.views.index')),try: (r'^jobmonitor/$', 'greenleaftech.jobmonitor.views.index'),include is used to include a different urls file for further resolution.
-- Amit UpadhyayBlog: http://www.rootshell.be/~up
I'm evaluating Django for an application in wich we need to process
uploaded files of various sizes (potentially quite large).
>From the docs it looks like uploaded files will kept in memory instead
of being streamed into (temporary) files. Is that the case?
--~--~-~--~~--
Hi,
I don't know if I have missed something in the documentation, but it
took me a quite a while to figure out how to (de)reference a ForeignKey
field in object_detail view.
By dereferencing a foreign key I mean a case where I have a Document
class that has a field author = ForeignKey(Person).
On 3/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> Does anyone have a link to documentation that explains how this should
> be done?
Doing this in a template uses the same methods as any other use of the
database API, except that the parentheses are omitted. For a
reference of how the DB
Bit of newbie question I guess, but I can't seem to find the answer in
the documentation or the group archive, so sorry if it's been asked
before.
I'm currently running the magic-removal branch and have two models
looking something like this:
class Topic (models.Model):
parent = models.F
An out-of-leftfield question, has anybody tried and (successfully) used
Rico (openrico.org) with Django? Or any XML over HTTP for that matter
with Django? Just looking for some code examples.
Thanks.
--~--~-~--~~~---~--~~
You received this message because you are
gizo wrote:
> With all due respect, this doesn't attend to my question.
oh, sorry, I thought your question was
"timedelta doesn't allow for months, does it?"
to which the answer is "no, because adding a month isn't a well-defined
concept".
> Why can I use MySQLdb from python to run a date_
> objects for invalid dates, it's probably quite easy to get a ValueError
> exception from that MySQL operation around this time of the year...
get a ValueError exception from the DB bindings when they attempt
to convert the invalid date to a datetime object, that is.
--~--~-~--~~
Hans-Christian Holm wrote:
> My first reaction to Django was "hey, this looks nice, maybe it could be
> ported to Boo, my favourite language at the moment?" On second thought, I'd
> rather see Django run on IronPython. You could use Boo with that, if you
> wanted to. I would be very interesting
Hi all,
I wish to implement a system that allows users to upload multiple files
and associate them with a model I have defined.
The model is similar to the following:
class Entry(meta.http://groups.google.com/group/django-users
-~--~~~~--~~--~--~---
On 3/6/06, Martin Ostrovsky <[EMAIL PROTECTED]> wrote:
> An out-of-leftfield question, has anybody tried and (successfully) used
> Rico (openrico.org) with Django? Or any XML over HTTP for that matter
> with Django? Just looking for some code examples.
Rico? Not that I know of. There's work under
Hi there -
I'll just start into the example I'm wondering about without introducing
it. We have a bunch of users, along with the 'resources' they have access
to.
So, I can do this:
me = persons.get_object(username__exact='bailey')
me.get_resourcerecord(resource=resourcetypes.get_object(short_n
im not sure but can't you have
class File(meta.Model):
file = meta.FileField(...)
owner = ForeignKey(Entry)
class Entry(meta.Model):
id = meta.AutoField(primary_key=True
--~--~-~--~~~---~--~~
You received this message because you are subscribed to t
On 3/7/06, Alan Bailey <[EMAIL PROTECTED]> wrote:
Hi there -I'll just start into the example I'm wondering about without introducingit. We have a bunch of users, along with the 'resources' they have accessto.So, I can do this:me = persons.get_object
(username__exact='bailey')me.get_resourcerecord(
On 3/7/06, Martin Ostrovsky <[EMAIL PROTECTED]> wrote:
>
> An out-of-leftfield question, has anybody tried and (successfully) used
> Rico (openrico.org) with Django? Or any XML over HTTP for that matter
> with Django? Just looking for some code examples.
>
> Thanks.
>
You can use it just as you w
On Tue, 7 Mar 2006, Russell Keith-Magee wrote:
> It's a little difficult to understand exactly what it is you want without a
> concrete model example - but if I'm understanding you correctly, the answer
> is 'it may be possible with trunk/0.91, and is definitely possible with
> magic-removal'.
>
On Mon, 2006-03-06 at 18:07 -0600, Alan Bailey wrote:
> On Tue, 7 Mar 2006, Russell Keith-Magee wrote:
>
> > It's a little difficult to understand exactly what it is you want without a
> > concrete model example - but if I'm understanding you correctly, the answer
> > is 'it may be possible with
On 3/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]
> wrote:Bit of newbie question I guess, but I can't seem to find the answer in
the documentation or the group archive, so sorry if it's been askedbefore.I'm currently running the magic-removal branch and have two modelslooking something like this:clas
On 3/6/06, Istvan <[EMAIL PROTECTED]> wrote:
I'm evaluating Django for an application in wich we need to processuploaded files of various sizes (potentially quite large).>From the docs it looks like uploaded files will kept in memory insteadof being streamed into (temporary) files. Is that the ca
On Tue, 2006-03-07 at 08:55 +0800, Russell Keith-Magee wrote:
>
> On 3/6/06, Istvan <[EMAIL PROTECTED]> wrote:
>
> I'm evaluating Django for an application in wich we need
> to process
> uploaded files of various sizes (potentially quite large).
>
>
On 07/03/06, Russell Keith-Magee <[EMAIL PROTECTED]> wrote:
> > class Topic (models.Model ):
> > parent = models.ForeignKey('self', null=True, blank=True,
> > related_name='child')
> > title = models.CharField(maxlength=128)
> > description = models.TextField()
> >
> > clas
hi all,
giving a id list in which the elements' order is important, for
example: category_id_list = [1, 4, 9, 6]
is it possible to make sure that
categorys.get_list(id__in=category_id_list) returns category object
list in the same order as category_id_list? that is, make sure the
returned list l
On 3/7/06, Stephen Newey <[EMAIL PROTECTED]
> wrote:
> At present, there isn't an 'exists' operation for queries - although it> sounds like a good addition. It would probably end up as part of aggregate> functionality, so it might be worth adding a note to ticket 1435 so your
> idea doesn't get for
anyone meet the bug below?
if your have a app have the same name as projectname,
manage.py will always print out :
Traceback (most recent call last):
File "./manage.py", line 11, in ?
execute_manager(settings)
File "/usr/lib/python2.3/site-packages/django/core/management.py",
line 1051, i
I used to think I can't and it is a bad practice to place objects
(non-strings) in django sessions.
I just realized I can, but I don't know if it's a good practice. Some
feedback in this regard is appreciated,
Thanks,
Sia
--~--~-~--~~~---~--~~
You received this
hi,
this has been discussed before,
http://groups.google.com/group/django-users/browse_thread/thread/dd83fbfc7657a9da/
http://groups.google.com/group/django-users/browse_thread/thread/25e60576dcee5d7a/
and the conclusion is although you are able to you shouldn't
--~--~-~--~~
Thanks John,
It is extremely tempting to place objects in sessions though. I'm
pretty sure I'll still use it to a safe extent.
Thanks,
Sia
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To p
On 3/7/06, Siah <[EMAIL PROTECTED]> wrote:
>
> Thanks John,
> It is extremely tempting to place objects in sessions though. I'm
> pretty sure I'll still use it to a safe extent.
>
> Thanks,
> Sia
>
I think you can do what you want if there is not a official way.
--
I like python!
My Blog: http:
Hans-Christian Holm wrote:
> I've been experiencing the same with Django on Dreamhost. But after some
> frustrating 500 errors, my first Django app miraculously started to run
> fine. I just waited a few minutes.
>
> I noticed that once, I would get 500 after some compile error in my code. I
>
[EMAIL PROTECTED] wrote:
>hi,
>this has been discussed before,
>http://groups.google.com/group/django-users/browse_thread/thread/dd83fbfc7657a9da/
>http://groups.google.com/group/django-users/browse_thread/thread/25e60576dcee5d7a/
>
>and the conclusion is although you are able to you shouldn't
>
EricHsu wrote:
>is it possible to make sure that
>categorys.get_list(id__in=category_id_list) returns category object
>list in the same order as category_id_list?
>
Nope. The order of a result of a query without 'ORDER BY' is undefined.
But as soon as you have python list in memory you can sort
URLField is limit to 200 maxlenght, and not expose a agrument to
change, hope that fix in next version of Django.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send ema
51 matches
Mail list logo