Pinax:自定义注册和配置文件 [英] Pinax: Customize Signup and profile

查看:186
本文介绍了Pinax:自定义注册和配置文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在用户注册时收集更多信息,并将其显示为配置文件信息的一部分,以便用户可以在创建登录后对其进行编辑。

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.

如何在不更改直接pinax码的情况下扩展注册和配置文件的形式和模型?

How can I extend the sign-up and profile form and model without changing directly pinax code?

推荐答案

从pinax docs

From pinax docs


自定义

随着更多的网站使用Pinax构建,
会出现更多的最佳做法,但现在我们建议的是

As more sites are built using Pinax, more best practices will emerge, but for now what we recommend is:


  • 总是在稳定的版本中工作。最新版本是0.7.1。

  • 使用pinax-admin setup_project命令。

  • 对settings.py和urls进行必要的更改。在您复制的目录中的py文件。

  • 在管理界面中更改网站的域名和显示名称。

  • 在新的内容下开发您的自定义应用项目或Python路径上的任何地方。

  • 在您的新项目下开发自己的模板。

  • 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.

线程 与您的问题非常相关,并讨论覆盖默认pinax应用程序的选项。

This thread is very relevant to your question and discusses options for overriding the default pinax apps.

它建议查看 https: //github.com/eldarion/idios (一个可扩展的个人资料应用程序,旨在替代Pinax中的个人资料应用)。

It suggests looking at https://github.com/eldarion/idios, (an extensible profile app designed to replace the profiles apps in Pinax).

blog 有一些关于覆盖默认pinax应用程序的意见:

This blog has some comments about overriding the default pinax apps:

覆盖内置Pinax应用程序

Overriding build-in Pinax Applications


假设我们要用
$ PROJECT_ROOT / apps / blog覆盖
$ PINAX_ROOT / apps / blog,我们可以这样做
只需复制应用程序,并且
将使我们的项目本地(读取
个人)更改。 Pinax将
然后加载$ PROJECT_ROOT / apps / blog
而不是$ PINAX_ROOT / apps / blog。

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.

那些不关心合并的人
上游更改也不会提交
bugfixes /功能上游只需
问题cp -a $ PINAX_ROOT / apps / blog
$ PROJECT_ROOT / apps并完成。那些
认为自己很好
FLOSS国家公民,但是关心
关于贡献回来...

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 ...

您希望覆盖的默认pinax应用程序(如有必要)将是:

The default pinax apps you would be looking to override (if necessary), would be:

  • http://pinaxproject.com/docs/dev/apps/account/
  • http://pinaxproject.com/docs/dev/apps/profiles/

这篇关于Pinax:自定义注册和配置文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆