Browse Source

team_access_allowed field is not used any more, removing.

pull/140/head
Pēteris Caune 7 years ago
parent
commit
f6c585a10c
4 changed files with 20 additions and 5 deletions
  1. +1
    -1
      hc/accounts/admin.py
  2. +19
    -0
      hc/accounts/migrations/0013_remove_profile_team_access_allowed.py
  3. +0
    -1
      hc/accounts/models.py
  4. +0
    -3
      hc/payments/views.py

+ 1
- 1
hc/accounts/admin.py View File

@ -46,7 +46,7 @@ class ProfileAdmin(admin.ModelAdmin):
list_display = ("id", "users", "checks", "invited",
"reports_allowed", "ping_log_limit", "sms")
search_fields = ["id", "user__email"]
list_filter = ("team_access_allowed", "team_limit", "reports_allowed",
list_filter = ("team_limit", "reports_allowed",
"check_limit", "next_report_date")
fieldsets = (ProfileFieldset.tuple(), TeamFieldset.tuple())


+ 19
- 0
hc/accounts/migrations/0013_remove_profile_team_access_allowed.py View File

@ -0,0 +1,19 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2017-10-14 16:15
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('accounts', '0012_auto_20171014_1002'),
]
operations = [
migrations.RemoveField(
model_name='profile',
name='team_access_allowed',
),
]

+ 0
- 1
hc/accounts/models.py View File

@ -44,7 +44,6 @@ class Profile(models.Model):
# Owner:
user = models.OneToOneField(User, models.CASCADE, blank=True, null=True)
team_name = models.CharField(max_length=200, blank=True)
team_access_allowed = models.BooleanField(default=False)
next_report_date = models.DateTimeField(null=True, blank=True)
reports_allowed = models.BooleanField(default=True)
nag_period = models.DurationField(default=NO_NAG, choices=NAG_PERIODS)


+ 0
- 3
hc/payments/views.py View File

@ -113,7 +113,6 @@ def create_plan(request):
profile.team_limit = 9
profile.sms_limit = 50
profile.sms_sent = 0
profile.team_access_allowed = True
profile.save()
elif plan_id == "P50":
profile.ping_log_limit = 1000
@ -121,7 +120,6 @@ def create_plan(request):
profile.team_limit = 500
profile.sms_limit = 500
profile.sms_sent = 0
profile.team_access_allowed = True
profile.save()
request.session["first_charge"] = True
@ -173,7 +171,6 @@ def cancel_plan(request):
profile.check_limit = 20
profile.team_limit = 2
profile.sms_limit = 0
profile.team_access_allowed = False
profile.save()
return redirect("hc-pricing")


Loading…
Cancel
Save