Make GenericProduct slug unique
This commit is contained in:
		
					parent
					
						
							
								930333357e
							
						
					
				
			
			
				commit
				
					
						3bad37c605
					
				
			
		
					 2 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,5 +1,5 @@
 | 
			
		|||
# -*- coding: utf-8 -*-
 | 
			
		||||
# Generated by Django 1.9.4 on 2018-10-02 07:25
 | 
			
		||||
# Generated by Django 1.9.4 on 2018-10-02 07:57
 | 
			
		||||
from __future__ import unicode_literals
 | 
			
		||||
 | 
			
		||||
from django.db import migrations, models
 | 
			
		||||
| 
						 | 
				
			
			@ -25,7 +25,7 @@ class Migration(migrations.Migration):
 | 
			
		|||
                ('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)),
 | 
			
		||||
                ('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),
 | 
			
		||||
        ),
 | 
			
		||||
| 
						 | 
				
			
			@ -72,6 +72,7 @@ class GenericProduct(AssignPermissionsMixin, models.Model):
 | 
			
		|||
    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'
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue