pinax

Django allauth Redirect after social signup

て烟熏妆下的殇ゞ 提交于 2019-12-10 15:05:29
问题 I would like to redirect to a certain link after social signup, how and where do I do that? I can do it for regular signup but I can't for social signup. 回答1: Alternatively you can write your own custom social account adapter to handle different logged in redirection from different social accounts and not messing with your normal account settings, like so: # adapter.py from allauth.socialaccount.adapter import DefaultSocialAccountAdapter class SocialAccountAdapter(DefaultSocialAccountAdapter)

reusable application for django site wide announcements that displays a message only once per user

孤人 提交于 2019-12-08 11:33:31
问题 I want to show various messages to registered users only once in my django application. I found django-announcements which seemed to do what I want - but I found in testing it marks messages as read by using a session variable, which disappears if the user logs out. This means a message is shown again to a user if they dismiss it when logged in, log out, and then log in again. I wondered if anyone know of an application that I might be able to use here without re-inventing the wheel. 回答1:

Pinax: Customize Signup and profile

徘徊边缘 提交于 2019-12-07 18:20:00
问题 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? 回答1: 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

'bootstrap_tags' is not a valid tag library

ε祈祈猫儿з 提交于 2019-12-07 07:51:18
问题 I'm using pinax-theme-bootstrap-account with django-user-accounts. When I want to use pinax templates I get this error: 'bootstrap_tags' is not a valid tag library: Template library bootstrap_tags not found,tried django.templatetags.bootstrap_tags,django.contrib.admin.templatetags.bootstrap_tags,django.contrib.staticfiles.templatetags.bootstrap_tags,account.templatetags.bootstrap_tags Here is pinax-theme for signup.html: {% extends "site_base.html" %} {% load url from future %} {% load i18n %

Django admin model Inheritance is it possible?

大城市里の小女人 提交于 2019-12-07 06:22:46
问题 Is inheritance possible in admin Models ? Like For Example consider the following , File : models.py class AbstractModel ( models.Model ): # Meta Information common to all classes author = models.ForeignKey(auth.models.User , null = False ,related_name="%(class)s_related_author" ) # The user who created editor = models.ForeignKey(auth.models.User , null = True,related_name="%(class)s_related_editor" ) # The user who last edited created_at = models.DateTimeField(auto_now_add = True) # Create

Is there a Django “app” that can manage your users' profiles?

与世无争的帅哥 提交于 2019-12-06 14:33:46
问题 "My Profile", notification options, settings ...The checkbox stuff... I'm familiar with Pinax, but is there a specific app that manages just profiles and accounts ? I don't want the other heavy stuff associated with social networking...I only want the profile account management 回答1: There is django-profiles: http://bitbucket.org/ubernostrum/django-profiles/wiki/Home 回答2: Another one, I haven't used either this or the one Mike posted, so caveat emptor. (What's Latin for 'downloader'? ;) http:/

Pinax: Customize Signup and profile

懵懂的女人 提交于 2019-12-05 22:57:33
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.

'bootstrap_tags' is not a valid tag library

独自空忆成欢 提交于 2019-12-05 16:18:46
I'm using pinax-theme-bootstrap-account with django-user-accounts. When I want to use pinax templates I get this error: 'bootstrap_tags' is not a valid tag library: Template library bootstrap_tags not found,tried django.templatetags.bootstrap_tags,django.contrib.admin.templatetags.bootstrap_tags,django.contrib.staticfiles.templatetags.bootstrap_tags,account.templatetags.bootstrap_tags Here is pinax-theme for signup.html: {% extends "site_base.html" %} {% load url from future %} {% load i18n %} {% load bootstrap_tags %} {% block head_title %}{% trans "Sign up" %}{% endblock %} {% block body %}

Django admin model Inheritance is it possible?

徘徊边缘 提交于 2019-12-05 10:57:26
Is inheritance possible in admin Models ? Like For Example consider the following , File : models.py class AbstractModel ( models.Model ): # Meta Information common to all classes author = models.ForeignKey(auth.models.User , null = False ,related_name="%(class)s_related_author" ) # The user who created editor = models.ForeignKey(auth.models.User , null = True,related_name="%(class)s_related_editor" ) # The user who last edited created_at = models.DateTimeField(auto_now_add = True) # Create Time edited_at = models.DateTimeField(auto_now = True) # Modify Time class Meta: abstract = True class

Python, pinax, django, windows AttributeError: 'module' object has no attribute 'call_subprocess'

强颜欢笑 提交于 2019-12-05 05:28:39
问题 I installed pinax on windows after trying to create a project I got this error: (mysite) C:\virtualenvs\mysite>pinax-admin setup_project mypinax Created project mypinax Installing project requirements... Traceback (most recent call last): File "c:\virtualenvs\mysite\Scripts\pinax-admin-script.py", line 8, in <module> load_entry_point('Pinax==0.9a2', 'console_scripts', 'pinax-admin')() File "c:\virtualenvs\mysite\lib\site-packages\pinax\core\management\__init__.py", line 105, in execute_from