Skip to content

Commit 91493fb

Browse files
martin056RadoRado
authored andcommitted
Remove unused "short_name"
1 parent e7ff7e1 commit 91493fb

File tree

4 files changed

+3
-6
lines changed

4 files changed

+3
-6
lines changed

styleguide_example/test_examples/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class RosterSchoolCourseInline(admin.TabularInline):
3333

3434
@admin.register(SchoolCourse)
3535
class SchoolCourseAdmin(admin.ModelAdmin):
36-
list_display = ('name', 'short_name', 'slug', 'school', 'start_date', 'end_date', )
36+
list_display = ('name', 'slug', 'school', 'start_date', 'end_date', )
3737
list_filter = ('school', )
3838
inlines = (RosterSchoolCourseInline, )
3939

styleguide_example/test_examples/migrations/0001_initial.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 3.2.9 on 2021-11-18 12:21
1+
# Generated by Django 3.2.9 on 2021-11-19 07:57
22

33
from django.db import migrations, models
44
import django.db.models.deletion
@@ -31,15 +31,14 @@ class Migration(migrations.Migration):
3131
('school', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='students', to='test_examples.school')),
3232
],
3333
options={
34-
'unique_together': {('email', 'school'), ('identifier', 'school')},
34+
'unique_together': {('identifier', 'school'), ('email', 'school')},
3535
},
3636
),
3737
migrations.CreateModel(
3838
name='SchoolCourse',
3939
fields=[
4040
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
4141
('name', models.CharField(max_length=255)),
42-
('short_name', models.CharField(max_length=50)),
4342
('slug', models.SlugField(max_length=255)),
4443
('start_date', models.DateField()),
4544
('end_date', models.DateField()),

styleguide_example/test_examples/models.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ def __str__(self):
2929

3030
class SchoolCourse(models.Model):
3131
name = models.CharField(max_length=255)
32-
short_name = models.CharField(max_length=50)
3332
slug = models.SlugField(max_length=255)
3433
school = models.ForeignKey(School, related_name='school_courses', on_delete=models.CASCADE)
3534

styleguide_example/test_examples/tests/factories.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ class Meta:
4545
model = SchoolCourse
4646

4747
name = factory.LazyAttribute(lambda _: faker.unique.sentence(nb_words=3)[:-1]) # remove the end punctuation
48-
short_name = factory.LazyAttribute(lambda self: self.name.split(' ')[0])
4948
slug = factory.LazyAttribute(lambda self: slugify(self.name))
5049
school = factory.SubFactory(SchoolFactory)
5150

0 commit comments

Comments
 (0)