ing Bug
> https://code.djangoproject.com/ticket/9619
> > <https://code.djangoproject.com/ticket/9619> for:
> >
> > to_python not called when fetching data with .values(...)
> >
> >
> > I update the tests and create a ticket and pu
* https://github.com/django/django/pull/4874
> <https://github.com/django/django/pull/4874>
>
> I can also made pull request for v1.8.x and master...
>
>
>
>
>
> I also found the Solution for: "to_python() didn't call with Python
This was more than 5 years ago… wow!
Sorry, I have absolutely no idea now. I would suspect that "yes," I got it
sorted, but I would anticipate that the internals of Django's ORM have
changed significantly since then, so even if I could remember how I did it,
it wouldn't be of much use…
Perhaps if
Hey!
I'm dealing with a similar issue.
Would you be able to tell me if you managed to solve this issue?
and if so, how?
Thanks!
Joe
On Tuesday, December 11, 2007 3:42:54 PM UTC-5, oli...@obeattie.com wrote:
>
> Hey everyone,
>
> I've asked a little in the Django IRC, but nobody seems to be abl
Hi.
I've wrote a custom model field which splits strings by commas and
returns a list of values. Everything works fine except the admin -
after editing a record admin treats the custom fields as modified even
if they were actually not, issuing an UPDATE query for (not modified)
record and adding a
Hi,
I think what you're trying to accomplish is more or less what
django-tagging [http://code.google.com/p/django-tagging/] does, so I
suggest looking at its source code.
HTH,
Nuno
On Sun, May 9, 2010 at 11:24 PM, Nick Taylor
wrote:
> Hi all,
>
> I want to create my own "field" type for a model
Hi all,
I want to create my own "field" type for a model, this essentially
will be a relationship to another model via a generic link model
(using GenericForeignKey etc).
As en example I basically want to do the following in models.py:
class Pizza(models.Model):
toppings = IngredientsField()
On Tue, Apr 14, 2009 at 6:00 PM, gordyt wrote:
>
> I think I've tracked down the problem. Here is a bit of code from
> django.db.models.fields.related.py:
>
>def get_db_prep_lookup(self, lookup_type, value):
># If we are doing a lookup on a Related Field, we must be
># compar
Here is a dpaste link to that same bit of code that looks nicer:
http://dpaste.com/hold/33474/
--gordy
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to djang
I think I've tracked down the problem. Here is a bit of code from
django.db.models.fields.related.py:
def get_db_prep_lookup(self, lookup_type, value):
# If we are doing a lookup on a Related Field, we must be
# comparing object instances. The value should be the PK of
value,
Howdy Daniel!
> I suspect you have not set the subclass's metaclass to
> models.SubfieldBase - see
> here:http://docs.djangoproject.com/en/dev/howto/custom-model-fields/#the-s...
>
> You need to do this to get any of the overridden methods to be called.
Thanks for the up
se when the backend supports it (postgresql) and a
> charfield when the backend doesn't support it (others). I did some
> tests and performance with postgresql is better with the native type
> (not suprising).
>
> --gordon
I suspect you have not set
Forgot to add that I'm using the latest revision from subversion
(10558)...
--~--~-~--~~~---~--~~
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 u
Howdy Folks,
I have been testing model inheritance using models that have UUIDField
primary keys. It appears that when you save a new instance of a child
model, the framework is not calling get_db_prep_value() to convert the
UUIDField to a proper format before querying the parent entry.
Let's s
> http://code.djangoproject.com/ticket/8813
>
> If you could attach the file you dpasted to that ticket and note that you
> see this problem in the admin, that would probably be useful, as recreating
> it in admin should be easier than recreating the user-defined form, view,
> and models involved
On Fri, Feb 20, 2009 at 6:14 PM, gordyt wrote:
>
> Karen I made a small sample to illustrate the problem and posted it
> here:
>
> http://dpaste.com/hold/123199/
>
> It's an extremely simple test case and instructions are included in
> the comments. I'm not sure if this error is related to the i
Karen I made a small sample to illustrate the problem and posted it
here:
http://dpaste.com/hold/123199/
It's an extremely simple test case and instructions are included in
the comments. I'm not sure if this error is related to the issue that
you told me about or if it is something new entirely
> This sounds like a problem that has been fixed. Are you running with a
> recent enough trunk or 1.0.X branch checkout so that you have this fix:
>
> http://code.djangoproject.com/changeset/9664
Karen I'm running build 9846. I'm going to put together a very
minimal example to illustrate the pr
On Fri, Feb 20, 2009 at 10:21 AM, gordyt wrote:
>
> Howdy Viktor,
>
> On Feb 1, 1:36 pm, Viktor wrote:
> > Hi,
> >
> > did you got any response or did you managed to solve your problem?
> > I've just started to search for a UUIDField, and it would be great to
> > have proper uuid columns for pos
Howdy Viktor,
On Feb 1, 1:36 pm, Viktor wrote:
> Hi,
>
> did you got any response or did you managed to solve your problem?
> I've just started to search for a UUIDField, and it would be great to
> have proper uuid columns for postgres.
>
> If so do you plan to commit it to django_extensions?
S
Hi,
did you got any response or did you managed to solve your problem?
I've just started to search for a UUIDField, and it would be great to
have proper uuid columns for postgres.
If so do you plan to commit it to django_extensions?
Thanks, Viktor
On 2008 dec. 16, 22:53, gordyt wrote:
> Howdy
Howdy Folks!
I wanted to be able to have UUID primary keys for certain models.
I found the implementation done by the django_extensions project
(http://code.google.com/p/django-command-extensions/) and it works
fine
as is.
But I wanted to be able to have a UUIDField that stored its values in
an
ethods on the custom field class (subclassing
> > > models.Field).
> >
> > > Things works more-or-less OK, but when I run dumpdata to serialize the
> > > database into json, at some point to_json gets executed and the
> > > returned value for rrule is
> > get_db_prep_value. I also have a 'value_to_string' method on the
> > fiels, but this does not get executed either.
>
> > What am I missing about the way dumpdata handles these custom model
> > fields?
>
> > Thanks
> > Andy.
--~--~
does not get executed either.
>
> What am I missing about the way dumpdata handles these custom model
> fields?
>
> Thanks
> Andy.
> >
>
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"D
lso have a 'value_to_string' method on the
fiels, but this does not get executed either.
What am I missing about the way dumpdata handles these custom model
fields?
Thanks
Andy.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
Never mind, I see it's to do with database backends.
On Dec 11, 10:34 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
wrote:
> OK, well now, for some reason whenever I use a custom field Django
> just ignores it when running syncdb. If I ask it for the raw SQL
> output I can see that the field is bei
OK, well now, for some reason whenever I use a custom field Django
just ignores it when running syncdb. If I ask it for the raw SQL
output I can see that the field is being omitted entirely. Even if I
do something simple like:
class TestField(models.TextField):
pass
Does anyone know what I
You're a saint, you know that?
On Dec 11, 9:04 pm, "Marty Alchin" <[EMAIL PROTECTED]> wrote:
> On Dec 11, 2007 3:42 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> > When I try to run syncdb on a model which uses the PickledObjectField
> > (see my sample model athttp://dpaste.com/hold/27713/
On Dec 11, 2007 3:42 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> When I try to run syncdb on a model which uses the PickledObjectField
> (see my sample model at http://dpaste.com/hold/27713/), I get this
> traceback:-
Your problem is that you're importing the PickledObjectField into your
c
Hey everyone,
I've asked a little in the Django IRC, but nobody seems to be able to
help. I'm trying to implement a custom model field, and I really can't
figure out why I keep getting errors. My code for my fields module is
at http://dpaste.com/hold/27712/
When I try to run syncdb on a model wh
31 matches
Mail list logo