Django 邀请申请

发布于 2024-11-05 19:44:57 字数 281 浏览 0 评论 0原文

我想创建一个网站,人们需要电子邮件邀请才能订阅,而我是唯一允许邀请人们的人。 我认为 邀请申请 就是我所需要的。正确吗?实施起来容易吗?欢迎任何提示。

对于 django-registration 和 django-invitation 的安装,我读过我可以将解压缩的文件放在我的 django 路径中。正确吗?或者我应该使用简易安装?

非常感谢。

I want to create a site where people would need an e-mail invitation to subscribe and where I would be the only one allowed to invite people.
I think the invitation application is what I need. Is it correct ? Is it easy to implement ? Any hint is welcome.

For the installation of django-registration and django-invitation, I have read I could just put the unzipped files in my django path. Is it correct ? Or should I use easy install ?

Thank you very much.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

最后的乘客 2024-11-12 19:44:57

一般来说,您应该能够将任何应用程序/模块放入 django 文件夹中并且它应该可以工作。

然而,有一些事情不容忽视。

  1. 确保您不要忘记按照每个特定应用程序的说明编辑 settings.py 和 urls.py

  2. 请检查是否存在任何依赖项。某些应用程序可能需要安装某些库,例如映像等。

  3. 某些应用程序的流程更复杂,需要额外的设置、文件和调整。

专门用于 Django 注册 settings.py 中的 2 行:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sites',
'registration', # add this line!

)

ACCOUNT_ACTIVATION_DAYS = 7 # 还有这一行! #一周激活窗口;当然,您可以使用不同的值。

以及 urls.py 中:

(r'^accounts/', include('registration.backends.default.urls')),

至于邀请,几乎相同:

https://bitbucket.org/david/django-invitation/wiki/Home#basic-use

祝你好运

Generally, you should be able to put any app/modul in the django folder and it should work.

However, there are a few things that need not be overlooked.

  1. Make sure you don't overlook to edit the settings.py and the urls.py as instructed for each specific app

  2. Do check if there are any dependencies. Some apps may require certain libraries that need to be installed such as imaging etc.

  3. Some apps have more complicated process and need additional settings, files, and adjustments.

Specifically for Django registration 2 lines in settings.py:

INSTALLED_APPS = (
'django.contrib.auth',
'django.contrib.sites',
'registration', # add this line!

)

ACCOUNT_ACTIVATION_DAYS = 7 # And this line! #One-week activation window; you may, of course, use a different value.

as well as in urls.py:

(r'^accounts/', include('registration.backends.default.urls')),

as for the invitation, its almost the same:

https://bitbucket.org/david/django-invitation/wiki/Home#basic-use

Good luck

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文