jedie / django-tools Goto Github PK
View Code? Open in Web Editor NEWmiscellaneous django tools
Home Page: http://pypi.python.org/pypi/django-tools/
License: Other
miscellaneous django tools
Home Page: http://pypi.python.org/pypi/django-tools/
License: Other
This module is not working because migrations are missing. Gives the error:
django.db.utils.OperationalError: no such table: dynamic_site_sitealias
...in smooth cache backends
as per
https://docs.djangoproject.com/en/1.11/topics/http/middleware/#upgrading-middleware
ThreadLocal should inherit from django.utils.deprecation.MiddlewareMixin
Hello @jedie I contribute to open source softwares by designing logos. I designed a functional logo for this repo. It will look like this in the readme file :
What do you think about the logo?
I have nothing wrong with GPL, but users probably don't want to have their website or libraries pulling in django-tools becoming a derivative of it. Can you release this under a permissive license like ISC, MIT, BSD, Apache 2, etc?
In PyLucid i have a simple ban function. The Principe is simple: I add logging entries and if in a defined time too many entries, the IP address would be added to the ban model. This model would be used in the middleware to ban…
Models:
middleware:
A better idea is to use the cache, like the throttle decorator in django-piston: https://bitbucket.org/jespern/django-piston/src/7c90898072ce/piston/utils.py#cl-108
Is it because django does not need to test the following conditions?
This approach, however, has a few disadvantages. For example, besides threads, there are other types of concurrency in Python. A very popular one is greenlets. Also, whether every request gets its own thread is not guaranteed in WSGI. It could be that a request is reusing a thread from a previous request, and hence data is left over in the thread local object.
Thanks! :D
d46b11f has disable the headless mode, because it seems that "accept_languages" can't be set in this mode. See: https://bugs.chromium.org/p/chromedriver/issues/detail?id=3358
But without headless mode the CI pipeline fails :(
The current version on django-tools on PyPi is 0.24.02.0710
. That alone is not that odd. However once installed the version is shown as 0.24.02
. This creates problem with trying to pin the version with a requirements file demonstrated below:
$ pip install django-tools
Downloading/unpacking django-tools
Downloading django-tools-0.24.2.0710.tar.gz (51Kb): 51Kb downloaded
...
Successfully installed django-tools
$ pip freeze | grep django-tools
django-tools==0.24.2
Now installing attempting to install this exact version errors:
$ pip install django-tools==0.24.2
Downloading/unpacking django-tools==0.24.2
Could not find a version that satisfies the requirement django-tools==0.24.2 (from versions: )
No distributions matching the version for django-tools==0.24.2
And trying to install the version including the date stamp works (pip install django-tools==0.24.2.0710
) but fails if it is in a requirements file (That this works on the command line but not in a requirements file is noted in a pip bug: pypa/pip#145):
$ pip install -r dependencies.txt
Downloading/unpacking django-tools==0.24.2.0710 (from -r dependencies.txt (line 20))
Downloading django-tools-0.24.2.0710.tar.gz (51Kb): 51Kb downloaded
Running setup.py egg_info for package django-tools
warning: no files found matching 'README.textile'
warning: no files found matching '*.css' under directory 'django_tools\templates'
warning: no files found matching '*.js' under directory 'django_tools\templates'
warning: no previously-included files matching '*.py[co]' found under directory '*'
Source in c:\documents and settings\lavin\my documents\aptana studio workspace\origin\build\django-tools has the version 0.24.2, which does not match the
requirement django-tools==0.24.2.0710 (from -r dependencies.txt (line 20))
Source in c:\documents and settings\lavin\my documents\aptana studio workspace\origin\build\django-tools has version 0.24.2 that conflicts with django-tools==0.24.2.0710 (from -r dependencies.txt (line 20))
Removing the date stamp from the version number is probably the easiest solution but might not be desirable to you. In any case the version number should be constantly reported (always with the date or always without) to prevent this conflict error.
I'm using Django 1.7.5 and when I tried adding django_tools.dynamic_site to the project it failed with:
$ src/landrover/manage.py runserver
Traceback (most recent call last):
File "src/landrover/manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
utility.execute()
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django/core/management/__init__.py", line 354, in execute
django.setup()
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django/__init__.py", line 21, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django/apps/registry.py", line 108, in populate
app_config.import_models(all_models)
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django/apps/config.py", line 202, in import_models
self.models_module = import_module(models_module_name)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django_tools/dynamic_site/models.py", line 31, in <module>
from django_tools.models import UpdateInfoBaseModel
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django_tools/models.py", line 26, in <module>
User = auth.get_user_model()
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django/contrib/auth/__init__.py", line 137, in get_user_model
return django_apps.get_model(settings.AUTH_USER_MODEL)
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django/apps/registry.py", line 199, in get_model
self.check_models_ready()
File "/Users/kitsunde/.virtualenvs/landrover/lib/python2.7/site-packages/django/apps/registry.py", line 131, in check_models_ready
raise AppRegistryNotReady("Models aren't loaded yet.")
django.core.exceptions.AppRegistryNotReady: Models aren't loaded yet.
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.