Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Edit country model
Browse files Browse the repository at this point in the history
- [x] rename the title of the "Healthcare budget" indicator to "Healthcare spending, $ per capita"
- [x] rename the title of the "GDP" indicator to "GDP per capita, $"
- [x] deployement script uncomment 'script.sh' and 'deploy.sh'
  • Loading branch information
sonikabaniya committed Apr 13, 2021
1 parent ad722c1 commit df817e3
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ erl_crash.dump
/htmlcov

# Deployment scripts used by Young Innovations
/script.sh
/deploy.sh
script.sh
deploy.sh

#Pycharm
*.idea/
24 changes: 24 additions & 0 deletions country/migrations/0032_auto_20210413_0605.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Generated by Django 3.1.7 on 2021-04-13 06:05

import django.core.validators
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('country', '0031_auto_20210401_0421'),
]

operations = [
migrations.AlterField(
model_name='country',
name='gdp',
field=models.FloatField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='GDP per capita, $'),
),
migrations.AlterField(
model_name='country',
name='healthcare_budget',
field=models.FloatField(blank=True, null=True, validators=[django.core.validators.MinValueValidator(0)], verbose_name='Healthcare spending, $ per capita'),
),
]
6 changes: 4 additions & 2 deletions country/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,16 @@ class Country(models.Model):
population = models.BigIntegerField(
verbose_name=_("Population"), null=True, blank=True, validators=[MinValueValidator(0)]
)
gdp = models.FloatField(verbose_name=_("GDP"), null=True, blank=True, validators=[MinValueValidator(0)])
gdp = models.FloatField(
verbose_name=_("GDP per capita, $"), null=True, blank=True, validators=[MinValueValidator(0)]
)
country_code = models.CharField(verbose_name=_("Country code"), max_length=10, null=False)
country_code_alpha_2 = models.CharField(
verbose_name=_("Country code alpha-2"), max_length=2, null=False, db_index=True
)
currency = models.CharField(verbose_name=_("Currency"), max_length=50, null=False)
healthcare_budget = models.FloatField(
verbose_name=_("Healthcare budget"), null=True, blank=True, validators=[MinValueValidator(0)]
verbose_name=_("Healthcare spending, $ per capita"), null=True, blank=True, validators=[MinValueValidator(0)]
)
healthcare_gdp_pc = models.FloatField(
verbose_name=_("% of GDP to healthcare"),
Expand Down

0 comments on commit df817e3

Please sign in to comment.