Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Caktus is hiring a Design Visionary and User Experience Virtuoso with a Knack for Coding
Do your mornings usually consist of reading design blogs and drinking coffee? Are you obsessive about fonts? Are you constantly seeking out new inspiration to make your designs better? As a Front-End Developer + Designer at Caktus, you’ll be able to put your passion for design and development to work by creating beautiful designs for complex websites. You will work closely with clients to bring their visions to life and help lead the branding and design process. Our designers take ownership of the user experience and design process from the beginning and collaborate with our development team to implement the vision. You should be passionate about the open source community and the philosophy behind it. If you’re interested in becoming part of and contributing to a creative, dynamic team, here’s an idea of what you’ll do: -
My experiences with Django and Python 3.3
Recently I've become involved in a couple of Django efforts that used Python 3.3. The quick summary of what I learned is pretty much what I expected: Out of the box Django 1.5 (and the pending 1.6 release) works fine with Python 3.3.2. The following are my notes, observations, and resources on the subject of working with Python 3 (with or without Django). Use Python 3.3.2! Myself and others have encountered problems with using Django 1.5+ and earlier versions of Python 3. The issues can be tricky, for example syncdb fails in curious ways on Python 3.3.0. The answer, for me, is to use Python 3.3.2 and don't look back. Checking for Python 3 Compatibility The steps I use are below. They are in rough order: Look up the package on PyPI and see if any of it's trove classifiers mention Python 3 status. See if a pull request for Python 3 support is outstanding. Run the test suite using Python 3.3 Use 2to3 to scan the code for issues. If a Django project, check the models for __str__() methods. If it has them, it's a pretty good indicator it's Python 3.3 friendly. Make a judgement call. Important Packages that … -
My experiences with Django and Python 3
The following are my notes, observations, and resources on the subject of working with Python 3 (with or without Django). Recently I've become involved in a couple of Django efforts that used Python 3.3. The quick summary of what I learned is pretty much what I expected: Out of the box Django 1.5 (and the pending 1.6 release) works fine with Python 3.3.2. Use Python 3.3.2! Myself and others have encountered problems with using Django 1.5+ and earlier versions of Python 3. The issues can be tricky; for example syncdb fails in curious ways on Python 3.3.0. The answer, for me, is to use Python 3.3.2 and don't look back. Checking for Python 3 Compatibility The steps I use are below. They are in rough order: Look up the package on PyPI and see if any of it's trove classifiers mention Python 3 status. See if a pull request for Python 3 support is outstanding. Run the test suite using Python 3.3 Use 2to3 to scan the code for issues. If a Django project, check the models for __str__() methods. If it has them, it's a pretty good indicator it's Python 3.3 friendly. Make a judgement call. Important Packages that … -
Caktus and Python Software Foundation Collaborate on PyCon 2014 in Montreal Site
[Caktus is proud to be a part of the launch of the]{style=“color:#000000; background-color:transparent; font-style:normal;”} PyCon 2014 in Montreal[ website. We were delighted to be selected as this year’s partner for software development and brand updates. In the past, we've enjoyed working with the ]{style=“color:#000000; background-color:transparent; font-style:normal;”}Python Software Foundation[ as a collaborator for the ]{style=“color:#000000; background-color:transparent; font-style:normal;”}Raspberry.io[ branding and development and are excited to help out with the PyCon website.]{style=“color:#000000; background-color:transparent; font-style:normal;”} -
Caktus and Python Software Foundation Collaborate on PyCon 2014 in Montreal Site
Caktus is proud to be a part of the launch of the PyCon 2014 in Montreal website. We were delighted to be selected as this year’s partner for software development and brand updates. In the past, we've enjoyed working with the Python Software Foundation as a collaborator for the Raspberry.io branding and development and are excited to help out with the PyCon website. This release of the PyCon 2014 in Montreal site included cleaning up the deployment process, a few fixes to the proposal process, and a cohesive branding strategy that we worked closely with the PyCon staff to create, and will be used throughout the conference. This first phase focused on getting the newly designed site launched with all of the information people need to plan their travel and submit talk proposals. We have a number of new enhancements in the works and invite you to follow along with the development and give feedback on the site's Github repository. -
Europython 2013
I have been to Europython from Jul 1th to 3th. I felt like a teenager on spring break. Maybe because I was on a trip with two good friends, but mostly because it has been a awesome event. This has been my first time at Europython. Every body has ever told me that it was a super event. And they were right. The venue: Florence: should I say more? We were staying at a lovely house in a rented -
Robots and Sitemaps
Dealing with google site indexing from google and other search engines can be a pain, but fortunately django makes it easy with django.contrib.sitemaps and the django-robots app. In this video learn to create sitemap.xml and robots.txt quickly and easily.Watch Now... -
A Djangonaut Building a Webapp in Go with Gorilla
At Lincoln Loop, we have been building large web applications using Django since 2007. Recently, however, we have recently started using Go as a critical network component of Botbot.me. -
A Djangonaut Building a Webapp in Go with Gorilla
At Lincoln Loop, we have been building large web applications using Django since 2007. Recently, however, we have recently started using Go as a critical network component of Botbot.me. Reading others' successes stories about replacing some existing components of their infrastructure with a new incarnation written in Go (Disqus and Iron.io gave me the motivation to build a webapp that is a bit more complex than the canonical "hello world" one page app. The result of this experiment is called gowebexp and is available on BitBucket. Here are a few things I learned in the process. Go is a modern language with an amazingly deep standard libraries given its age. It comes with everything you need to build a webapp: template language full featured webserver HTTP request multiplexer cookies ... However it is a totally different beast than something like "Django":htpp://djangoproject.com/. Go standard libraries tend to be very low level and, as of now, I am not aware of any full-featured framework than can compare with Django in terms of ease of use, features, and documentation. For example, here's a few things that you take for granted when you use Django that need to be handled manually: form validation Cross … -
A Djangonaut Building a Webapp in Go with Gorilla
Click here to see this post in it's natural habitat and to watch and leave comments. At Lincoln Loop, we have been building large web applications using Django since 2007. Recently, however, we have recently started using Go as a critical network component of Botbot.me. Reading others' successes stories about replacing some existing components of their infrastructure with a new incarnation written in Go (Disqus and Iron.io gave me the motivation to build a webapp that is a bit more complex than the canonical "hello world" one page app. The result of this experiment is called gowebexp and is available on BitBucket. Here are a few things I learned in the process. Go is a modern language with an amazingly deep standard libraries given its age. It comes with everything you need to build a webapp: template language full featured webserver HTTP request multiplexer cookies ... However it is a totally different beast than something like "Django":htpp://djangoproject.com/. Go standard libraries tend to be very low level and, as of now, I am not aware of any full-featured framework than can compare with Django in terms of ease of use, features, and documentation. For example, here's a few things that you … -
django-readonly-site
Occasionally I need to take WhisperGifts offline, but still show some parts of the site to users. This has included some system changes that require the site to be non-functional for a little while (such as doing a deployment with a bunch of backwards-incompatible changes, or large database migrations) and … -
django-readonly-site
Occasionally I need to take WhisperGifts offline, but still show some parts of the site to users. This has included some system changes that require the site to be non-functional for a little while (such as doing a deployment with a bunch of backwards-incompatible changes, or large database migrations) and for server moves, whilst waiting for DNS changes to propogate. To do this, I wrote a little library that I could toggle within my Django settings. I've just pulled it out of the WhisperGifts codebase, and django-readonly-site is now available on GitHub. I think it's pretty simple to use. Install it with pip install django-readonly-site, add readonly to your Django projects' settings.INSTALLED_APPS, and set settings.SITE_READ_ONLY = True. More options are available to keep parts of your site online, see the README for more details. By keeping parts of your site online (such as the homepage, about us page, and in my case a customers' registry listing) you can provide a transitional experience to users, while the database-intensive and high-integrity parts of the site (such as signup, account management, and checkout) are taken offline with a polite "Sorry, we're temporarily unavailable" message. Just after I had to quickly move to Rackspace … -
django-readonly-site
Ever wanted to keep your site online, but shut some parts of it (such as the checkout, or the signup page) down for database maintenance or other such reasons? I've just pushed a little helper app to GitHub, which I've previously extracted from WhisperGifts. It's called django-readonly-site and is available in PyPi now. -
django-readonly-site
Ever wanted to keep your site online, but shut some parts of it (such as the checkout, or the signup page) down for database maintenance or other such reasons? I've just pushed a little helper app to GitHub, which I've previously extracted from WhisperGifts. It's called django-readonly-site and is available in PyPi now. -
django-readonly-site
Ever wanted to keep your site online, but shut some parts of it (such as the checkout, or the signup page) down for database maintenance or other such reasons? I've just pushed a little helper app to GitHub, which I've previously extracted from WhisperGifts. It's called django-readonly-site and is available in PyPi now. -
EuroPython Intro to Django Workshop
We (myself and Audrey Roy) have been asked to fill in a tutorial session at EuroPython 2013 on the afternoon July 3rd! Therefore, it is my honor to announce our EuroPython Intro to Django Workshop! (see the bottom of this article for registration instructions) Workshop Description Bring your laptops and join the authors of Two Scoops of Django for a hands-on Django workshop. We'll build a real, working site from the ground up, using the upcoming Django 1.6 and covering Python 2.7/3.3. We'll cover as much as we can get through, including but not limited to: Python and Django setup Project creation App creation models The Django admin UI Views Migrations with South User image uploads New user registration Basic forms Basic internationalization Prerequisites Attendees will need their own laptops. We'll cover installation, but if you can come with the following already installed you'll enjoy workshop more: Really encouraged: Python 3.3 or Python 2.7 Really encouraged: virtualenv Really encouraged: pip If you are familiar with virtualenv, please have an instance created with the following already installed: git+git://github.com/django/django.git@1.6b1 Pillow==2.0.0 South==0.8.1 django-bootstrap-registration==0.1.2 django-braces==1.0.0 django-crispy-forms==1.3.2 django-reg==1.0.1 Registration Details Date: July 3, 2013 Time: 14:30 - 18:30 Track: Pizza Napoli Instructors: Daniel Greenfeld and … -
EuroPython Intro to Django Workshop
We (myself and Audrey Roy) have been asked to fill in a tutorial session at EuroPython 2013 on the afternoon July 3rd! Therefore, it is my honor to announce our EuroPython Intro to Django Workshop! (see the bottom of this article for registration instructions) Workshop Description Bring your laptops and join the authors of Two Scoops of Django for a hands-on Django workshop. We'll build a real, working site from the ground up, using the upcoming Django 1.6 and covering Python 2.7/3.3. We'll cover as much as we can get through, including but not limited to: Python and Django setup Project creation App creation models The Django admin UI Views Migrations with South User image uploads New user registration Basic forms Basic internationalization Prerequisites Attendees will need their own laptops. We'll cover installation, but if you can come with the following already installed you'll enjoy workshop more: Really encouraged: Python 3.3 or Python 2.7 Really encouraged: virtualenv Really encouraged: pip If you are familiar with virtualenv, please have an instance created with the following already installed: git+git://github.com/django/django.git@1.6b1 Pillow==2.0.0 South==0.8.1 django-bootstrap-registration==0.1.2 django-braces==1.0.0 django-crispy-forms==1.3.2 django-reg==1.0.1 Registration Details Date: July 3, 2013 Time: 14:30 - 18:30 Track: Pizza Napoli Instructors: Daniel Greenfeld and … -
Floyd-Warshall ‘s All Pair Shortest Path Algorithm
In the previous two posts, I explained two different algorithms to find the shortest path in the graph. In this post I will define another very simple yet important problem in Graph Theory. Its called the “All Pair Shortest Path” problem. Given a graph G, as a set of vertices V and directed weighted edges E, the aim of the problem is to find the cost of shortest path between every pair of vertices. Cost of a shortest path is defined as the sum of the edge weights in the shortest paths. At first sight this problem might look really hard to approach. But the following theorem will make this one of the easiest to approach and especially code it. Theroem: If A represents the adjacency matrix of the graph, then for an integer k<=|V| , the (i,j) entry in the matrix A^k , gives the shortest path of length atmost k, between i and j in the original graph. This above theorem can be easily proved using induction on k. I will leave that as a simple exercise. From the theorem, all that is left to find is the matrix A^n. A trivial way to compute this would be … -
Palestra GeoDjango no FISL
Geodjango Vou apresentar uma palestra sobre GeoDjango no primeiro dia do FISL. Resumo da palestra: Utilizando apenas soluções livres, é possível criar um sistema completo de informações geográficas (SIG/GIS), incluindo mapas (OpenStreetMap/Mapbox), banco de dados geográfico (PostGIS) e um framework web completo como o Django. Essa palestra detalha como integrar essas soluções para processamento de informações geográficas para exibir áreas e plotagens no mapa e territórios. Conteúdo: O Django possui uma biblioteca excelente para trabalhar com informações geográficas, trata-se do GeoDjango, que está bem estável, maduro e já vem integrado ao core do Django. Em conjunto com ele, o PostgreSQL possui uma extensão chamada PostGIS, capaz de criar um banco de dados geográfico e realizar cálculos diretamente via SQL. Para enriquecer mais o cenário de soluções livres, o OpenStreetMap é capaz de exibir belos mapas em alternativa ao Google Maps. É possível modificar os ’tiles’ usando o Mapbox, para mapas estilizados e camadas customizadas. Essa palestra tem como objetivo explicar alguns conceitos geográficos, detalhar o uso do PostGIS, como criar um projeto geográfico no Django e como integrar a solução ao OpenStreetMap. O resultado final será uma aplicação funcional, capaz de exibir polígonos, áreas, território e pontos no mapa, além … -
Limiting choices in a ModelAdmin list_filter
So, you need to limit choices, because the list of related choices is too long? Then do NOT use limit_choices_to parameter on the ForeignKey! Why? Because you risk having options missing in your forms, deleting relations unknowingly. For instance, consider that you have the following case, expressed in pseudo code: ModelClass.related_instance = models.ForeignKey(MyRelatedModel, limit_choices_to = {'active': True}, blank=True, null=True) object = &lt;ModelClass instance&gt; object.related_instance = &lt;MyRelatedModel instance&gt; object.related_instance.active = False If you edit object, you will see an admin form where <MyRelatedModel instance> is not selectable! Hence, you will risk editing and loosing data without knowing it. So your best bet is to stop using limit_choices_to and instead define a filter. Luckily, it’s quite easy. It’s not beautiful, though, since admin.filters.RelatedFieldListFilter does not offer a method to overwrite. Here is an example: class RelatedFilter(admin.filters.RelatedFieldListFilter): def __init__(self, *args, **kwargs): super(RelatedFilter, self).__init__(*args, **kwargs) self.lookup_choices = [ (x.id, x) for x in models.RelatedModel.objects.filter(status='active') ] class MyModelAdmin(admin.ModelAdmin): list_filter = (('related_field', RelatedFilter), 'other_related_field') -
Prim’s Algorithm
In the last post, I defined a spanning tree and gave an algorithm called the ‘Kruskal’s Algorithm’. In this post, I am going to describe another algorithm that also helps in computing the minimum spanning tree of a graph. This algorithm is called the ‘Prim’s Algorithm’ . The basic intuition behind the algorithm goes as follows: Firstly, every vertex should be reachable from every other vertex for it to be a tree. So we will try to build the tree by adding one vertex after another into the connected component. Since we want a “minimum” such tree, we will use the edge between the new vertex and the old component, that is of the minimum weight. This intuition is formalized below as an algorithm: Set ConnectedSet = Pick a random vertex v of vertex set Set ToBeAddedSet = set of vertices except vertex v Set ListOfBridgeEdges = Set of Edges while ToBeAddedSet not empty: - Select the minimum edge e from the ListOfBridgeEdges such that it has exactly one end in ConnectedSet - Add the other end of e to the ConnectedSet and remove it from the ToBeAddedSet Let us now analyze the complexity of the above algorithm: 1) The … -
Debugging Python code in a browser with wdb debugger
wdb is a nice Python debugger running as a server and capable of launching debug session in your browser. It can handle simple scripts, web apps (Tornado, Flask or Django based and alike) as well as other multithread and multiprocess programs. It's easy to use and not much configuration is required. -
"People don’t buy what you do they buy why you do it" -...
"People don’t buy what you do they buy why you do it" - Simon Sinek -
Mercurial Mirror For Django 1.6 branch
Django has another branch, and we have another mirror. Today Django 1.6 beta 1 was released, and that seemed a good day to start the 1.6 mirror. So here it is, next to the other mirrors on my bitbucket account: https://bitbucket.org/orzel/django-1.6-production/ -
You Should Be Using Nginx + UWSGI
After lots of experimentation (between disqus.com and getsentry.com), I content with saying that uwsgi should be the standard in the Python world. Combine it with nginx and you're able to get a lot of (relative) performance out of your threaded (or not) Python web application. Update: Ignori...