remove duplicated success message
This commit is contained in:
parent
9f28b65a58
commit
6d0e911866
|
@ -1,6 +1,7 @@
|
|||
from autofixture import AutoFixture
|
||||
from autofixture.generators import ImageGenerator
|
||||
from django.core.management.base import BaseCommand
|
||||
from django.core.management import call_command
|
||||
from mhackspace.base.models import BannerImages
|
||||
from mhackspace.feeds.models import Article, Feed
|
||||
from mhackspace.users.models import User
|
||||
|
@ -13,6 +14,10 @@ class Command(BaseCommand):
|
|||
help = 'Build test data for development environment'
|
||||
|
||||
def handle(self, *args, **options):
|
||||
# load known data
|
||||
call_command('loaddata', 'mhackspace/users/fixtures/groups.json', verbose=0)
|
||||
|
||||
# random data
|
||||
users = AutoFixture(User)
|
||||
users.create(10)
|
||||
|
||||
|
|
|
@ -113,7 +113,7 @@ class gocardless_provider:
|
|||
'amount': subscription.amount,
|
||||
'start_date': subscription.created_at,
|
||||
'reference': subscription.id,
|
||||
'success': response.success
|
||||
'success': response.get('success', False)
|
||||
}
|
||||
|
||||
def create_subscription(self, amount, name, redirect_success, redirect_failure, interval_unit='month', interval_length='1'):
|
||||
|
|
|
@ -106,10 +106,6 @@ class MembershipJoinSuccessView(LoginRequiredMixin, RedirectView):
|
|||
member.date = result.get('start_date')
|
||||
member.status = Membership.lookup_status(name=result.get('status'))
|
||||
member.save()
|
||||
messages.add_message(
|
||||
self.request,
|
||||
messages.SUCCESS,
|
||||
'Success your membership should now be active')
|
||||
kwargs['username'] = self.request.user.get_username()
|
||||
|
||||
# add user to group on success
|
||||
|
|
Loading…
Reference in New Issue