-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into Features/finanskonto
- Loading branch information
Showing
27 changed files
with
353 additions
and
27 deletions.
There are no files selected for viewing
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
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
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
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,11 @@ | ||
# use this file as override, if on Arm64 architecture, e.g. Mac M1 | ||
# example commands: | ||
# - docker compose -f docker-compose.yml -f docker-compose.arm64.yml up --build | ||
# - docker compose -f docker-compose.yml -f docker-compose.arm64.yml run --build web ./manage.py test | ||
services: | ||
selenium: | ||
image: seleniarm/standalone-chromium | ||
networks: | ||
- webnet | ||
ports: | ||
- "4444:4444" |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
version: "3.3" | ||
|
||
services: | ||
web: | ||
build: . | ||
|
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
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
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
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
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
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,5 @@ | ||
from django.contrib import admin | ||
|
||
|
||
class MunicipalityAdmin(admin.ModelAdmin): | ||
list_display = ("municipality", "address", "zipcode", "city", "email") |
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
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,45 @@ | ||
import csv | ||
from django.core.management.base import BaseCommand | ||
from members.models import Municipality | ||
|
||
# run locally: | ||
# docker compose run web ./manage.py import_municipalities members/management/commands/municipalities.csv | ||
|
||
|
||
class Command(BaseCommand): | ||
help = "Import municipalities data from a CSV file into the Municipality model" | ||
|
||
def add_arguments(self, parser): | ||
parser.add_argument( | ||
"csv_file", | ||
type=str, | ||
help="Path to the CSV file containing municipalities data", | ||
) | ||
|
||
def handle(self, *args, **kwargs): | ||
csv_file_path = kwargs["csv_file"] | ||
|
||
try: | ||
with open(csv_file_path, mode="r", encoding="utf-8") as file: | ||
reader = csv.reader(file, delimiter=";") | ||
for row in reader: | ||
municipality, address, zipcode, city, email = row | ||
Municipality.objects.create( | ||
municipality=municipality, | ||
address=address, | ||
zipcode=zipcode, | ||
city=city, | ||
email=email, | ||
) | ||
self.stdout.write(f"Added municipality: {municipality}") | ||
|
||
self.stdout.write( | ||
self.style.SUCCESS("Successfully imported all municipalities") | ||
) | ||
|
||
except FileNotFoundError: | ||
self.stdout.write( | ||
self.style.ERROR( | ||
f"File {csv_file_path} not found. Please check the file path." | ||
) | ||
) |
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,98 @@ | ||
Albertslund Kommune;Nordmarks Allé;2620;Albertslund;[email protected] | ||
Allerød Kommune;Bjarkesvej;3450;Allerød;[email protected] | ||
Assens Kommune;Rådhus Allé 5;5610;Assens;[email protected] | ||
Ballerup Kommune;Hold-an Vej 7;2750;Ballerup;[email protected] | ||
Billund Kommune;Jorden Rundt 1;7200;Grindsted;[email protected] | ||
Bornholms Regionskommune;Ullasvej 23;3700;Rønne;[email protected] | ||
Brøndby Kommune;Park Allé 160;2605;Brøndby;[email protected] | ||
Brønderslev Kommune;Ny Rådhusplads 1;9700;Brønderslev;[email protected] | ||
Dragør Kommune;Kirkevej 7;2791;Dragør;[email protected] | ||
Egedal Kommune;Dronning Dagmars Vej 200;3660;Stenløse;[email protected] | ||
Esbjerg Kommune;Torvegade 74;6700;Esbjerg;[email protected] | ||
Fanø Kommune;Skolevej 5-7;6720;Fanø;[email protected] | ||
Favrskov Kommune;Skovvej 20;8382;Hinnerup;[email protected] | ||
Faxe Kommune;Frederiksgade 9;4690;Haslev;[email protected] | ||
Fredensborg Kommune;Egevangen 3 B;2980;Kokkedal;[email protected] | ||
Fredericia Kommune;Gothersgade 20;7000;Fredericia;[email protected] | ||
Frederiksberg Kommune;Smallegade 1;2000;Frederiksberg;[email protected] | ||
Frederikshavn Kommune;Rådhus Allé 100;9900;Frederikshavn;[email protected] | ||
Frederikssund Kommune;Torvet 2;3600;Frederikssund;[email protected] | ||
Furesø Kommune;Rådhustorvet 2;3520;Farum;[email protected] | ||
Faaborg-Midtfyn Kommune;Tinghøj Allé 2;5750;Ringe;[email protected] | ||
Gentofte Kommune;Bernstorffsvej 161;2920;Charlottenlund;[email protected] | ||
Gladsaxe Kommune;Rådhus Allé 7;2860;Søborg;[email protected] | ||
Glostrup Kommune;Rådhusparken 2;2600;Glostrup;[email protected] | ||
Greve Kommune;Rådhusholmen 10;2670;Greve;[email protected] | ||
Gribskov Kommune;Rådhusvej 3;3200;Helsinge;[email protected] | ||
Guldborgsund Kommune;Parkvej 37;4800;Nykøbing Falster;[email protected] | ||
Haderslev Kommune;Christian X's Vej 39;6100;Haderslev;[email protected] | ||
Halsnæs Kommune;Rådhuspladsen 1;3300;Frederiksværk;[email protected] | ||
Hedensted Kommune;Niels Espes Vej 8;8722;Hedensted;[email protected] | ||
Helsingør Kommune;Stengade 59;3000;Helsingør;[email protected] | ||
Herlev Kommune;Herlev Bygade 90;2730;Herlev;[email protected] | ||
Herning Kommune;Torvet;7400;Herning;[email protected] | ||
Hillerød Kommune;Trollesmindealle 27;3400;Hillerød;[email protected] | ||
Hjørring Kommune;Nørregade 2;9800;Hjørring;[email protected] | ||
Holbæk Kommune;Kanalstræde 2;4300;Holbæk;[email protected] | ||
Holstebro Kommune;Kirkestræde 11;7500;Holstebro;[email protected] | ||
Horsens Kommune;Rådhustorvet 4;8700;Horsens;[email protected] | ||
Hvidovre Kommune;Hvidovrevej 278;2650;Hvidovre;[email protected] | ||
Høje-Taastrup Kommune;Rådhusstræde 1;2630;Taastrup;[email protected] | ||
Hørsholm Kommune;Slotsmarken 13;2970;Hørsholm;[email protected] | ||
Ikast-Brande Kommune;Rådhusstrædet 6;7430;Ikast;[email protected] | ||
Ishøj Kommune;Ishøj Store Torv 20;2635;Ishøj;[email protected] | ||
Jammerbugt Kommune;Toftevej 43;9440;Aabybro;[email protected] | ||
Kalundborg Kommune;Klosterparkvej 7;4400;Kalundborg;[email protected] | ||
Kerteminde Kommune;Hans Schacksvej 4;5300;Kerteminde;[email protected] | ||
Kolding Kommune;Akseltorv 1;6000;Kolding;[email protected] | ||
Københavns Kommune;Rådhuset;1599;København V;[email protected] | ||
Køge Kommune;Torvet 1;4600;Køge;[email protected] | ||
Langeland Kommune;Fredensvej 1;5900;Rudkøbing;[email protected] | ||
Lejre Kommune;Møllebjergvej 4;4330;Hvalsø;[email protected] | ||
Lemvig Kommune;Rådhusgade 2;7620;Lemvig;[email protected] | ||
Lolland Kommune;Jernbanegade 7;4930;Maribo;[email protected] | ||
Lyngby-Taarbæk Kommune;Lyngby Torv;2800;Kongens Lyngby;[email protected] | ||
Læsø Kommune;Doktorvejen 2;9940;Læsø;[email protected] | ||
Mariagerfjord Kommune;Nordre Kajgade 1;9500;Hobro;[email protected] | ||
Middelfart Kommune;Nytorv 9;5500;Middelfart;[email protected] | ||
Morsø Kommune;Jernbanevej 7;7900;Nykøbing Mors;[email protected] | ||
Norddjurs Kommune;Torvet 3;8500;Grenaa;[email protected] | ||
Nordfyns Kommune;Østergade 23;5400;Bogense;[email protected] | ||
Nyborg Kommune;Torvet 1;5800;Nyborg;[email protected] | ||
Næstved Kommune;Rådmandshaven 20;4700;Næstved;[email protected] | ||
Odder Kommune;Rådhusgade 3;8300;Odder;[email protected] | ||
Odense Kommune;Flakhaven 2;5000;Odense C;[email protected] | ||
Odsherred Kommune;Nyvej 22;4573;Højby;[email protected] | ||
Randers Kommune;Laksetorvet;8900;Randers C;[email protected] | ||
Rebild Kommune;Hobrovej 110;9530;Støvring;[email protected] | ||
Ringkøbing-Skjern Kommune;Ved Fjorden 6;6950;Ringkøbing;[email protected] | ||
Ringsted Kommune;Sct. Bendtsgade 1;4100;Ringsted;[email protected] | ||
Roskilde Kommune;Rådhusbuen 1;4000;Roskilde;[email protected] | ||
Rudersdal Kommune;Øverødvej 2;2840;Holte;[email protected] | ||
Rødovre Kommune;Rødovre Parkvej 150;2610;Rødovre;[email protected] | ||
Samsø Kommune;Søtofte 10;8305;Samsø;[email protected] | ||
Silkeborg Kommune;Søvej 1;8600;Silkeborg;[email protected] | ||
Skanderborg Kommune;Skanderborg Fælled 1;8660;Skanderborg;[email protected] | ||
Skive Kommune;Torvegade 10;7800;Skive;[email protected] | ||
Slagelse Kommune;Rådhuspladsen 11;4200;Slagelse;[email protected] | ||
Solrød Kommune;Solrød Center 1;2680;Solrød Strand;[email protected] | ||
Sorø Kommune;Rådhusvej 8;4180;Sorø;[email protected] | ||
Stevns Kommune;Rådhuspladsen 4;4660;Store Heddinge;[email protected] | ||
Struer Kommune;Østergade 11-15;7600;Struer;[email protected] | ||
Svendborg Kommune;Ramsherred 5;5700;Svendborg;[email protected] | ||
Syddjurs Kommune;Lundbergsvej 2;8400;Ebbeltoft;[email protected] | ||
Sønderborg Kommune;Rådhustorvet 10;6400;Sønderborg;[email protected] | ||
Thisted Kommune;Asylgade 30;7700;Thisted;[email protected] | ||
Tønder Kommune;Kongevej 57;6270;Tønder;[email protected] | ||
Tårnby Kommune;Amager Landevej 76;2770;Kastrup;[email protected] | ||
Vallensbæk Kommune;Vallensbæk Stationstorv 100;2665;Vallensbæk Strand;[email protected] | ||
Varde Kommune;Bytoften 2;6800;Varde;[email protected] | ||
Vejen Kommune;Rådhuspassagen 3;6600;Vejen;[email protected] | ||
Vejle Kommune;Skolegade 1;7100;Vejle;[email protected] | ||
Vesthimmerlands Kommune;Vestre Boulevard 7;9600;Aars;[email protected] | ||
Viborg Kommune;Prinsens Alle 5;8800;Viborg;[email protected] | ||
Vordingborg Kommune;Valdemarsgade 43;4760;Vordingborg;[email protected] | ||
Ærø Kommune;Statene 2;5970;Ærøskøbing;[email protected] | ||
Aabenraa Kommune;Skelbækvej 2;6200;Aabenraa;[email protected] | ||
Aalborg Kommune;Boulevarden 13;9000;Aalborg;[email protected] | ||
Aarhus Kommune;Rådhuspladsen 2;8000;Aarhus C;[email protected] |
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,23 @@ | ||
# Generated by Django 4.2.16 on 2024-10-27 09:18 | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("members", "0055_rename_union_email_union_email"), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name="activityinvite", | ||
name="activity", | ||
field=models.ForeignKey( | ||
on_delete=django.db.models.deletion.DO_NOTHING, | ||
to="members.activity", | ||
verbose_name="Aktivitet", | ||
), | ||
), | ||
] |
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,40 @@ | ||
# Generated by Django 4.2.16 on 2024-10-27 13:07 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
("members", "0056_alter_activityinvite_activity"), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name="Municipality", | ||
fields=[ | ||
( | ||
"id", | ||
models.AutoField( | ||
auto_created=True, | ||
primary_key=True, | ||
serialize=False, | ||
verbose_name="ID", | ||
), | ||
), | ||
( | ||
"municipality", | ||
models.CharField(max_length=255, verbose_name="Kommune"), | ||
), | ||
("address", models.CharField(max_length=255, verbose_name="Adresse")), | ||
("zipcode", models.CharField(max_length=10, verbose_name="Postnr")), | ||
("city", models.CharField(max_length=100, verbose_name="By")), | ||
("email", models.EmailField(max_length=254, verbose_name="E-mail")), | ||
], | ||
options={ | ||
"verbose_name": "Kommune", | ||
"verbose_name_plural": "Kommuner", | ||
"ordering": ["municipality"], | ||
}, | ||
), | ||
] |
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
Oops, something went wrong.