diff --git a/hosting/migrations/0048_auto_20181002_0757.py b/hosting/migrations/0048_auto_20181003_0757.py similarity index 82% rename from hosting/migrations/0048_auto_20181002_0757.py rename to hosting/migrations/0048_auto_20181003_0757.py index bbce4183..7b80958a 100644 --- a/hosting/migrations/0048_auto_20181002_0757.py +++ b/hosting/migrations/0048_auto_20181003_0757.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2018-10-02 07:57 +# Generated by Django 1.9.4 on 2018-10-03 07:57 from __future__ import unicode_literals from django.db import migrations, models @@ -19,13 +19,12 @@ class Migration(migrations.Migration): fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('product_name', models.CharField(default='', max_length=128)), + ('product_slug', models.SlugField(help_text='An optional html id for the Section. Required to set as target of a link on page', unique=True)), ('product_description', models.CharField(default='', max_length=500)), ('created_at', models.DateTimeField(auto_now_add=True)), - ('product_url', models.URLField(blank=True, max_length=1000, null=True)), ('product_price', models.DecimalField(decimal_places=2, max_digits=6)), ('product_vat', models.DecimalField(decimal_places=4, default=0, max_digits=6)), ('product_is_subscription', models.BooleanField(default=True)), - ('product_slug', models.SlugField(blank=True, help_text='An optional html id for the Section. Required to set as target of a link on page', null=True, unique=True)), ], bases=(utils.mixins.AssignPermissionsMixin, models.Model), ), diff --git a/hosting/models.py b/hosting/models.py index 1ab4c61f..b895b81d 100644 --- a/hosting/models.py +++ b/hosting/models.py @@ -64,20 +64,18 @@ class OrderDetail(AssignPermissionsMixin, models.Model): class GenericProduct(AssignPermissionsMixin, models.Model): permissions = ('view_genericproduct',) product_name = models.CharField(max_length=128, default="") - product_description = models.CharField(max_length=500, default="") - created_at = models.DateTimeField(auto_now_add=True) - product_url = models.URLField(max_length=1000, null=True, blank=True) - product_price = models.DecimalField(max_digits=6, decimal_places=2) - product_vat = models.DecimalField(max_digits=6, decimal_places=4, default=0) - product_is_subscription = models.BooleanField(default=True) product_slug = models.SlugField( - blank=True, null=True, unique=True, help_text=( 'An optional html id for the Section. Required to set as target ' 'of a link on page' ) ) + product_description = models.CharField(max_length=500, default="") + created_at = models.DateTimeField(auto_now_add=True) + product_price = models.DecimalField(max_digits=6, decimal_places=2) + product_vat = models.DecimalField(max_digits=6, decimal_places=4, default=0) + product_is_subscription = models.BooleanField(default=True) def __str__(self): return self.product_name