Skip to content

Commit

Permalink
Merge pull request #48 from rework-union/feature/upgrade-2023q3
Browse files Browse the repository at this point in the history
Upgrade 2023q3
  • Loading branch information
JoshYuJump authored Jul 14, 2023
2 parents fff88ae + 545179f commit 06544a8
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 14 deletions.
4 changes: 0 additions & 4 deletions .style.yapf

This file was deleted.

2 changes: 1 addition & 1 deletion CONTRIBUTE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ python tests/runtests.py
cd examples

# Delete previous created files if exists
rm -rf * && rm -rf .*
rm -rf * && rm -rf .*

# Creating new project
rework init pony
Expand Down
14 changes: 14 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[tool.black]
line-length = 99
target-version = ['py310', 'py311']
skip-string-normalization = true
include = '\.pyi?$'
# 'extend-exclude' excludes files or directories in addition to the defaults
extend-exclude = '''
# A regex preceded with ^/ will apply only to files and directories
# in the root of the project.
(
^/foo.py # exclude a file named foo.py in the root of the project
| .*_pb2.py # exclude autogenerated Protocol Buffer files anywhere in the project
)
'''
1 change: 0 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ django-cors-headers>=3.13.0,<4.0
django-environ>=0.9.0,<1.0
django-filter==22.1,<23
django-mysql~=4.7
django-ninja~=0.20
djangorestframework>=3.13,<4.0
djangorestframework-simplejwt~=5.2
fabric>=2.7.1,<3.0
Expand Down
2 changes: 2 additions & 0 deletions rework/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from .core import management

__version__ = '0.6.0'

if __name__ == '__main__':
management.execute_from_command_line()
7 changes: 6 additions & 1 deletion rework/contrib/users/models.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
from django.contrib.auth.models import AbstractUser, BaseUserManager
from django.db import models
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
try:
# < Django 4.0
from django.utils.translation import ugettext_lazy as _
except ImportError:
# Django 4.0+
from django.utils.translation import gettext_lazy as _


class UserManager(BaseUserManager):
Expand Down
1 change: 0 additions & 1 deletion rework/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +0,0 @@
__version__ = '0.5.2'
4 changes: 2 additions & 2 deletions rework/core/management/deploy.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

from ..utils import say, copy_template_to_file, get_project_name
from ..utils.command import BaseCommand
from ... import core


class DeployCommand(BaseCommand):
def handle(self, params):
from rework import __version__
if params == ['--init']:
# template variables
project = get_project_name()
kwargs = {
'django_rework_version': core.__version__,
'django_rework_version': __version__,
'project': project,
}
deploy_path = os.path.join(self.base_dir, 'deploy')
Expand Down
4 changes: 2 additions & 2 deletions rework/core/management/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@

from .handlers.settings import SettingsHandle
from ..utils import say, copy_template_to_file
from ... import core


def init(params):
Expand All @@ -31,9 +30,10 @@ def init(params):
settings_folder = os.path.join(project_dir, project)
settings_handler = SettingsHandle(project=project, path=settings_folder)

from rework import __version__
# template variables
kwargs = {
'django_rework_version': core.__version__,
'django_rework_version': __version__,
'project': project,
}

Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from setuptools import find_packages, setup
from rework import core
from rework import __version__


def read(f):
Expand All @@ -12,7 +12,7 @@ def read(f):

setup(
name='django-rework',
version=core.__version__,
version=__version__,
description='Rapid develop framework base on Django',
long_description=read('README.md'),
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 06544a8

Please sign in to comment.