Skip to content

Commit

Permalink
Migrate to Django 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Uxio0 committed Jun 10, 2021
1 parent 1e45bf8 commit f864c89
Show file tree
Hide file tree
Showing 7 changed files with 83 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .env.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Test project outside docker
PYTHONPATH=/app/safe_relay_service
C_FORCE_ROOT=true
DEBUG=0
USE_DOCKER=False
DJANGO_SETTINGS_MODULE=config.settings.test
DJANGO_SECRET_KEY=test-secret#-!key
DATABASE_URL=psql://postgres:postgres@localhost:5432/postgres
REDIS_URL=redis://localhost/0
CELERY_BROKER_URL=redis://localhost/0
ETHEREUM_NODE_URL=http://localhost:8545
SAFE_FUNDER_PRIVATE_KEY=4f3edf983ac636a65a842ce7c78d9aa706d3b113bce9c46f30d7d21715b23b1d
SAFE_TX_SENDER_PRIVATE_KEY=6cbed15c793ce57650b9877cf6fa156fbef513c4e6134f022a85b1ffdd59b2a1
DEPLOY_MASTER_COPY_ON_INIT=0
2 changes: 2 additions & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@
}
DATABASES['default']['ATOMIC_REQUESTS'] = True

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

# URLS
# ------------------------------------------------------------------------------
# https://docs.djangoproject.com/en/dev/ref/settings/#root-urlconf
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ djangorestframework==3.12.4
docutils==0.17.1
drf-yasg[validation]==1.20.0
ethereum==2.3.2
gnosis-py==3.0.7
gnosis-py==3.1.0
gunicorn[gevent]==20.1.0
hexbytes==0.2.1
lxml==4.6.3
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Generated by Django 3.2.4 on 2021-06-10 15:02

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('gas_station', '0002_auto_20180604_1627'),
]

operations = [
migrations.AlterField(
model_name='gasprice',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
]
6 changes: 2 additions & 4 deletions safe_relay_service/relay/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,14 @@ def from_(self, obj: EthereumEvent):
def to(self, obj: EthereumEvent):
return obj.arguments.get('to')

@admin.display(boolean=True)
def erc20(self, obj: EthereumEvent):
return obj.is_erc20()

@admin.display(boolean=True)
def erc721(self, obj: EthereumEvent):
return obj.is_erc721()

# Fancy icons
erc20.boolean = True
erc721.boolean = True


@admin.register(EthereumTx)
class EthereumTxAdmin(admin.ModelAdmin):
Expand Down
23 changes: 23 additions & 0 deletions safe_relay_service/relay/migrations/0030_auto_20210610_1502.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.4 on 2021-06-10 15:02

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('relay', '0029_auto_20201102_1643'),
]

operations = [
migrations.AlterField(
model_name='ethereumevent',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
migrations.AlterField(
model_name='safemultisigtx',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
]
23 changes: 23 additions & 0 deletions safe_relay_service/tokens/migrations/0015_auto_20210610_1502.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.4 on 2021-06-10 15:02

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('tokens', '0014_auto_20201102_1643'),
]

operations = [
migrations.AlterField(
model_name='priceoracle',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
migrations.AlterField(
model_name='priceoracleticker',
name='id',
field=models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID'),
),
]

0 comments on commit f864c89

Please sign in to comment.