trivial: apply pre-commit rules
gitea/bidon/pipeline/head This commit looks good
Details
gitea/bidon/pipeline/head This commit looks good
Details
This commit is contained in:
parent
a324736fff
commit
0f750dc7c8
|
@ -37,7 +37,7 @@ INSTALLED_APPS = (
|
|||
'django.contrib.sessions',
|
||||
'django.contrib.messages',
|
||||
'django.contrib.staticfiles',
|
||||
'bidon.bidon_app'
|
||||
'bidon.bidon_app',
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = (
|
||||
|
@ -104,7 +104,8 @@ STATIC_URL = '/static/'
|
|||
|
||||
|
||||
local_settings_file = os.environ.get(
|
||||
'BIDON_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py'))
|
||||
'BIDON_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py')
|
||||
)
|
||||
|
||||
if os.path.exists(local_settings_file):
|
||||
with open(local_settings_file) as f:
|
||||
|
|
|
@ -12,10 +12,9 @@ Class-based views
|
|||
Including another URLconf
|
||||
1. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
|
||||
"""
|
||||
from django.conf.urls import include, url
|
||||
from django.contrib import admin
|
||||
|
||||
from django.urls import include, path
|
||||
|
||||
urlpatterns = [
|
||||
url(r'^admin/', include(admin.site.urls)),
|
||||
path('admin/', include(admin.site.urls)),
|
||||
]
|
||||
|
|
|
@ -11,6 +11,6 @@ import os
|
|||
|
||||
from django.core.wsgi import get_wsgi_application
|
||||
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bidon.settings")
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bidon.settings')
|
||||
|
||||
application = get_wsgi_application()
|
||||
|
|
|
@ -3,18 +3,17 @@ Section: python
|
|||
Priority: optional
|
||||
Maintainer: Emmanuel Cazenave <ecazenave@entrouvert.com>
|
||||
Build-Depends: debhelper-compat (= 12),
|
||||
python3-django,
|
||||
python3-setuptools,
|
||||
python3-all,
|
||||
dh-python
|
||||
dh-python,
|
||||
python3-all,
|
||||
python3-django,
|
||||
python3-setuptools,
|
||||
Standards-Version: 3.9.6
|
||||
Homepage: https://dev.entrouvert.org/projects/bidon
|
||||
|
||||
Package: python-eo-bidon
|
||||
Architecture: all
|
||||
Depends: ${python:Depends},
|
||||
${misc:Depends},
|
||||
python3-django (>= 1:1.11),
|
||||
python3-setuptools,
|
||||
Depends: python3-django (>= 1:1.11),
|
||||
python3-setuptools,
|
||||
${misc:Depends},
|
||||
${python:Depends},
|
||||
Description: Entr'ouvert sandox package (python module)
|
||||
|
||||
|
|
|
@ -2,8 +2,8 @@
|
|||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "bidon.settings")
|
||||
if __name__ == '__main__':
|
||||
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bidon.settings')
|
||||
|
||||
from django.core.management import execute_from_command_line
|
||||
|
||||
|
|
10
setup.py
10
setup.py
|
@ -1,14 +1,13 @@
|
|||
#! /usr/bin/env python
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import os
|
||||
import subprocess
|
||||
|
||||
from setuptools.command.install_lib import install_lib as _install_lib
|
||||
from distutils.cmd import Command
|
||||
from distutils.command.build import build as _build
|
||||
from distutils.command.sdist import sdist
|
||||
from distutils.cmd import Command
|
||||
from setuptools import setup, find_packages
|
||||
|
||||
from setuptools import find_packages, setup
|
||||
from setuptools.command.install_lib import install_lib as _install_lib
|
||||
|
||||
|
||||
class eo_sdist(sdist):
|
||||
|
@ -63,6 +62,7 @@ class compile_translations(Command):
|
|||
|
||||
def run(self):
|
||||
from django.core.management import call_command
|
||||
|
||||
os.environ.pop('DJANGO_SETTINGS_MODULE', None)
|
||||
for path, dirs, files in os.walk('bidon'):
|
||||
if 'locale' not in dirs:
|
||||
|
|
|
@ -2,9 +2,9 @@ import os
|
|||
|
||||
DATABASES = {
|
||||
'default': {
|
||||
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||
'ENGINE': 'django.db.backends.postgresql',
|
||||
'TEST': {
|
||||
'NAME': 'bidon-test-%s' % os.environ.get("BRANCH_NAME", "").replace('/', '-')[:63],
|
||||
'NAME': 'bidon-test-%s' % os.environ.get('BRANCH_NAME', '').replace('/', '-')[:63],
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
def test_true(db):
|
||||
assert True
|
||||
|
||||
|
||||
def test_notfail():
|
||||
assert True
|
||||
|
|
Loading…
Reference in New Issue