Skip to content

Commit

Permalink
Add new externalities graph type
Browse files Browse the repository at this point in the history
  • Loading branch information
nikolas committed Feb 27, 2025
1 parent 8b6fc82 commit 470eabd
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions econplayground/main/migrations/0124_alter_graph_graph_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 5.1.6 on 2025-02-27 18:40

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('main', '0123_alter_graph_graph_type'),
]

operations = [
migrations.AlterField(
model_name='graph',
name='graph_type',
field=models.PositiveSmallIntegerField(choices=[(0, 'Linear Demand and Supply'), (1, 'Input Markets'), (3, 'Cobb-Douglas Production Graph'), (5, 'Consumption-Leisure: Constraint'), (7, 'Consumption-Saving: Constraint'), (8, 'Linear Demand and Supply: 3 Functions'), (9, 'Linear Demand and Supply: Areas'), (10, 'Input Markets: Areas'), (11, 'Consumption-Saving: Optimal Choice'), (15, 'Consumption-Leisure: Optimal Choice'), (12, 'Input-Output Illustrations'), (13, 'Linear Demand and Supply: 2 Diagrams'), (14, 'Input Markets: 2 Diagrams'), (16, 'Template Graph'), (17, 'Optimal Choice: Consumption with 2 Goods'), (18, 'Cost Functions'), (20, 'Price Elasticity of Demand and Revenue'), (21, 'Optimal Choice: Cost-Minimizing Production Inputs'), (22, 'Tax Rate and Revenue'), (23, 'Taxation in Linear Demand and Supply'), (24, 'Tax Supply and Demand vs. Tax Revenue'), (25, 'Linear Demand and Supply - Surplus Policies'), (26, 'Externalities')], default=0),
),
]
1 change: 1 addition & 0 deletions econplayground/main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
(24, 'Tax Supply and Demand vs. Tax Revenue'),

(25, 'Linear Demand and Supply - Surplus Policies'),
(26, 'Externalities'),
)

ASSIGNMENT_TYPES = (
Expand Down
3 changes: 3 additions & 0 deletions media/js/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,9 @@ const displayGraphType = function(gType) {
case 25:
name = 'Linear Demand and Supply - Surplus Policies';
break;
case 26:
name = 'Externalities';
break;
default:
break;
}
Expand Down

0 comments on commit 470eabd

Please sign in to comment.