boxine / bx_django_utils Goto Github PK
View Code? Open in Web Editor NEWVarious Django utility functions
License: MIT License
Various Django utility functions
License: MIT License
Currently AssertModelCleanCalled connects to "post init" signal. This includes also "read database access"... But we should only check "full_clean()" calls on create/update models. So connect to "post save" signal?
pip install bx-django-utils==55 Django==4.2
Collecting bx-django-utils==55
Using cached bx_django_utils-55-py3-none-any.whl (182 kB)
Requirement already satisfied: Django==4.2 in c:\progr\py3\ehcg\venv\lib\site-packages (4.2)
ERROR: Cannot install Django==4.2 and bx-django-utils==55 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested Django==4.2
bx-django-utils 55 depends on django<4.2 and >=3.2
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
UUID will be pass to:
File "/usr/local/lib/python3.10/urllib/parse.py", line 885, in quote_plus
string = quote(string, safe + space, encoding, errors)
File "/usr/local/lib/python3.10/urllib/parse.py", line 869, in quote
return quote_from_bytes(string, safe)
File "/usr/local/lib/python3.10/urllib/parse.py", line 894, in quote_from_bytes
raise TypeError("quote_from_bytes() expected bytes")
With https://github.com/boxine/bx_django_utils/blob/master/bx_django_utils/admin_utils/admin_urls.py it's only possible to create urls for Django's default admin views 'changelist', 'add', 'history', 'delete', 'change'
Add a function to support own custom views, too.
bx_django_utils.models.manipulate.create_or_update
should raise a error if lookup match to more than one entries.
see: #89 (review)
--list
to just list all existing classesTraceback (most recent call last):
File "./bx_django_utils/.venv/lib/python3.10/site-packages/django/core/handlers/exception.py", line 56, in inner
response = get_response(request)
File "./bx_django_utils/.venv/lib/python3.10/site-packages/django/core/handlers/base.py", line 197, in _get_response
response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "./bx_django_utils/.venv/lib/python3.10/site-packages/django/contrib/admin/sites.py", line 261, in wrapper
return self.admin_view(view, cacheable)(*args, **kwargs)
File "./bx_django_utils/.venv/lib/python3.10/site-packages/django/utils/decorators.py", line 134, in _wrapped_view
response = view_func(request, *args, **kwargs)
File "./bx_django_utils/.venv/lib/python3.10/site-packages/django/views/decorators/cache.py", line 62, in _wrapped_view_func
response = view_func(request, *args, **kwargs)
File "./bx_django_utils/.venv/lib/python3.10/site-packages/django/contrib/admin/sites.py", line 242, in inner
return view(request, *args, **kwargs)
File "./bx_django_utils/.venv/lib/python3.10/site-packages/django/contrib/admin/sites.py", line 569, in app_index
app_list = self.get_app_list(request, app_label)
Exception Type: TypeError at /admin/auth/
Exception Value: ExtraViewAdminSite.get_app_list() takes 2 positional arguments but 3 were given
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.