Skip to content

Commit

Permalink
Break out new Externalities graph type into three separate graph types
Browse files Browse the repository at this point in the history
Each of these scenarios has various modes within it, so I think these
should be separate graph types actually.
  • Loading branch information
nikolas committed Feb 27, 2025
1 parent 0848a70 commit 1fca2a2
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
18 changes: 18 additions & 0 deletions econplayground/main/migrations/0125_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 20:55

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('main', '0124_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, 'Negative Production Externality - Producer'), (27, 'Negative Production Externality - Industry'), (28, 'Positive Externality - Industry')], default=0),
),
]
6 changes: 5 additions & 1 deletion econplayground/main/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
(24, 'Tax Supply and Demand vs. Tax Revenue'),

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

# Externalities
(26, 'Negative Production Externality - Producer'),
(27, 'Negative Production Externality - Industry'),
(28, 'Positive Externality - Industry'),
)

ASSIGNMENT_TYPES = (
Expand Down
8 changes: 7 additions & 1 deletion media/js/src/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -415,7 +415,13 @@ const displayGraphType = function(gType) {
name = 'Linear Demand and Supply - Surplus Policies';
break;
case 26:
name = 'Externalities';
name = 'Negative Production Externality - Producer';
break;
case 27:
name = 'Negative Production Externality - Industry';
break;
case 28:
name = 'Positive Production Externality - Industry';
break;
default:
break;
Expand Down

0 comments on commit 1fca2a2

Please sign in to comment.