Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Django 4 #319

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: 2
jobs:
tests-python:
docker:
- image: python:3.7
- image: python:3.9
- image: postgres:10.6-alpine
environment:
POSTGRES_USER: itdagene
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
- run:
name: Tests
command: |
tox -e py37
tox -e py39
tox -e coverage

tests-javascript:
Expand All @@ -64,7 +64,6 @@ jobs:
command: |
yarn build


build-docker:
machine: true
steps:
Expand Down
17 changes: 6 additions & 11 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
version: 2
updates:
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
ignore:
- dependency-name: django
versions:
- ">= 3.a"
- "< 4"
- package-ecosystem: pip
directory: "/"
schedule:
interval: daily
time: "04:00"
open-pull-requests-limit: 10
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ RUN set -e \
&& yarn build \
&& rm node_modules -r

FROM python:3.7-alpine
FROM python:3.9-alpine
ENV PYTHONUNBUFFERED 1
RUN mkdir /code
WORKDIR /code
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
fixme:
docker run --rm -v ${PWD}:/code -it python:3.7-slim "bash" "-c" "cd /code && pip install -r requirements/black.txt -r requirements/isort.txt && isort itdagene && black itdagene"
docker run --rm -v ${PWD}:/code -it python:3.9-slim "bash" "-c" "cd /code && pip install -r requirements/black.txt -r requirements/isort.txt && isort itdagene && black itdagene"

.PHONY: fixme
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## TL;DR

- GraphQL API with [django-graphene]
- Python 3.7 with Django
- Python 3.9 with Django
- Postgres for persistant storage
- [Celery] (with redis-broker) for async tasks
- CircleCI for continuous integration
Expand All @@ -19,7 +19,7 @@

First make sure that you have the following software installed on your system:

- Python 3.7
- Python 3.9
- Node.js and yarn
- [docker] together with [docker-compose]

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Generated by Django 4.0.6 on 2022-08-07 15:44

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("career", "0021_auto_20200914_1041"),
]

operations = [
migrations.AlterField(
model_name="joblisting",
name="creator",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_creator",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="joblisting",
name="saved_by",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_saved_by",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="town",
name="creator",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_creator",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="town",
name="saved_by",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_saved_by",
to=settings.AUTH_USER_MODEL,
),
),
]
2 changes: 1 addition & 1 deletion itdagene/app/career/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.utils import timezone
from django.utils.text import slugify
from django.utils.timezone import now
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.app.company.models import Company, CompanyContact
from itdagene.core.models import BaseModel
Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/career/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.app.career.forms import JoblistingForm, JoblistingTownForm
from itdagene.app.career.models import Joblisting
Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/comments/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.contrib.contenttypes.fields import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.core.models import User

Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/comments/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.contrib.messages import ERROR, add_message
from django.shortcuts import redirect
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.app.comments.forms import CommentForm
from itdagene.app.mail.tasks import send_comment_email
Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/company/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

COMPANY_STATUS_NOT_CONTACTED = 0
COMPANY_STATUS_CONTACTED = 4
Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/company/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from crispy_forms.layout import Layout
from django.db.models import Q
from django.forms.models import ModelForm
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.app.company import COMPANY_STATUS
from itdagene.app.company.models import (
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,136 @@
# Generated by Django 4.0.6 on 2022-08-07 15:44

import django.db.models.deletion
from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
("company", "0025_auto_20210508_2142"),
]

operations = [
migrations.AlterField(
model_name="callteam",
name="creator",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_creator",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="callteam",
name="saved_by",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_saved_by",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="company",
name="creator",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_creator",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="company",
name="saved_by",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_saved_by",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="companycontact",
name="creator",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_creator",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="companycontact",
name="saved_by",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_saved_by",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="contract",
name="creator",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_creator",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="contract",
name="saved_by",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_saved_by",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="keyinformation",
name="creator",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_creator",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="keyinformation",
name="saved_by",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_saved_by",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="package",
name="creator",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_creator",
to=settings.AUTH_USER_MODEL,
),
),
migrations.AlterField(
model_name="package",
name="saved_by",
field=models.ForeignKey(
editable=False,
on_delete=django.db.models.deletion.CASCADE,
related_name="%(class)s_saved_by",
to=settings.AUTH_USER_MODEL,
),
),
]
2 changes: 1 addition & 1 deletion itdagene/app/company/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from django.core.exceptions import ValidationError
from django.db import models
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _
from sorl.thumbnail import ImageField

from itdagene.app.company import COMPANY_STATUS
Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/company/views/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.http import Http404
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.translation import ugettext as _
from django.utils.translation import gettext as _

from itdagene.app.company.forms import (
BookCompanyForm,
Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/company/views/company_contacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.app.company.forms import CompanyContactForm
from itdagene.app.company.models import Company, CompanyContact
Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/company/views/contracts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.contrib.messages import SUCCESS, add_message
from django.http import Http404, HttpResponse
from django.shortcuts import get_object_or_404, redirect, render
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.app.company.forms import ContractForm
from itdagene.app.company.models import Company, Contract
Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/company/views/economics.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from django.contrib.auth.decorators import permission_required
from django.shortcuts import render
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.app.company.models import Company

Expand Down
2 changes: 1 addition & 1 deletion itdagene/app/company/views/packages.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.contrib.messages import SUCCESS, add_message
from django.shortcuts import get_object_or_404, redirect, render
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import gettext_lazy as _

from itdagene.app.company.forms import PackageForm
from itdagene.app.company.models import Package
Expand Down
Loading