Skip to content

Commit

Permalink
build: Run django-admin makemigrations
Browse files Browse the repository at this point in the history
  • Loading branch information
jpmckinney committed Jun 26, 2024
1 parent 9de2cc0 commit c8398b6
Show file tree
Hide file tree
Showing 2 changed files with 97 additions and 2 deletions.
58 changes: 58 additions & 0 deletions representatives/migrations/0005_auto_20240626_1411.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Generated by Django 3.2.25 on 2024-06-26 14:11

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('representatives', '0004_switch_to_django_jsonfield'),
]

operations = [
migrations.AlterField(
model_name='candidate',
name='extra',
field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='candidate',
name='incumbent',
field=models.BooleanField(blank=True, null=True),
),
migrations.AlterField(
model_name='candidate',
name='offices',
field=models.JSONField(default=list),
),
migrations.AlterField(
model_name='election',
name='enabled',
field=models.BooleanField(blank=True, db_index=True, default=True),
),
migrations.AlterField(
model_name='election',
name='last_import_successful',
field=models.BooleanField(blank=True, null=True),
),
migrations.AlterField(
model_name='representative',
name='extra',
field=models.JSONField(default=dict),
),
migrations.AlterField(
model_name='representative',
name='offices',
field=models.JSONField(default=list),
),
migrations.AlterField(
model_name='representativeset',
name='enabled',
field=models.BooleanField(blank=True, db_index=True, default=True),
),
migrations.AlterField(
model_name='representativeset',
name='last_import_successful',
field=models.BooleanField(blank=True, null=True),
),
]
41 changes: 39 additions & 2 deletions settings.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,20 @@
"""
To run `PYTHONPATH=$PYTHONPATH:$PWD django-admin.py migrate --settings settings --noinput`.
To run: env PYTHONPATH=$PWD DJANGO_SETTINGS_MODULE=settings django-admin migrate --noinput
"""
import os

ci = os.getenv('CI', False)

SECRET_KEY = 'x'

DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'travis_ci_test',
'HOST': 'localhost',
'NAME': 'postgres' if ci else 'represent',
'USER': 'postgres' if ci else '',
'PASSWORD': 'postgres' if ci else '',
'PORT': os.getenv('PORT', 5432),
}
}

Expand All @@ -16,5 +23,35 @@
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.gis',
'django.contrib.messages',
'representatives',
)

MIDDLEWARE = [
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
]

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]

DEFAULT_AUTO_FIELD = 'django.db.models.AutoField'

if 'GDAL_LIBRARY_PATH' in os.environ:
GDAL_LIBRARY_PATH = os.getenv('GDAL_LIBRARY_PATH')
if 'GEOS_LIBRARY_PATH' in os.environ:
GEOS_LIBRARY_PATH = os.getenv('GEOS_LIBRARY_PATH')

0 comments on commit c8398b6

Please sign in to comment.