2009-7-9
| 23:46 | spaceninja | should I make my own UserModel form filed for this? |
| 23:46 | spaceninja | field |
| 23:46 | DarwinSurvivor | polpak: sounds reasonable, then I'll just put a big comment block between my classes and the custom ones |
| 23:47 | spaceninja | I mean |
| 23:47 | DarwinSurvivor | polpak: hmm, just a sec... the example i made needs a key specified to get a class... I guess I could just make a "getAllModels()" function that would return the whole dictionary? |
| 23:47 | spaceninja | Im thinking about making a RegisterForm(forms.Form) where I mix the standard User fields and UserModel fields, so I can validate them |
| 23:48 | FunkyBob | spaceninja: it is possible to validate multiple form instances against the same request.POST |
| 23:49 | spaceninja | so now I need to "translate" the User fields into RegisterForm, so I can validate it |
| 23:50 | spaceninja | FunkyBob: but can I validate a the standard User models.Model class with form.is_valid() ? |
| 23:51 | spaceninja | but I still need to make the RegisterForm(forms.Form) which contains username name password email and other built in stuff |
| 23:51 | polpak | DarwinSurvivor: huh? |
| 23:52 | DarwinSurvivor | polpak: well, the page where they create instances of the custom modules needs to be able to get a list of all of them |
| 23:53 | DarwinSurvivor | polpak: def getAllModules(): return _Registry.keys() |
| 23:54 | spaceninja | how do I create a "form form models" with User ? |
| 23:54 | spaceninja | forms from models |
| 23:56 | spaceninja | I'll just do what feels right |
| 23:56 | rozwell | spaceninja: the same way you create a ModelForm for any model |
| 23:56 | DarwinSurvivor | spaceninja: what are you trying to do? |
| 23:56 | rozwell | spaceninja: you should note that there's already User forms found in the auth app |
| 23:57 | rozwell | spaceninja: and there's also django-registration |
| 23:57 | mib_mib | i have a huge vector like 100,000 elements long - (i have to store a lot of these, > 10000) - will this be a problem for the database? |
| 23:58 | FunkyBob | mib_mib: probably not |
| 23:58 | FunkyBob | mib_mib: what's it a vector of? |
| 23:58 | mib_mib | FunkyBob: just integers |
| 23:59 | mib_mib | FunkyBob: i am a database newb - will i get hashing collisions? |
| 23:59 | mib_mib | i may have to store more than 10000 |
| 23:59 | andym | most databases can have more 10,000 rows |
| 23:59 | mib_mib | will this significantly slow down the db? do i need to split into different tables or anything? |
| 23:59 | mib_mib | i may need 100000 rows |
| 23:59 | spaceninja | DarwinSurvivor: Im createing a user registration html form, which contains both standard User fields, and my custom UserModel fields. And I want to be able to validate the request.POSt I get. So I'm thinking about creating a RegisterForm(form.Form) which contains the standard User fields like username password email, but translate them into forms.Emailfield and stuff. |
Page 26 of 26
← Previous
(2,530 total)