Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
July 15th, 2012 LA Open Source Recap
On July 15th, 2012, at the July LA Hackathons Open Source event, over 60 Python, Django, Ruby, Ruby on Rails, PHP, JavaScript, Node.js, Perl, and Clojure developers arrived to work on a variety of projects. We went from 10 AM to 10 PM, and there was much coding and learning done by all. There was a very powerful vibe shared by nearly everyone there, and it was great to see so many people from different personal and open source backgrounds working together and having a great time as a group. Filtering out distractions We made some changes to our proceedings for this event, entirely because last time with 'distractions' that caused some issues. In a nutshell, here is 50% of what we did: A clear statement in the event description and follow up emails that this event was for developers and designers only. Laptops were an absolute requirement for entry into the event. We also rolled in a couple other tricks I'm not going to write down. If you see me in person, ask away. The results were near perfect, and we won't hesitate to use these techniques again. Sponsors We let attendees know which sponsors were interested in potential … -
DjangoCon videos and pictures
The DjangoCon videos have been online for a while now, but unfortunately without a download option. So for those that would like to download the videos, we've created a torrent with the full (raw) video material. You can find the torrent information in this gist.We also created a torrent for the pictures taken by our photographer. Again this is the "raw" material (meaning all the pictures, even the blurry ones, are included). Some photos have been removed because they showed potentially private content on laptop screens, other than that all pictures are included. The information about this torrent can be found in this gist.The material in both torrents is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.If you don't know how to download content via torrent, I suggest you try googling it, there should be more than enough information about this. -
How I Stopped Worrying and Started Loving PyLadies
When I read about PyLadies for the first time, my thoughts were a common knee-jerk: “separation is bad, dividing the community, …”. Like many of my privileged peers, I was pro-diversity but I thought this is the wrong way. My views changed over time and I filed it under “lessons learned”. Unfortunately, my old thinking patterns don’t cease to pop up in discussions, so I decided to share my perspective. First of all, let’s get one thing out of the way: Diversity is good for a community. If we can’t agree on this fact, you can stop reading here. There are enough studies and blog posts that support this point and if you’re not convinced, this article isn’t for you. If you look at it, this reason is pretty egoistic. But it seems the most helpful to make my point why you should care. The other question we should ask ourselves, is whether it isn’t our duty to help less-privileged ones (aka everyone who’s not a cis-gendered hetero white man in his twenties with a lot of free time) into our high-pay industry. But let’s keep social justice aside for now. In this article, I’m using women as the IT … -
Django Fundamentals Bootcamp Recap
On June 8th and 9th, Caktus hosted its first Django Fundamentals Bootcamp. The Caktus team developed the idea for the course, which was a crossword drill application, and has been developing the structure and content of the course over the past year. The bootcamp was designed to teach programmers who have experience in programming with ... -
Django Class-Based View Mixins: Part 1
-
Einladung zur Django-UserGroup Hamburg am 11. Juli
Das nächste Treffen der Django-UserGroup Hamburg findet am Mittwoch, den 11.07.2012 um 19:30 statt. Auch dieses Mal treffen wir uns in den Räumen der intosite GmbH im Poßmoorweg 1 (3.OG) in 22301 Hamburg. Da wir in den Räumlichkeiten einen Beamer zur Verfügung haben hat jeder Teilnehmer die Möglichkeit einen kurzen Vortrag (Format: Lightning Talks oder etwas länger) zu halten. Konkrete Vorträge ergeben sich erfahrungsgemäß vor Ort. Eingeladen ist wie immer jeder der Interesse hat sich mit anderen Djangonauten auszutauschen. Eine Anmeldung ist nicht erforderlich. Weitere Informationen über die UserGroup gibt auf unserer Webseite www.dughh.de. -
Simple HTTP Basic Auth Wall
I have a client who wanted their entire unlaunched public content site quickly but temporarily blocked for a short period of time. He wanted a universal password so he could send the site to reviewers, done quickly, and nothing else. In a few days the site will launch, and even if someone got through the authentication, nothing bad will happen except for an early visitor. So we determined this was a job for a very simple Basic access authentication implementation. I asked around and Jacob Kaplan-Moss gave me this awesome snippet using barrel that I pasted right into the bottom of the Django 1.4-style application's wsgi.py file. # Add to the bottom of your wsgi.py file # Don't forget to add barrel to your requirements! from barrel import cooper REALM = "PRIVATE" USERS = [('spam', 'eggs')] application = cooper.basicauth(users=USERS, realm=REALM)(get_wsgi_application()) This took all of 5 minutes to implement and launch. The result is that the first time you visit the site the login prompt appears. If you enter 'spam' and 'eggs' then you can see the site fine. It worked and the customer was happy. Will this block a concerted penetration attempt? Of course not. If the site has/had critical … -
Simple HTTP Basic Auth Wall
I have a client who wanted their entire unlaunched public content site quickly but temporarily blocked for a short period of time. He wanted a universal password so he could send the site to reviewers, done quickly, and nothing else. In a few days the site will launch, and even if someone got through the authentication, nothing bad will happen except for an early visitor. So we determined this was a job for a very simple Basic access authentication implementation. I asked around and Jacob Kaplan-Moss gave me this awesome snippet using barrel that I pasted right into the bottom of the Django 1.4-style application's wsgi.py file. # Add to the bottom of your wsgi.py file # Don't forget to add barrel to your requirements! from barrel import cooper REALM = "PRIVATE" USERS = [('spam', 'eggs')] application = cooper.basicauth(users=USERS, realm=REALM)(get_wsgi_application()) This took all of 5 minutes to implement and launch. The result is that the first time you visit the site the login prompt appears. If you enter 'spam' and 'eggs' then you can see the site fine. It worked and the customer was happy. Will this block a concerted penetration attempt? Of course not. If the site has/had critical … -
Rate your ISP
In June a bunch of great people went with me to a cottage for the weekend to create something. It was our 3rd Wilderness Labs adventure. The outcome is pretty awesome. We built a service to collect simple ISP reviews to help Canadians find their best local ISP. We called it RateMyISP. (Coming up with names might not be our strongest suit.) The idea came from Open Media's Stop the Meter campaign when more Canadians signed a petition protecting indy ISPs than use them. People who use the larger players still wanted the indy ISPs to exist so they would have an option when they become dissatisfied. Trouble is, finding the right local or indy ISP is kind of difficult. I found mine in London, ON thanks to a Reddit comment which is no doubt now buried never to be found again. The comment listed the local ISP options per city in southern Ontario. There had to be a better way and now there is. The service is ready to start absorbing reviews. As we gather reviews over the next few months we will use that information to vastly improve the search. We plan to highlight what areas indy ISPs … -
Unstable HTTP services: what we can do to easily handle that?
The story: I have several HTTP service providers which works quite unstable. Yes, I had to have in mind this during development. But we're all thought that issues are "temporary" and will gone when we going to production. We accurately added logging.error in every place and move on with other stuff.But our expectation about temporary nature of service behavior will never happen. Service sometimes work slowly, sometimes return HTTP errors and so on. We receive tons of exceptions every day. We had to do something with that.The solution: Here is safe_exec decorator which help solve this problem. You can specify how many times you want to try execute function, what's timeout between them and what exceptions are expected during execution decorated function. For example, urllib2.urlopen may generate urllib2.URLError or urllib2.HTTPError.import loggingimport timefrom functools import wraps__all__ = ("safe_exec",)def safe_exec(exceptions, shakes=3, timeout=1, title="", **kwargs): """ Decorator to safely execute function or method within `shakes` trying. In case provide argument `default` exception will not be raised and will return provided value. """ def wrap(func): if not isinstance(exceptions, tuple): raise TypeError( "First argument of safe_exec should be tuple of exceptions" ) @wraps(func) def wrapped(*args, **kwargs): result = None orig_exception = None for shake in range(shakes): try: result = func(*args, **kwargs) break except exceptions, orig_exception: logging.warn("%s: Sorry, … -
Developing RESTful Web APIs with Python, ...
This week's [Python Weekly](http://us2.campaign-archive1.com/?u=e2e180baf855ac797ef407fc7&id=bbe8f42215&e=04306b42c9) has a link to a presentation by [Nicola Iarocci](), called [Developing RESTful Web APIs with Python, Flask and MongoDB](https://speakerdeck.com/u/nicola/p/developing-restful-web-apis-with-python-flask-and-mongodb). I have a few minor concerns with some aspects of the content. > No form validation This concerns me. I've recently started using django's forms for my validation layer for API calls, and also for the generation of the serialised output. It's not completely flawless, but it seems to be working quite well. It certainly is more robust than my hand-rolled scheme of validating data, and using code that is better tested than my own is always a bonus. Instead, as we see later, there is a data validation layer. It has basically the same goal as django's forms, but is somewhat more nested, rather than using classes. Also, using classes makes it easier to have inheritance, a great way to have shared rules. You could do this using the same function in your custom validation, but this feels disconnected. > MongoDB > scalable, high-performance, ... The integrity of my data is important to me. It's very rare that the db is the limiting factor in my system's performance, and having stuff written to disk as soon … -
Provisioning, Deployments and Testing - Oh my!
Here at Imaginary Landscape, we have an initative to explore solutions to some of our on-going deployment meta-problems. Those problems include things like standardizing our Django project structures and the hosting environments in which we host them. Another challenge that we have been considering is testing our sites locally. After ... -
PyCon Philippines 2012 Day 2
The second day of PyCon Philippines 2012 had a really good turnout. My unofficial estimate is that we had about 90% of the attendees from the first day attend (with the unfortunate exception of most of the faculty and students of Agoo Computer College). The day started with... Lightning Talks Unfortunately I don't normally take notes on lightning talks. I'm kicking myself now. Really hard. I'll try and relate some of the talks: Import this and that, a parody talk by Daniel Greenfeld (me). Malcolm comment on it. Getting into space using weather balloons by Frank Pohlmann Ponystrap by Audrey Roy (video from DjangoCon Europe) Call for Tagalog and other Philippine languages translation of Django by Malcolm Tredinnick The obligatory PyCon lighting talk on Vim by Bryan Bibat OpenERP by Frank Pohlmann and Ann Tan-Pohlmann A parody talk by Sony Valdez Then it was on to... Sprints and Tutorials Encouraged at #pyconph seeing so many people declaring themselves beginners and then diving in. Enthusiasm was a bit contagious. —Malcolm Tredinnick on twitter Primary funding for the sprints came from the Django Software Foundation and Python Sprints. That funding went towards food, drinks, and various logistics for handling the estimated 200+ … -
PyCon Philippines 2012 Day 2
The second day of PyCon Philippines 2012 had a really good turnout. My unofficial estimate is that we had about 90% of the attendees from the first day attend (with the unfortunate exception of most of the faculty and students of Agoo Computer College). The day started with... Lightning Talks Unfortunately I don't normally take notes on lightning talks. I'm kicking myself now. Really hard. I'll try and relate some of the talks: Import this and that, a parody talk by Daniel Greenfeld (me). Malcolm comment on it. Getting into space using weather balloons by Frank Pohlmann Ponystrap by Audrey Roy (video from DjangoCon Europe) Call for Tagalog and other Philippine languages translation of Django by Malcolm Tredinnick The obligatory PyCon lighting talk on Vim by Bryan Bibat OpenERP by Frank Pohlmann and Ann Tan-Pohlmann A parody talk by Sony Valdez Then it was on to... Sprints and Tutorials Encouraged at #pyconph seeing so many people declaring themselves beginners and then diving in. Enthusiasm was a bit contagious. —Malcolm Tredinnick on twitter Primary funding for the sprints came from the Django Software Foundation and Python Sprints. That funding went towards food, drinks, and various logistics for handling the estimated 200+ … -
WhisperGifts: The Tech That Let Me Launch
The WhisperGifts re-launch recently went very well! I promised a more technical follow-up with some details about what's new and what's changed, so if you want to know more about what makes WhisperGifts tick then you'll want to read on. Hint: It's a dash of Django, a pinch of Python, and a slathering of open-source software all around. -
WhisperGifts - The Tech That Let Me Launch
The WhisperGifts re-launch recently went very well! I promised a more technical follow-up with some details about what's new and what's changed, so if you want to know more about what makes WhisperGifts tick then you'll want to read on. Hint: It's a dash of Django, a pinch of Python, and a slathering of open-source software all around. The primary technology behind WhisperGifts is Django, the "web framework for perfectionists with deadlines". My own deadline for this project was rather, ahem, flexible - the new design was a work in progress for 2 years (on-and-off, mostly off due to the birth of our baby) and the back-end re-write happened over a few months early in 2012. Django allows us to iterate quickly. I find the language natural to use and the documentation is epic. There's a number of things that no framework does out of the box; I've tried to rely on open-source to fill as many gaps as possible rather than re-writing things from scratch like I did with the original WhisperGifts site - this is mostly because the open-source ecosystem around Django is now so much larger than it used to be. As an example, originally I rolled … -
WhisperGifts - The Tech That Let Me Launch
The WhisperGifts re-launch recently went very well! I promised a more technical follow-up with some details about what's new and what's changed, so if you want to know more about what makes WhisperGifts tick then you'll want to read on. Hint: It's a dash of Django, a pinch of Python … -
PHP, Python and Persuasion
I always find it fascinating to observe conversations in which people's arguments fail to convince each other. A few days ago we witnessed some PHP debates, kicked off by Jeff Attwood. I foolishly got slightly involved on one ‘rebuttal’. At church last Sunday I also chatted with a friend who has used PHP and likes it, and this time I tried to put myself in his shoes. It is often much more helpful talking to people in the flesh, and I think it is always enlightening to look at why we fail to convince. One reason we can't rule out is simple irrationality. All of us are vulnerable to confirmation bias, and people will often go to great lengths to convince themselves that they are doing the right thing and do not need to change their views or practices. You see this all the time when two groups of people share experiences after having made different decisions about how to spend some leisure time. Both groups are often desperate to believe that they haven't missed out, and will seek to persuade each other (but in reality, persuade themselves) that they were in the group that had the most fun. However, … -
Create Text & Online Versions of Emails Automatically
For this i’ve created django-firstclass. Firstclass is a proxy email backend for Django that allows for global email transformations such as automatically creating a plain text version of html emails or automatically creating an online version of the email that can be read in browser. My goal was to have this be a drop in solution requiring no change to a code base. I also wanted this to be flexible enough so that it can work with a wide variety of projects. I accomplished this by adding a middleware pipeline to Django’s email process. I’ve bundled a few useful middleware in and plan to add a few more. Creating your own middleware is simple. Middleware is a single Python class that defines process_message. For example if you wanted to create a middleware that would add a tracking pixel to all of your emails: http://gist.github.com/3048960 You would then simply add TrackingPixelMiddleware to FIRSTCLASS_MIDDLEWARE. https://github.com/amccloud/django-firstclass -
TND dataview and metaclass magic in python - Maarten ter Horst
-
Rethinking the Django-CMS landscape - Diederik van der Boor
-
Document automation (Office) using Django - Henk Vos
-
Building single-page web-applications with Django, Twisted and TxWebsocket - Jeroen van Veen
-
PyCon Philippines 2012 Day 1
PyCon Philippines 2012 (PyCon PH) happened just this past weekend at the University of the Philippines Diliman (UP Diliman) campus in Quezon City, which is part of Metro Manila. I can assure you that PyCon PH was an wonderful, amazing, humbling experience. I'm hoping that this post and others will get across to you why. Arrival Frank Pohlmann, chairman of PyCon Philippines picked us up and drove us to the event. He had worked day and night getting the event ready, all the while running his company, working a job, and being a father to his lovely 21 month old daughter. As we arrived at the venue, Audrey and I were met by our good friend, Filipino-American Bryan Veloso of Github, who was to provide the closing keynote. As soon as Bryan heard that there was going to be a PyCon in the Philippines he gave up his trip to Europython to be a speaker at PyCon PH. Inside the Institute of Electrical and Electronics Engineering, we were greeted Ann Tan-Pohlman, logistics co-chair and volunteer organizer. She had over a dozen volunteers getting ready for the oncoming flood of registrants. More on the herculean efforts of the organizers and volunteers … -
PyCon Philippines 2012 Day 1
PyCon Philippines 2012 (PyCon PH) happened just this past weekend at the University of the Philippines Diliman (UP Diliman) campus in Quezon City, which is part of Metro Manila. I can assure you that PyCon PH was an wonderful, amazing, humbling experience. I'm hoping that this post and others will get across to you why. Arrival Frank Pohlmann, chairman of PyCon Philippines picked us up and drove us to the event. He had worked day and night getting the event ready, all the while running his company, working a job, and being a father to his lovely 21 month old daughter. As we arrived at the venue, Audrey and I were met by our good friend, Filipino-American Bryan Veloso of Github, who was to provide the closing keynote. As soon as Bryan heard that there was going to be a PyCon in the Philippines he gave up his trip to Europython to be a speaker at PyCon PH. Inside the Institute of Electrical and Electronics Engineering, we were greeted Ann Tan-Pohlman, logistics co-chair and volunteer organizer. She had over a dozen volunteers getting ready for the oncoming flood of registrants. More on the herculean efforts of the organizers and volunteers …