




#536 At this point, proxy model support is untested, this is because I intend to refactor the test suite and documentation during the 2.3.x serie.
Read MoreI’m pretty lazy when it comes to writing tests for existing code, however, I’m even lazier when it comes to repetitive manual testing action, we’ve got so much patches to review and test against so many versions of Python and Django, we need testing to be automated.
This article presents a new Django app for testing the database. Java has DBunit and so does PHP, and django now has django-dbdiff.
A nice way to test a data import script is to create a source data fixture with a subset of data, ie. with only 10 cities instead of 28K or only 3 european parliament representatives instead of 3600, feed the import function with that and then compare the database state with a django fixture. This looks like what I was used to do:
Read Moredjango-cities-light 3.2.0 was released, supporting Django 1.7 to 1.9 now, even though older versions should still work, they aren’t tested anymore.
b''
in migration files. A new test was added to fail if
django wants to create new migrations in any environment.Starting 2.3.0, django-session-security supports Django 1.7 to Django 1.10 with tox.
In 2.3.1, Andrei Coman added redirectTo parameter and tests were stabilized using django-sbo-selenium and tox.
Since Django 1.9a1 was released, many users are going to upgrade their project and wonder why django-autocomplete-light won’t load anymore. Probably, some users are going to google ImportError or even django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet
about autocomplete_light and Django 1.9. This post documents the situation and provides a solution.
Do:
find test/ -name foo -exec sed -i 's/import autocomplete_light/from autocomplete_light import shortcuts as autocomplete_light/' '{}' \;
I don’t remember why exactly since we’ve baked Django 1.9 support in April 2015 (victory !!!), but IIRC due to app-loading refactor we can’t have anything in __init__.py
for installed apps just for convenience anymore (ie. model imports). To maintain as much backward compatibility as possible, we still load what we can there, but please use autocomplete_light.shortcuts
instead.
Getting started with SaltStack usually means piling up a bunch of YAML code templated with Jinja in a source code repository because that’s the way to go from the documentation’s point of view. With significant whitespace, YAML enables even non-developers to define data structures in non verbose way. Jinja2 is a templating engine which enables a non-developer to make YAML files dynamic, typically depending on variables. However, Jinja2 hasn’t significant whitespace and this can decrease readability of YAML templates. And since YAML and Jinja2 are two different languages in the same file, there is no readable way to ident code. Not to mention that Jinja2, as a template language rather than a programing language, has a pretty limited subset of operators.
Read MoreAfter 8 release candidates, we’ve got our new shining 2.2.0 release of django-autocomplete-light which literally drown the backlog, we’re down to less than one github page of issues now. Needless to say, we’ve closed an insane amount of issues with 2.2.0.
Please read the release notes before upgrading.
This article presents the changelog for django-autocomplete-light 2.2.0 release. To upgrade to 2.2.0rc1:
pip install -U --pre django-autocomplete-light
If you find any problem, please report it on github issues and downgrade to last stable (2.1.x series):
pip install -U django-autocomplete-light
The good old import autocomplete_light
API support will be dropped with Django 1.9. All imports have moved to autocomplete_light.shortcuts
and importing autocomplete_light
will work until the project is used with Django 1.9.
SaltStack is an Open Source DevOp tool to automate administration of a computer (server or desktop) infrastructure, typically but not limited to, developing in-house PaaS. Travis-ci is an Open Source Continuous Integration platform and online-hosted for free for Open Source projects.
This article targets SaltStack formula developers who wants to have CI enabled
First things first, we have to test the /pillar.example
file located at the
top of the formula
repository.
Unfortunately, it’s not straightforward, I’ve started a discussion on
salt-users in
case we find a way to improve that.
The last article demonstrated how we could simply make any https flow going out a virtual bridge network interface through mitmproxy to cache anything.
In this article, we’ll focus on the logic to “cache anything” from within our mitmproxy script.
We’d like each fetched file to be stored in a directory as is to make it easy to tweak the cached content:
So, for example:
Read More