示例#1
0
    def get_custom_context(self, request):
        """Return a dictionary of context variables

        These are added to the template context for the email template

        """
        from storybase.context_processors import conf
        # Return site-wide configuration context variables 
        context = conf(request)
        return context 
示例#2
0
    def get_custom_context(self, request):
        """Return a dictionary of context variables

        These are added to the template context for the email template

        """
        from storybase.context_processors import conf
        # Return site-wide configuration context variables
        context = conf(request)
        return context
示例#3
0
    def send_password_reset_emails(self, request, queryset):
        """Send a password reset email to users
        
        This is an admin action.
        """
        # TODO: Figure out if there's any good reason why I imported
        # these locallly
        from storybase.context_processors import conf
        from storybase_user.auth.utils import send_password_reset_email

        for user in queryset:
            send_password_reset_email(user, request=request, extra_context=conf(request))
        self.message_user(request, "Password reset email sent")
示例#4
0
    def send_password_reset_emails(self, request, queryset):
        """Send a password reset email to users
        
        This is an admin action.
        """
        # TODO: Figure out if there's any good reason why I imported
        # these locallly
        from storybase.context_processors import conf
        from storybase_user.auth.utils import send_password_reset_email

        for user in queryset:
            send_password_reset_email(user,
                                      request=request,
                                      extra_context=conf(request))
        self.message_user(request, "Password reset email sent")