Skip to content

Commit

Permalink
specify psycopg binary version
Browse files Browse the repository at this point in the history
  • Loading branch information
dragonejt committed Mar 23, 2024
1 parent f89ddef commit 08fdd92
Show file tree
Hide file tree
Showing 7 changed files with 158 additions and 31 deletions.
2 changes: 1 addition & 1 deletion Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ whitenoise = "*"
pyyaml = "*"
gunicorn = "*"
uritemplate = "*"
psycopg = "*"
psycopg = {extras = ["binary"], version = "*"}

[dev-packages]
pylint = "*"
Expand Down
99 changes: 82 additions & 17 deletions Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Generated by Django 5.0.3 on 2024-03-23 20:25

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('psychopass', '0004_alter_userpsychopass_identity_attack_and_more'),
]

operations = [
migrations.AlterField(
model_name='userpsychopass',
name='identity_attack',
field=models.FloatField(db_default=0.5),
),
migrations.AlterField(
model_name='userpsychopass',
name='insult',
field=models.FloatField(db_default=0.5),
),
migrations.AlterField(
model_name='userpsychopass',
name='messages',
field=models.PositiveIntegerField(db_default=0),
),
migrations.AlterField(
model_name='userpsychopass',
name='profanity',
field=models.FloatField(db_default=0.5),
),
migrations.AlterField(
model_name='userpsychopass',
name='psycho_hazard',
field=models.BooleanField(db_default=False),
),
migrations.AlterField(
model_name='userpsychopass',
name='severe_toxicity',
field=models.FloatField(db_default=0.5),
),
migrations.AlterField(
model_name='userpsychopass',
name='sexually_explicit',
field=models.FloatField(db_default=0.5),
),
migrations.AlterField(
model_name='userpsychopass',
name='threat',
field=models.FloatField(db_default=0.5),
),
migrations.AlterField(
model_name='userpsychopass',
name='toxicity',
field=models.FloatField(db_default=0.5),
),
]
2 changes: 1 addition & 1 deletion sibyl/asgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
It exposes the ASGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.1/howto/deployment/asgi/
https://docs.djangoproject.com/en/dev/howto/deployment/asgi/
"""

import os
Expand Down
24 changes: 14 additions & 10 deletions sibyl/settings.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
"""
Django settings for sibyl project.
Generated by 'django-admin startproject' using Django 4.0.5.
Generated by 'django-admin startproject' using Django.
For more information on this file, see
https://docs.djangoproject.com/en/4.0/topics/settings/
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/4.0/ref/settings/
https://docs.djangoproject.com/en/dev/ref/settings/
"""

import os
Expand All @@ -20,7 +20,7 @@


# Quick-start development settings - unsuitable for production
# See https://docs.djangoproject.com/en/4.0/howto/deployment/checklist/
# See https://docs.djangoproject.com/en/dev/howto/deployment/checklist/

# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = get_random_secret_key()
Expand Down Expand Up @@ -80,7 +80,7 @@


# Database
# https://docs.djangoproject.com/en/4.0/ref/settings/#databases
# https://docs.djangoproject.com/en/dev/ref/settings/#databases

DATABASES = {
'default': dj_database_url.parse(os.getenv("DATABASE_URL")) if "DATABASE_URL" in os.environ else {
Expand All @@ -91,7 +91,7 @@


# Password validation
# https://docs.djangoproject.com/en/4.0/ref/settings/#auth-password-validators
# https://docs.djangoproject.com/en/dev/ref/settings/#auth-password-validators

AUTH_PASSWORD_VALIDATORS = [
{
Expand All @@ -110,7 +110,7 @@


# Internationalization
# https://docs.djangoproject.com/en/4.0/topics/i18n/
# https://docs.djangoproject.com/en/dev/topics/i18n/

LANGUAGE_CODE = 'en-us'

Expand All @@ -122,14 +122,18 @@


# Static files (CSS, JavaScript, Images)
# https://docs.djangoproject.com/en/4.0/howto/static-files/
# https://docs.djangoproject.com/en/dev/howto/static-files/

STATIC_URL = 'static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles')
STATICFILES_STORAGE = 'whitenoise.storage.CompressedManifestStaticFilesStorage'
STORAGES = {
"staticfiles": {
"BACKEND": "whitenoise.storage.CompressedManifestStaticFilesStorage",
},
}

# Default primary key field type
# https://docs.djangoproject.com/en/4.0/ref/settings/#default-auto-field
# https://docs.djangoproject.com/en/dev/ref/settings/#default-auto-field

DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField'

Expand Down
2 changes: 1 addition & 1 deletion sibyl/urls.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""sibyl URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/4.1/topics/http/urls/
https://docs.djangoproject.com/en/dev/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
Expand Down
2 changes: 1 addition & 1 deletion sibyl/wsgi.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/4.1/howto/deployment/wsgi/
https://docs.djangoproject.com/en/dev/howto/deployment/wsgi/
"""

import os
Expand Down

0 comments on commit 08fdd92

Please sign in to comment.