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

[pull] master from cookiecutter:master #718

Merged
merged 5 commits into from
Feb 23, 2024
Merged
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: 5 additions & 0 deletions .github/contributors.json
Original file line number Diff line number Diff line change
Expand Up @@ -1523,5 +1523,10 @@
"name": "Paul Wulff",
"github_login": "mtmpaulwulff",
"twitter_username": ""
},
{
"name": "Mounir",
"github_login": "mounirmesselmeni",
"twitter_username": ""
}
]
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,22 @@

version: 2
updates:
# Update Python deps for the template (not the generated project)
- package-ecosystem: "pip"
directory: "/"
schedule:
interval: "daily"
labels:
- "project infrastructure"

# Update Python deps for the documentation
- package-ecosystem: "pip"
directory: "docs/"
schedule:
interval: "daily"
labels:
- "project infrastructure"

# Update GitHub actions in workflows
- package-ecosystem: "github-actions"
directory: "/"
Expand Down
2 changes: 0 additions & 2 deletions .pyup.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ pin: True
label_prs: update

requirements:
- "requirements.txt"
- "docs/requirements.txt"
- "{{cookiecutter.project_slug}}/requirements/base.txt"
- "{{cookiecutter.project_slug}}/requirements/local.txt"
- "{{cookiecutter.project_slug}}/requirements/production.txt"
7 changes: 7 additions & 0 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -1552,6 +1552,13 @@ Listed in alphabetical order.
</td>
<td></td>
</tr>
<tr>
<td>Mounir</td>
<td>
<a href="https://github.com/mounirmesselmeni">mounirmesselmeni</a>
</td>
<td></td>
</tr>
<tr>
<td>mozillazg</td>
<td>
Expand Down
5 changes: 2 additions & 3 deletions {{cookiecutter.project_slug}}/.devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"analysis.typeCheckingMode": "basic",
"defaultInterpreterPath": "/usr/local/bin/python",
"editor.codeActionsOnSave": {
"source.organizeImports": true
"source.organizeImports": "always"
},
"editor.defaultFormatter": "charliermarsh.ruff",
"languageServer": "Pylance",
Expand All @@ -54,8 +54,7 @@
// python
"ms-python.python",
"ms-python.vscode-pylance",
"ms-python.isort",
"ms-python.black-formatter",
"charliermarsh.ruff",
// django
"batisteo.vscode-django"
]
Expand Down
2 changes: 1 addition & 1 deletion {{cookiecutter.project_slug}}/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"webpack": "^5.65.0",
"webpack-bundle-tracker": "^3.0.1",
"webpack-cli": "^5.0.1",
"webpack-dev-server": "^4.6.0",
"webpack-dev-server": "^5.0.2",
"webpack-merge": "^5.8.0"
},
"engines": {
Expand Down
17 changes: 10 additions & 7 deletions {{cookiecutter.project_slug}}/webpack/dev.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,16 @@ module.exports = merge(commonConfig, {
devtool: 'inline-source-map',
devServer: {
port: 3000,
proxy: {
{%- if cookiecutter.use_docker == 'n' %}
'/': 'http://0.0.0.0:8000',
{%- else %}
'/': 'http://django:8000',
{%- endif %}
},
proxy: [
{
context: ['/'],
{%- if cookiecutter.use_docker == 'n' %}
target: 'http://0.0.0.0:8000',
{%- else %}
target: 'http://django:8000',
{%- endif %}
},
],
client: {
overlay: {
errors: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
from django.contrib.auth.decorators import login_required
from django.utils.translation import gettext_lazy as _

from {{ cookiecutter.project_slug }}.users.forms import UserAdminChangeForm
from {{ cookiecutter.project_slug }}.users.forms import UserAdminCreationForm
from {{ cookiecutter.project_slug }}.users.models import User
from .forms import UserAdminChangeForm
from .forms import UserAdminCreationForm
from .models import User

if settings.DJANGO_ADMIN_FORCE_ALLAUTH:
# Force the `admin` sign in process to go through the `django-allauth` workflow:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{%- endif %}
from django.utils.translation import gettext_lazy as _

from {{ cookiecutter.project_slug }}.users.models import User
from .models import User


class UserAdminChangeForm(admin_forms.UserChangeForm):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from django.contrib.auth.models import UserManager as DjangoUserManager

if TYPE_CHECKING:
from {{ cookiecutter.project_slug }}.users.models import User # noqa: F401
from .models import User # noqa: F401


class UserManager(DjangoUserManager["User"]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from django.utils.translation import gettext_lazy as _
{%- if cookiecutter.username_type == "email" %}

from {{ cookiecutter.project_slug }}.users.managers import UserManager
from .managers import UserManager
{%- endif %}


Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from celery import shared_task

from {{ cookiecutter.project_slug }}.users.models import User
from .models import User


@shared_task()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
from django.urls import path

from {{ cookiecutter.project_slug }}.users.views import user_detail_view
from {{ cookiecutter.project_slug }}.users.views import user_redirect_view
from {{ cookiecutter.project_slug }}.users.views import user_update_view
from .views import user_detail_view
from .views import user_redirect_view
from .views import user_update_view

app_name = "users"
urlpatterns = [
Expand Down