Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
django CMS 2.3.3 released
-
Django cache templatetag with dynamic backend parameter
I've found a nice project django-adv-cache-tag. From the project website: With django-adv-cache-tag you can : add a version number (int, string, date or whatever, it will be stringified) to you templatetag : the version will be compared to the cached one, and the exact same cache key will be used for the new cached template, avoiding keeping old unused keys in your cache, allowing you to -
Pyramid, 2style4you and python - Wichert Akkerman
http://2style4you.com took up most of his time the last years: it provides automatic fashion recommendations for women. They use lots of technologies, for instance redmine, jenkins, transifex, bitbucket (git), zabbix. They had a lot of fashion portals that needed building. What did they need for them? There wasn't a lot of standard functionality that they needed, like form generation for database models. So there was a lot in the big web frameworks at the time (django, plone, zope) that they did not need. What they did need was customizability, all sites do things differently. And it needed to be fast. And internationalization was needed (he later showed a Taiwanese site, for instance). And he needed it to be in Python because Wichert knows that well. He started out with pylons, a mini framework. But after a while it wasn't really maintained anymore. Then they migrated to repoze.bfg (by Chris McDonough), another mini framework. They took about two months to migrate the whole thing (with the help of the repoze.bfg author). The fun thing is that repoze.bfg got merged into the pylons project later on; it is now called pyramid. They make a core website that provides the main functionality. Then … -
toastdriven/django-tastypie
toastdriven/django-tastypie. Hatte ich glaube ich schon mal, macht aber nix, sieht immer noch interessant aus – eine Alternative zu django-piston mit einer deutlich weitergehenden Funktionalität (zum Beispiel recht ausführliche Optionen für Authentifizierung und Authorisierung). Was es macht? REST Interfaces für Django Modelle inklusive deren Relationen. In den verschiedensten Formaten (XML, JSON, YAML). -
Django Extensions versioning a third option follow Django
After my previous post http://trbs.net/blog/2012/09/19/django-extensions-version-010-or-10/ and the many positive reactions I would like to suggest a third option. I didn't include this before because I wasn't yet sure if it would be a good option. But after some more thinking and reading Christophe31's suggestion which is very similar I think we should look seriously at the option :-) The idea is that we make Django Extensions follow the Django version numbers closely. This would mean bumping the version number to 1.4. With this scheme we would commit to the following in Django Extensions: * Django-Extensions 1.4 is compatible with Django 1.4 and it's deprecation timeline. * Django-Extensions will deprecate and update code on par with Django. (This would help us fix aka remove the tons of legacy/backwards compatibility hacks in the codebase) * A new version with bumped version number is released as soon as possible after a Django release. For a user it should be intuitive and clear that you should match the major version numbers of Django-Extensions to whatever version of Django you are using. This also solves questions like what version will support Python-3 or PyPy or deprecates using feature X. Some details would still need to … -
REST API creation with django-tastypie
django-tastypie is probably the best at the moment tool for REST API creation in Django applications. The code is on github and documentation is on readthedocs.org. With tastypie it's easy to create REST API that will allow easy web access to data stored in models - get, update, edit or delete. In this article I'll show some basic usage of tastypie. -
Load Testing with JMeter: Part 3 - Replaying Apache Logs
A while ago, I wrote a couple of blog entries about load testing with JMeter. I promised a third entry covering how to use JMeter to replay Apache logs and roughly recreate production load, but I never followed through with it. Today, I intend to rectify this grievous error. -
Django Extensions version 0.10 or 1.0
We are getting close to releasing a new version of Django Extensions to PyPi which means it's about time to bump the version number once again. Right now our version number is at 0.9 so the question becomes what do we use next ? We can go and continue to increment with +0.1 which will make this the 1.0 release. The thing for me with Django Extensions is that it's more a continuous process then something with 'stable' releases. What I mean is that as a collection of extensions there is really no such thing as a 'stable api/abi' as there is in a framework codebase like Django itself. So I don't mind either way. We can call it 1.0 and just increment that as long as we don't make any radical or major changes to the code base. Or just continue with the 0.x numbering for the time being. Please put your vote and/or thoughts about this in a comment at: https://github.com/django-extensions/django-extensions/issues/241 -
django CMS 2.3.2 released
-
Load Testing with JMeter: Part 3 - Replaying Apache Logs
Click here to see this post in it's natural habitat and to watch and leave comments. A while ago, I wrote a couple of blog entries about load testing with JMeter (Part 1 and Part 2). I promised a third entry covering how to use JMeter to replay Apache logs and roughly recreate production load, but I never followed through with it. Today, I intend to rectify this grievous error. Parsing your Apache Logs There is more than one way to do this, but my preferred method is to use a simple Python script to do some filtering of the Apache log file you want to use and to output the desired urls as a tidy CSV file. I am using the ‘apachelog’ module for this (also available as a gist): #!/usr/bin/env python """ Requires apachelog. `pip install apachelog` """ from __future__ import with_statement import apachelog import csv import re import sys from optparse import OptionParser STATUS_CODE = '%>s' REQUEST = '%r' USER_AGENT = '%{User-Agent}i' MEDIA_RE = re.compile(r'\.png|\.jpg|\.jpeg|\.gif|\.tif|\.tiff|\.bmp|\.js|\.css|\.ico|\.swf|\.xml') SPECIAL_RE = re.compile(r'xd_receiver|\.htj|\.htc|/admin') def main(): usage = "usage: %prog [options] LOGFILE" parser = OptionParser(usage=usage) parser.add_option( "-o", "--outfile", dest="outfile", action="store", default="urls.csv", help="The output file to write urls to", metavar="OUTFILE" ) parser.add_option( "-f", "--format", … -
Load Testing with JMeter: Part 3 - Replaying Apache Logs
A while ago, I wrote a couple of blog entries about load testing with JMeter (Part 1 and Part 2). I promised a third entry covering how to use JMeter to replay Apache logs and roughly recreate production load, but I never followed through with it. Today, I intend to rectify this grievous error. Parsing your Apache Logs There is more than one way to do this, but my preferred method is to use a simple Python script to do some filtering of the Apache log file you want to use and to output the desired urls as a tidy CSV file. I am using the ‘apachelog’ module for this (also available as a gist): #!/usr/bin/env python """ Requires apachelog. `pip install apachelog` """ from __future__ import with_statement import apachelog import csv import re import sys from optparse import OptionParser STATUS_CODE = '%>s' REQUEST = '%r' USER_AGENT = '%{User-Agent}i' MEDIA_RE = re.compile(r'\.png|\.jpg|\.jpeg|\.gif|\.tif|\.tiff|\.bmp|\.js|\.css|\.ico|\.swf|\.xml') SPECIAL_RE = re.compile(r'xd_receiver|\.htj|\.htc|/admin') def main(): usage = "usage: %prog [options] LOGFILE" parser = OptionParser(usage=usage) parser.add_option( "-o", "--outfile", dest="outfile", action="store", default="urls.csv", help="The output file to write urls to", metavar="OUTFILE" ) parser.add_option( "-f", "--format", dest="logformat", action="store", default=r'%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"', help="The Apache log format, copied … -
Goodbye django
It’s time to move on, on from Django to something else. I want to have a site that needs none or very little caretaking. Even if Gondor, Heroku et al make my work as a programmer much easier, but it’s not enough, I want things to be even easier. So I’m ditching Django and moving this blag to Pelican, a static site generator written in Python. Don’t worry, I will still use Django at work and for other projects, not just this one. -
Automated deployment with Ubuntu, Fabric and Django
A few months ago I started to play with Fabric and the result was a simple script that automates the creation of a new Django project. In the last months I continued my experiments and extended the script to a full stack for creation and deployment of Django projects. As the details behind the script like the project structure that I use and the server setup are a bit long I will keep this post only on the script usage and I will write a follow up one describing the project structure and server. So in a brief the setup that I use consist of Ubuntu as OS, Nginx as web server and uWSGI as application server. The last one is controlled by Upstart. The script is available for download at GitHub. In a wait for more detailed documentation here is a short description of the main tasks and what they do: startproject:<project_name> Creates a new virtual environment Installs the predefined packages(uWSGI, Django and South)) Creates a new Django project from the predefined template Creates different configuration files for development and production environment Initializes new git repository Prompts the user to choose a database type. Then installs database required packages, … -
Using vagrant for developing on OSX: why
All the years that I've used a mac, I've been doing my programming on the mac itself. OSX itself is a unix system, so that's fine. And with macports (or fink or that other one that I've forgotten) I can easily install the bunch of extra utilities that I need. When I worked with plone, this worked really well. The only external dependencies that you had to deal with were PIL (so: libjpeg-dev and friends) and sometimes lxml's libxslt/libxml dependencies. Especially lxml could give you grief on OSX, but with the use of the z3c.recipe.staticlxml recipe everything was fine. Django, which I work with now, is likewise easy to install and develop for on OSX. That is, until you get to geodjango. And we're using a whole lot of geo stuff in our websites, so you need a whole geo stack. Geos, gdal, mapnik. And often numpy and scipy. And spatialite instead of the bundled-with-python sqlite. All of this is just a big sudo apt-get install .... on ubuntu, but on OSX it is grief. I managed to get it working most of the time: I tried the kyngchaos packages first. Collecting everything and getting everything working with the right … -
Github filename convention for contributor information
I just saw a github blog post about contributing guidelines. If you place a CONTRIBUTING.txt (or .rst, or .md etc) in the root of your github repository, github will show a link to that file when someone adds an issue to the bug tracker (or when opening a pull request). Seems like a reasonable suggestion! So I tried it out in one of my open source projects. My main goals: I want it to sound friendly and welcoming. We actually want feedback and bug reports. Just sending an email is often easier and nicer. Especially if you just want to ask a question instead of adding a full-blown issue. When you're about to fix something yourself, I want to float a link to the developer information right in your face. How to run the tests. Explanation of the dependencies that are needed. That sort of stuff. So... this is my first try. Do you've got comments or tips? Do you think github's idea is handy? -
Nodejsconf 2012 Workshop - Conference - Hackathon ready for a 3-days Nodejs experience?
Nodejsconf 2012 Workshop - Conference - Hackathon ready for a 3-days Nodejs experience? (italian version below) The International European Node.js Conference, second edition, will be held on Saturday, November 10th in Brescia, Italy. Tickets are on sale: http://nodejsconf.it/#secIscrizione. Hurry up before they sell out like last year! We organized also two Node.js workshops the day before the conference, Friday November 9th. A beginner level workshop by Golo Roden and an advanced workshop by CleanCode (Gabriele Lana - Federico Galassi) http://nodejsconf.it/#secWorkshop Call for papers is open till Thursday September 20th and the final schedule will go online Tuesday September 25th. We would like to thank our bronze sponsors Ideato, CleanCode, the silver sponsor Incode, the gold sponsors Sintattica, Nearform and the platinum sponsors Libero Cloud and Microsoft Azure. We are also organizing an hackathon after the conference with TalentGarden, jsDay and Libero Cloud. Stay tuned, more info to come in the next days! The Libero Cloud platform will be used during the hackaton. The best hacks will be awarded with prizes and you can start using the Libero Cloud platform right now! You can get a 50€ voucher here. You also can try Windows Azure for free and the preview of Windows Azure Mobile … -
Nodejsconf 2012 Workshop - Conference - Hackathon ready for a 3-days Nodejs experience?
Nodejsconf 2012 Workshop - Conference - Hackathon ready for a 3-days Nodejs experience? body,.backgroundTable{ background-color:#eeeeee; } #contentTable{ border:0px none #000000; margin-top:10px; } .headerTop{ background-color:#26292e; border-top:0px none #000000; border-bottom:0px none #FFCC66; text-align:center; padding:0px; } .adminText{ font-size:10px; color:#333333; line-height:200%; font-family:Helvetica; text-decoration:none; } .headerBar{ background-color:#26292e; border-top:0px none #333333; border-bottom:0px none #FFFFFF; padding:0px; } .headerBarText{ color:#333333; font-size:30px; font-family:Helvetica; font-weight:normal; text-align:left; } .postcardBarText{ color:#333333; font-size:30px; font-family:Helvetica; font-weight:normal; text-align:center; } .title{ font-size:24px; font-weight:bold; color:#4A8797; font-family:Helvetica; line-height:150%; } .subTitle{ font-size:14px; font-weight:bold; color:#000000; font-style:normal; font-family:Helvetica; } .defaultText{ font-size:12px; color:#333333; line-height:150%; font-family:Helvetica; background-color:#FFFFFF; padding:20px; border:0px none #FFFFFF; } .footerRow{ background-color:#26292e; border-top:0px none #FFFFFF; padding:20px; } .footerText{ font-size:10px; color:#666666; line-height:100%; font-family:Helvetica; } a,a:link,a:visited{ color:#17488a; text-decoration:underline; font-weight:normal; } .headerTop a{ color:#26292e; text-decoration:none; font-weight:normal; } .footerRow a{ color:#465F5D; text-decoration:underline; font-weight:normal; } body,.backgroundTable{ background-color:#26292e; } (italian version below) The International European Node.js Conference, second edition, will be held on Saturday, November 10th in Brescia, Italy. Tickets are on sale: http://nodejsconf.it/#secIscrizione. Hurry up before they sell out like last year! We organized also two Node.js workshops the day before the conference, Friday November 9th. A beginner level workshop by Golo Roden and an advanced workshop by CleanCode (Gabriele Lana - Federico Galassi) http://nodejsconf.it/#secWorkshop Call for papers is open till Thursday September 20th and the … -
Forget print(), Use pdb Instead
How often do you use print statements to display output in your manage.py runserver process to help debug something? This was my go-to method of debugging for a long time. Then I was introduced to pdb. This is so much better and useful, especially when you have situations where you have to do a lot of things in your web application in order to reproduce the conditions you are trying to debug. Using pdb and the interactive debugger is as simple as putting: import pdb; pdb.set_trace() on the line that you want to start the debug session on. When you do this and you hit that line in the execution of your application, you'll see a prompt that looks like this in your manage.py runserver output: > /Users/paltman/dev/mywebsite/mywebsite/profiles/views.py(29)profiles_list() -> if request.user.is_superuser: (Pdb) From here you can issue single letter commands like n, c, or s, which stand or Next, Step Into, or Continue. Next (n) will simply take you to the next line of execution within the current context. Step Into (s) will jump a level deeper (if it makes sense), for example it will step into a function call being made instead of just executing it and returning the … -
django CMS 2.3.2 RC1 released
-
Thoughts after attending Djangocon
The Caktus team attending and having a great time at Djangocon! It’s been one week since I posted my wrap-up of the first day at Djangocon, and although I didn’t get the chance to cover each day individually I wanted to post a quick conference wrap up. -
Thoughts after attending Djangocon
The Caktus team attending and having a great time at Djangocon! It's been one week since I posted my wrap-up of the first day at Djangocon, and although I didn't get the chance to cover each day individually I wanted to post a quick conference wrap up. Overall, the talks that I attended were consistently informative and engaging. The consensus of the Caktus team was that everyone attended talks that they walked away from with valuable knowledge or a new approach to developing. The after party events were well attended and due to the centralized location of the conference, it was very easy to try out a few different restaurants and socialize with our fellow conference goers. Djangocon continues to be one of the most enjoyable conferences that Caktus attends and we are already excited about next year! -
Thoughts after attending Djangocon
Click the image to view the entire gallery of the Caktus Team having a blast! It's been one week since I posted my wrap-up of the first day at Djangocon, and although I didn't get the chance to cover each day individually I wanted to post a quick conference wrap up. Overall, the talks that I attended were consistently informative and engaging. The consensus of the Caktus team was that everyone attended talks that they walked away from with valuable knowledge or a new approach to developing. The after party events were well attended and due to the centralized location of the conference, it was very easy to try out a few different restaurants and socialize with our fellow conference goers. Djangocon continues to be one of the most enjoyable conferences that Caktus attends and we are already excited about next year! -
DjangoCon 2012 Recap
DjangoCon 2012 Recap -
Suporte experimental ao Python 3
Suporte experimental ao Python 3 -
Suporte experimental ao Python 3
Suporte experimental ao Python 3