core: add slug to application
This commit is contained in:
parent
7178468135
commit
2eae37107d
|
@ -12,7 +12,8 @@ class ApplicationForm(forms.ModelForm):
|
|||
class Meta:
|
||||
|
||||
model = Application
|
||||
fields = ['name', 'launch_url', 'icon_url', 'rules', 'provider', 'skip_authorization']
|
||||
fields = ['name', 'slug', 'launch_url', 'icon_url',
|
||||
'rules', 'provider', 'skip_authorization']
|
||||
widgets = {
|
||||
'name': forms.TextInput(),
|
||||
'launch_url': forms.TextInput(),
|
||||
|
|
19
passbook/core/migrations/0004_application_slug.py
Normal file
19
passbook/core/migrations/0004_application_slug.py
Normal file
|
@ -0,0 +1,19 @@
|
|||
# Generated by Django 2.1.4 on 2018-12-26 15:52
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('passbook_core', '0003_invite'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='application',
|
||||
name='slug',
|
||||
field=models.SlugField(default=''),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
|
@ -55,6 +55,7 @@ class Application(RuleModel):
|
|||
add custom fields and other properties"""
|
||||
|
||||
name = models.TextField()
|
||||
slug = models.SlugField()
|
||||
launch_url = models.URLField(null=True, blank=True)
|
||||
icon_url = models.TextField(null=True, blank=True)
|
||||
provider = models.OneToOneField('Provider', null=True,
|
||||
|
|
Reference in a new issue