-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
apps/cms: use model fields for storefront counts
- Loading branch information
1 parent
929aee9
commit b20189f
Showing
3 changed files
with
73 additions
and
21 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
meinberlin/apps/cms/migrations/0040_storefront_add_numbers_as_fields.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Generated by Django 3.2.17 on 2023-02-09 12:31 | ||
|
||
from django.db import migrations, models | ||
import meinberlin.apps.cms.models.storefronts | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("meinberlin_cms", "0039_alter_homepage_body"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="storefront", | ||
name="num_entries", | ||
field=models.PositiveIntegerField( | ||
default=meinberlin.apps.cms.models.storefronts.get_num_entries_count | ||
), | ||
), | ||
migrations.AddField( | ||
model_name="storefront", | ||
name="num_projects", | ||
field=models.PositiveIntegerField( | ||
default=meinberlin.apps.cms.models.storefronts.get_num_projects_count | ||
), | ||
), | ||
] |
18 changes: 18 additions & 0 deletions
18
meinberlin/apps/cms/migrations/0041_storefrontitem_district_project_count.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 3.2.17 on 2023-02-09 12:48 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
dependencies = [ | ||
("meinberlin_cms", "0040_storefront_add_numbers_as_fields"), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name="storefrontitem", | ||
name="district_project_count", | ||
field=models.PositiveIntegerField(default=0), | ||
preserve_default=False, | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters