I want to gather some more information when the user signs up and also display this as part of the profile information - so that the user can edit it once he creates a login.
How can I extend the sign-up and profile form and model without changing directly pinax code?
From pinax docs
Customization
As more sites are built using Pinax, more best practices will emerge, but for now what we recommend is:
- Always work off a stable release. The most current release is 0.7.1.
- Use the pinax-admin setup_project command.
- Make necessary changes to the settings.py and urls.py files in your copied directory.
- Change the domain and display name of the Site in the admin interface.
- Develop your custom apps under your new project or anywhere on Python path.
- Develop your own templates under your new project.
This thread
is very relevant to your question and discusses options for overriding the default pinax apps.
It suggests looking at https://github.com/eldarion/idios
, (an extensible profile app designed to replace the profiles apps in Pinax).
This blog
has some comments about overriding the default pinax apps:
Overriding build-in Pinax Applications
Assuming we want to override $PINAX_ROOT/apps/blog with $PROJECT_ROOT/apps/blog we can do so simply by copying the application and make our project-local (read individual) changes to it. Pinax will then load $PROJECT_ROOT/apps/blog rather than $PINAX_ROOT/apps/blog.
Those who do not care about merging in upstream changes nor submitting bugfixes/features upstream would just issue cp -a $PINAX_ROOT/apps/blog $PROJECT_ROOT/apps and be done. Those who consider themselves good FLOSS-country citizens however care about contributing back as well ...
The default pinax apps you would be looking to override (if necessary), would be:
You probably want to have a go at overriding the built-in Pinax applications, which is gone over in a little detail in this article. I imagine you'd want to extend (or override) Pinax's Profile model.
This chap seems to have been in a situation that sounds like what you want, have a quick read of his chat logs to see what I mean. Sorry that this answer isn't too specific, it's more of a pointer.
来源:https://stackoverflow.com/questions/2950634/pinax-customize-signup-and-profile