hi,
(first i apologize if this was already discussed or solved. i could not
find anything about it in the newsgroup-archives)
i've seen that one of the latest commits did some changes to the
"raw_id_admin" attribute.
for the admin this is fine, but there is also an another aspect of
raw_id_admin, which i'm not sure is addressed here:
when the "oldforms" are used, raw_id_admin also affects them.
when you use an automatic manipulator, then if you do not have
raw_id_admin specified for a field,
then when the post/get-data is manipulator-validated, then all the
potential/possible foreign-keys are fetched.
example:
class A(Model):
pass
class B(Model):
my_a = ForeignKey(A)
(pseudocode, i didn't check if it's valid or not)
now let's say i have 10000 instances of A.
now i call the AddManipulator for B.
for validation, it will load in all the 10000 instances of A.
which is usually a bad thing.
if i modify B as:
class B(Model):
my_a = ForeignKey(A, raw_id_admin = True)
then it will do it the "reasonable" way.
i understand the reason for getting all the 10000 instances (so that the
error-message produced by the manipulator can be "nice" and list all the
possible "good" answers), but i would not recommend this to be the
default-option.
in other words:
1.
imho it's good that raw_id_admin is moved out from the database-model
into the admin-part. but also it is needed to be able to specify that in
the 'automatic' form, i do want the raw_id_admin behavior.
2.
it would be nice imho to make the raw_id_admin=True way the default.
thanks,
gabor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-developers?hl=en
-~----------~----~----~----~------~----~------~--~---