Services
Blog
Français
Anybody tried the Visual Python profiler ?
Check out this nice django admin theme: django-jets.
After 4 years of supporting django-autocomplete-light, I’m beginning to figure what users expect and the common mistakes, like registering the wrong model for autocomplete, or having troubbles figuring how to link suggestions with other form fields, or create choices on the fly, or with the magic modelform.
So at first, I really tried to find other autocompletion apps for with DAL could be just an extension. It turned out that with they had too much security issues, known security vulnerabilities which aren’t going to be fixed (which I don’t dare to post here). As I have strong feelings about security, I decided to take another road, and took a 2-week code sprint working at night to make version 3.
Read MoreMarkus Holtermann has published a tutorial for setting up syntax highlighting for Django’s SQL query logging. I didn’t try it but it looks pretty cool, maybe that’s something we could add to django-dbdiff somehow. Anyway, check it out !
This release fixes an important usability but on the manychoice fields, and introduces a minor backward compatibility break:
[multiple], bd9ca0085Thanks George Tantiras for reporting the bug ! Note that only paliative solutions have been taken for v2:
As for v3, it is designed to support any number of autocomplete scripts, and the first proposed implementation is with select2, so chances that this kind of bug happen are greatly reduced.
Read MoreAs stated in the “Database state assertion” article: I’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.
When my user tests my website, they browse it and check that everything is rendered fine. In the same fashion, django-responsediff eases doing the high-level assertions of page HTML rendering.
Consider this example:
class TestYourView(TestCase):
def test_your_page(self):
result = test.Client().get(your_url)
# Factory to create a Response for this test
expected = Response.for_test(self)
# Generate the fixture if necessary, otherwise GNU diff-it
expected.assertNoDiff(result)On the first run, this would create a directory in the directory containing
TestYourView, named responsediff_fixtures, with a sub-directory
TestYourView.test_your_page and a file content with response.content in
there, if it does not already exist, and raise FixtureCreated to inform the
user that no test has actually been run, and that the fixture has just been
created.
#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.