Commit fcf05109 authored by Michal Čihař's avatar Michal Čihař

Add trial field to billing

Signed-off-by: default avatarMichal Čihař <michal@cihar.com>
parent 49911527
......@@ -33,14 +33,14 @@ class PlanAdmin(admin.ModelAdmin):
class BillingAdmin(admin.ModelAdmin):
list_display = (
'user', 'plan',
'user', 'plan', 'trial',
'list_projects',
'count_changes_1m', 'count_changes_1q', 'count_changes_1y',
'count_repositories', 'count_strings', 'count_words',
'count_languages',
'in_limits',
)
list_filter = ('plan', )
list_filter = ('plan', 'trial')
search_fields = ('user__username', 'projects__name')
def list_projects(self, obj):
......
# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-22 12:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('billing', '0004_auto_20150917_1521'),
]
operations = [
migrations.AddField(
model_name='billing',
name='trial',
field=models.BooleanField(default=False),
),
]
......@@ -49,6 +49,7 @@ class Billing(models.Model):
plan = models.ForeignKey(Plan)
user = models.OneToOneField(User)
projects = models.ManyToManyField(Project, blank=True)
trial = models.BooleanField(default=False)
def __unicode__(self):
return u'{0} ({1})'.format(self.user, self.plan)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment