Skip to content
Open
Changes from 1 commit
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
0082ff2
Merge pull request #1 from devmedtz/authentication
devmedtz Oct 13, 2020
7350bb9
membership app added
devmedtz Oct 13, 2020
2f3186c
Merge pull request #2 from devmedtz/membership
devmedtz Oct 13, 2020
e9924ff
added all membership models
devmedtz Oct 13, 2020
468d0b8
Merge pull request #3 from devmedtz/membership
devmedtz Oct 13, 2020
201b43b
on signup business, businessteammember created
devmedtz Oct 13, 2020
d501b04
added dashboard and pricing page
devmedtz Oct 14, 2020
82ef752
Merge pull request #4 from devmedtz/membership
devmedtz Oct 14, 2020
9b9dd9d
add payment page
devmedtz Oct 15, 2020
e45c2f0
Merge pull request #7 from devmedtz/membership
devmedtz Oct 15, 2020
a674cd8
resolve issues
devmedtz Oct 15, 2020
a3d2e3b
Merge pull request #8 from devmedtz/membership
devmedtz Oct 15, 2020
9d5fa57
added portal-sdk for open mpesa api
devmedtz Oct 15, 2020
5468629
Merge pull request #9 from devmedtz/membership
devmedtz Oct 15, 2020
a3b80bb
update urllib3 to 1.25.10
devmedtz Oct 15, 2020
9e06004
Merge pull request #14 from devmedtz/membership
devmedtz Oct 15, 2020
f203854
Create SECURITY.md
devmedtz Oct 15, 2020
a47ff6d
Bump requests from 2.18.4 to 2.20.0 in /portal-sdk
dependabot[bot] Oct 15, 2020
1033232
Create codeql-analysis.yml
devmedtz Oct 15, 2020
79dac98
Merge pull request #12 from devmedtz/dependabot/pip/portal-sdk/reques…
devmedtz Oct 15, 2020
dad0c79
Bump requests from 2.18.4 to 2.20.0
dependabot[bot] Oct 15, 2020
58778b1
Bump urllib3 from 1.22 to 1.24.2 in /portal-sdk
dependabot[bot] Oct 15, 2020
99bfab5
Merge pull request #13 from devmedtz/dependabot/pip/portal-sdk/urllib…
devmedtz Oct 15, 2020
61d73c4
Merge pull request #11 from devmedtz/dependabot/pip/requests-2.20.0
devmedtz Oct 15, 2020
7ebd8cb
payment intergration continue
devmedtz Oct 15, 2020
9bb5411
Merge pull request #15 from devmedtz/membership
devmedtz Oct 15, 2020
a00330c
payment integration continue
devmedtz Oct 17, 2020
12fdf7a
Merge branch 'main' into membership
devmedtz Oct 17, 2020
4d92ab4
Merge pull request #16 from devmedtz/membership
devmedtz Oct 17, 2020
6c8c04b
hotfix
devmedtz Oct 17, 2020
734aef9
Merge branch 'membership' of github.com:devmedtz/django_saas into mem…
devmedtz Oct 17, 2020
367199d
Merge pull request #17 from devmedtz/membership
devmedtz Oct 17, 2020
526dd14
add AUTHORS.md
ZendaInnocent Oct 20, 2020
4994779
add contributing guide
ZendaInnocent Oct 20, 2020
038e434
update README file
ZendaInnocent Oct 20, 2020
19cc63d
Merge pull request #18 from ZendaInnocent/opens
devmedtz Oct 20, 2020
f1b2a7e
change SECRET_KEY to DJANGO_SECRET_KEY
ZendaInnocent Oct 20, 2020
9b71f18
update portalsdk api style
ZendaInnocent Oct 20, 2020
e59e645
use admin.register decorate for registering models in admin
ZendaInnocent Oct 20, 2020
da43b6a
style: enhancement of files
ZendaInnocent Oct 20, 2020
684e378
Merge pull request #20 from ZendaInnocent/fixes
devmedtz Oct 20, 2020
0f799f5
update requirements.txt for portalsdk
ZendaInnocent Oct 20, 2020
31cae9b
Merge pull request #21 from ZendaInnocent/portalsdk
devmedtz Oct 20, 2020
ea6ac4c
rename `env-example` to `.env-example`
ZendaInnocent Oct 20, 2020
6c63921
update README.md
ZendaInnocent Oct 20, 2020
ad14227
update accounts app
ZendaInnocent Oct 20, 2020
85a8929
Merge pull request #22 from ZendaInnocent/fix
devmedtz Oct 20, 2020
be95a6e
Merge pull request #27 from ZendaInnocent/accounts
devmedtz Oct 20, 2020
e2f7479
first commit
shankline Oct 22, 2020
3fb5331
creating subscription on sign up
shankline Oct 22, 2020
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions accounts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ def signup(request):
business = Business(user=user)
business.save()

# Create Plan
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan should be created by the Site Administrator prior to system usage, They should create the plan and set the price they want.

plan = Plan(name="testplan", description="test_description",duration_days=10,price=500.00,max_staff=10,max_branch=4)
plan.save()
# create BusinessTeamMember
business_team = BusinessTeamMember.objects.get_or_create(
business=business, user=user)
Expand All @@ -69,13 +72,14 @@ def signup(request):
ends_time = timezone.now() + timedelta(days=14)

subscription = Subscription.objects.get_or_create(
plan_id=1,
plan=plan,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When the new user signup on the system, the free subscription should be create automatic for that user

and free subscription, is linked by plan created by system admin

business=business,
start_time=timezone.now(),
ends_time=ends_time,
is_active=True,
)

# import pdb
# pdb.set_trace()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This comment has no meaning

# send confirmation email
token = account_activation_token.make_token(user)
user_id = urlsafe_base64_encode(force_bytes(user.id))
Expand Down