Skip to content

Commit 470eabd

Browse files
committed
Add new externalities graph type
1 parent 8b6fc82 commit 470eabd

File tree

3 files changed

+22
-0
lines changed

3 files changed

+22
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# Generated by Django 5.1.6 on 2025-02-27 18:40
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
('main', '0123_alter_graph_graph_type'),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name='graph',
15+
name='graph_type',
16+
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),
17+
),
18+
]

econplayground/main/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
(24, 'Tax Supply and Demand vs. Tax Revenue'),
4343

4444
(25, 'Linear Demand and Supply - Surplus Policies'),
45+
(26, 'Externalities'),
4546
)
4647

4748
ASSIGNMENT_TYPES = (

media/js/src/utils.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -414,6 +414,9 @@ const displayGraphType = function(gType) {
414414
case 25:
415415
name = 'Linear Demand and Supply - Surplus Policies';
416416
break;
417+
case 26:
418+
name = 'Externalities';
419+
break;
417420
default:
418421
break;
419422
}

0 commit comments

Comments
 (0)