Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Release 1.0.4
-
Django-SmartAgent
Dajngo-smartagent identifies Browser and OS name, version and characteristics. It achieves this surprisingly fast (<1ms) compared to other libraries with similar qualities. Some of characteristics identifiable are:if client is a mobile devicemax CSS version is supportedif client is a web crawlerif a client is considered alpha/betaOS and OS versionAlso popped in are some useful features for Django sites that want to support mobile versions.To install it you can either use pip/easy_install pip install django-smartagent #or easy_install django-smartagent or alternatively from repository git git+https://jamespacileo@github.com/jamespacileo/django-smartagent.git#egg=django-smartagent Code and documetnation is at https://github.com/jamespacileo/django-smartagent. Hope this helps a few peeps out. :) -
Django: quick templating with CleverCSS
CleverCSS is one of the alternatives for SASS CSS templating for Django. The markup language is a great way of replacing and generating ordinary and complex CSS stylesheets on the fly. In this article we will delve into how CleverCSS can exponentially speed up your Django projects and how we can start using this tool in a few easy steps. Tutorial Details Program: Django, CleverCSS, django-clevercss Difficulty: Intermediate Estimated Completion Time: 30 minutes What is CleverCSS? CleverCSS is a powerful markup language for the swift implementation of CSS stylesheets. The design of the markup is similar to that of SASS, so if you are already familar with the language this tutorial will be a breeze. CleverCSS drammatically reduces the time it takes to write up CSS rules mainly by: Decreasing repetitive punctuation such as semicolons and curly brackets Nesting rules Defining variables Enabling use of expressions This is an example of CleverCSS markup: div.article: width: 300px h2.article-title: color: #111 font-size: 16px &:hover: color: #222 div.body: font-size: 12px This is the equivalent CSS code: div.article{ width: 300px; } div.article h2.article-title{ color: #111; font-size: 16px; } div.article h2.article-title:hover{ color: #222; } div.article div.body{ font-size: 12px; } As you can see the first … -
Finally. Created myself a blog.
Hi folks!I'm quite excited as this is my first proper blog, and I am planning on writing quite often. Will look forward to see how this goes :) -
Organizing Django settings
I think it’s not cool that I’m not blogging. I decided to write small posts about several simple things, techniques and conventions I use often. Configuration is hard to get right, and I don’t think Django’s settings is the best way to configure a web app. The most common problem with Django’s settings is a desire to customize them for some particular environments, e.g. have a different DATABASE setting on development and production machines. And on of the most common solutions is simple and stupid: # settings.py as is, the standard Django's from django-admin.py startprojects DEBUG = True TEMPLATE_DEBUG = True # ... all this kind of stuff, and in the end: try: from local_settings import * # this is wrong. don't do this! except ImportError: pass The main reason to hate it when somebody does it is that you can’t use any value from settings.py in local_settings.py. It’s not cool. I want to be able to do things like, you know: INSTALLED_APPS += ('gunicorn',) No, it’s not possible. And don’t try from settings import INSTALLED_APPS, it won’t work. What to do about it? I really think of myself as a smart person, but the first time I decided to … -
Django Admin Override Save for Model
Sometimes it's nice to be able to add custom code to the save method of objects in the Django Admin. So, when editing an object on the Admin object detail page (change form), adding the following method override to your ModelAdmin in admin.py will allow you to add custom code to the save function. In admin.py: class MyModelAdmin(admin.ModelAdmin): def save_model(self, request, obj, form, change): # custom stuff here obj.save()This is documented in the Django Docs, but I found it particularly useful. -
Ken Cochrane | Blog | Deploying my Django application to DotCloud
-
Lista de países con django-countries
Es probable que muchos de nuestros lectores se hayan visto en la necesidad de agregar a su sitio/aplicación web una lista de países con sus respectivas ciudades. ¿Esto es posible sin necesidad de emplear mucho tiempo?. La respuesta es SI, gracias a django-countries y la magia de Django es posible hacerlo en forma práctica y elegante, usando el estándar ISO 3166-1 para la representación de países. -
Work for me!
Are you looking for an awesome web development gig? Then you should come work for me at Revsys. We're hiring a full-time Python/Django developer. Update: The position's been filled. That said, we're continuing to expand, so if you're an awesome Python/Django developer and want to work with us, get in touch anyway. For the right person we'd create a position. Revsys is a consulting and services business built around Django; we specialize in scalability and real-world deployment concerns. In practice this means we get to see all sorts of awesome, atypical, large-scale uses of Django. Our clients include some of the largest users of Python and Django in the world. Why should you work for us? I clearly think Revsys is an awesome place to work. Here are just a few reasons why you might, too: We're a small, scrappy startup, but we're 100% self-financed, so there's no investors to deal with. We're a company built and run by techies, and we've carefully optimized our business so that we get to work on the most interesting types of technical problems out there. The work's incredibly exciting -- never a dull day. We pick our clients very carefully. In fact, we're … -
We won first place at Startup Camp LA!
On a whim we (me and audreyr) decided to try out Startup Camp LA organized by Semantic Seed. This is one of those Silicon Vally style competitions to launch a minimally viable product along with a business plan and marketing pitch in the course of a weekend. We thought it would be a good excuse to hack on a project we've been cooking up in our heads over a year. So we booked our tickets via meetup.com and showed up at the new Nextspace Los Angeles location.The organizers did a really good great job providing space, food, and lots of useful advice. I look forward to the next event that they run in the area.Startup Camp LA PitchesThe first pitch was on Confidox, an exclusive recruiting site for lawyers with a focus on clean design, security, and good use of email/sms. The presenter, a professional attorney with great oratory skills, had mockups and a business plan ready to go.Audrey gave our pitch, which is a site for recruiting developers that is created and maintained by developers. Developers are treated with dignity and respect, and not as replaceable components. We've talked to people on-and-off about this for over a year, and thought this … -
Work for me!
Are you looking for an awesome web development gig? Then you should come work for me at Revsys. We’re hiring a full-time Python/Django developer. Update: The position’s been filled. That said, we’re continuing to expand, so if you’re an awesome Python/Django developer and want to work with us, get in touch anyway. For the right person we’d create a position. Revsys is a consulting and services business built around Django; we specialize in scalability and real-world deployment concerns. -
Geany, editor per a programació
Aquestes festes he estat mirant-me l'editor Geany per veure com responia a les meves necessitats de tenir un editor per a programació fonamentalment Python i Django que fos a la vegada potent i que tingués baixos consums de memòria. En un editor per a programació crec que és important seguir el principi de Pareto o regla del 80-20, és a dir, vull un editor que amb el 20% de comun de recursos tengui el 80% de les funcionalitats d'un IDE com Eclipse+Pydev o PyCharm per exemple. Avui en dia el meu editor de capçalera és Vim/Gvim totalment personalitzat amb la configuració que podeu trobar a trespams-vim, crec que és una bona configuració, però tot i la potència de Vim tanmateix no faig servir ni un 20% de les possibilitats que m'ofereix l'editor. El que sí que crec que és important és dominar-lo, ja que de tant en tant convé editar via ssh i saber fer anar vim amb condicions és un avantatge. La cosa doncs és que vaig decidir donar una altra ullada a Geany, ja que vaig veure a la web que havien llançat una nova versió, la 0.2 més moderna que la que tenia ja instal·lada a Ubuntu. … -
Introducing django-lazysignup
django-lazysignup is a package designed to allow users to interact with a site as if they were authenticated users, but without signing up. At any time, they can convert their temporary user account to a real user account. Read more about it below. -
Introducing django-lazysignup
django-lazysignup is a Django application that was partly inspired by a talk that Simon Willison gave at EuroPython a few years back (perhaps 2008, or 2009?) and partly to scratch an itch I had with an application I was building at the time. The problem it tries to solve is that making users sign up with a web site just to try out your app is quite a high barrier - potential users just bounce right off that registration form. I'd seen some efforts to solve this problem before. Most seemed to involve stashing the data for some predetermined part of the website somewhere (often in the session) and then reconstituting it into real application data when the user eventually bites the bullet and signed up. This worked OK, but you had to write it anew for every web site, as clearly the data you'd want to store would change from site to site. You also ended up effectively developing a miniature version of your site that would work with some limited data set. This didn't really seem good enough. So I started wondering - what if we just created a real user for every person who visited the site? … -
Introducing django-lazysignup
django-lazysignup is a Django application that was partly inspired by a talk that Simon Willison gave at EuroPython a few years back (perhaps 2008, or 2009?) and partly to scratch an itch I had with an application I was building at the time. The problem it tries to solve is that making users sign up with a web site just to try out your app is quite a high barrier - potential users just bounce right off that registration form. I'd seen some efforts to solve this problem before. Most seemed to involve stashing the data for some predetermined part of the website somewhere (often in the session) and then reconstituting it into real application data when the user eventually bites the bullet and signed up. This worked OK, but you had to write it anew for every web site, as clearly the data you'd want to store would change from site to site. You also ended up effectively developing a miniature version of your site that would work with some limited data set. This didn't really seem good enough. So I started wondering - what if we just created a real user for every person who visited the site? … -
Introducing django-lazysignup
django-lazysignup is a Django application that was partly inspired by a talk that Simon Willison gave at EuroPython a few years back (perhaps 2008, or 2009?) and partly to scratch an itch I had with an application I was building at the time. The problem it tries to solve is that making users sign up with a web site just to try out your app is quite a high barrier - potential users just bounce right off that registration form. I'd seen some efforts to solve this problem before. Most seemed to involve stashing the data for some predetermined part of the website somewhere (often in the session) and then reconstituting it into real application data when the user eventually bites the bullet and signed up. This worked OK, but you had to write it anew for every web site, as clearly the data you'd want to store would change from site to site. You also ended up effectively developing a miniature version of your site that would work with some limited data set. This didn't really seem good enough. So I started wondering - what if we just created a real user for every person who visited the site? … -
longjmp() 2011 - Impromptu Party
Lawrence has been having a bunch of downtown block parties lately, which are always great fun. The last couple of days the Kansas Relays have been going on and the long jump event was setup directly outside our office windows. Since we had such a great view we quickly through together a little party and invited all of our geeky friends to come watch, we had a pretty good turn out (free beer works apparently). Here are some photos I took from our office. You can find more professional quality photos of the event here. Thanks to everyone for coming out! -
I teach Python and Django
This is one of those blog posts where a developer announces that he/she is teaching for a whole week. The difference is that in this post I'm going to explain why I want to teach and why you should take my classes or send your staff.I'm an experienced instructor.I've taught a variety of things for over 20 years, including in alphabetical order: Best practices, Django, English, JQuery, martial arts, Pinax, Python, Selenium, soccer, and unit testing. I speak clearly, get across technical points well, and love the material. I also know how to provide an early foundation of knowledge and then expand upon it for maximum benefit.I don't just dump knowledge into the heads of my students; I take the time to teach them common standards and best practices, so their code is extendable and maintainable.I'm not alone. Audrey Roy, co-founder of Cartwheel, leader of PyLadies and Django Packages, who has tutored and lab assisted at MIT will be teaching with me, meaning the teacher-to-student ratio is kept at 5:1 for our first offering. I want you to surpass me.After teaching various things for many years I've found it a point of honor and immense pride when a student shines better than … -
Upcoming Python and Django classes
This is one of those blog posts where a developer announces that he/she is teaching for a whole week. The difference is that in this post I'm going to explain why I want to teach and why you should take my classes or send your staff.I'm an experienced instructor.I've taught a variety of things for over 23 years, including in alphabetical order: Best practices, Django, English, Java, JQuery, martial arts, Pinax, Selenium, soccer, and unit testing. I speak clearly, get across technical points well, and love the material. I also know how to provide an early foundation of knowledge and then expand upon it for maximum benefit.I don't just dump knowledge into the heads of my students; I take the time to teach them common standards and best practices, so their code is extendable and maintainable.I'm not alone. Audrey Roy, who has tutored and lab assisted at MIT will be teaching with me, meaning the teacher-to-student ratio is kept at 5-1 for our first offering.I want you to surpass me.After teaching various things for many years I've found it a point of honor and immense pride when a student shines better than myself. I'm not one of those teachers who holds … -
Ken Cochrane | Blog | My Day in Gondor.io
-
Djangocong 2.0, le bilan
4 jours après la fin des Cong, il est temps pour moi de faire le bilan de cette deuxième est, en tout cas à mon sens, excellente édition. Les Congs en quelques chiffres : 11 conférences le matin 12 slots de barcamp l'après-midi 1 app releasée durant les Congs 1 doc de bonne pratique lancée 75 personnes le samedi matin dans ... -
Solving “Caught TypeError while rendering: coercing to Unicode: need string or buffer”
I’ve been working on a little side project in Django 1.3 and have run into a couple instances in the Django admin where I would get the error: "Caught TypeError while rendering: coercing to Unicode: need string or buffer" I did a little Bing-ing (my new default search engine — Google is too big, powerful and, dare I say, evil) and found the following solution from Ryan Brady. For a Bing search of “django admin ‘Caught TypeError while rendering: coercing to Unicode: need string or buffer‘” there were only 4 results, but lucky for me, Ryan’s solved my problem. Have you ever edited your models.py file and shortly after when trying to see the change list for a model in the admin site you received this error? Caught an exception while rendering: coercing to Unicode: need string or buffer, NoneType found I did today and it was one of those “bonehead” moments. You know, the one where you’ve been coding for a bit and for some reason make a simple error that leaves you thinking “I’ve done that exact same action a hundred times, why would I get an error this time?”, when you realize you made a really simple … -
What is Gondor
“What is Gondor?”, asks a friend of mine who doesn’t know the difference between Django and Rails and probably thinks that Python is a creature found at the zoo’s reptile exhibit. To explain Gondor to someone who isn’t a programmer can be a bit tricky, if not near the impossible. I realize that I carry a lot of presuppositions when explaining Gondor even when trying to be non-technical. To get around that, I think I just need to try my best and explain some of these pre-requisites, if you will, to understanding Gondor and why it delivers so much value. First, Gondor solves a problem called “deployment” in software development circles. This basically means taking software that has been written in one place (e.g. my laptop) and putting it in a place where others can use it (e.g. on a web server). There are a lot of steps involved in just getting the software updated on the web server in between updates to the software. In addition, to the act of updating the software, it would require the developer or another person, to be skilled at setting up web servers, keeping them updated with security patches, etc. Secondly, Gondor, through … -
What is Gondor
“What is Gondor?”, asks a friend of mine who doesn’t know the difference between Django and Rails and probably thinks that Python is a creature found at the zoo’s reptile exhibit. To explain Gondor to someone who isn’t a programmer can be a bit tricky, if not near the impossible. I realize that I carry a lot of presuppositions when explaining Gondor even when trying to be non-technical. To get around that, I think I just need to try my best and explain some of these pre-requisites, if you will, to understanding Gondor and why it delivers so much value. First, Gondor solves a problem called “deployment” in software development circles. This basically means taking software that has been written in one place (e.g. my laptop) and putting it in a place where others can use it (e.g. on a web server). There are a lot of steps involved in just getting the software updated on the web server in between updates to the software. In addition, to the act of updating the software, it would require the developer or another person, to be skilled at setting up web servers, keeping them updated with security patches, etc. Secondly, Gondor, through … -
What is Gondor
“What is Gondor?”, asks a friend of mine who doesn’t know the difference between Django and Rails and probably thinks that Python is a creature found at the zoo’s reptile exhibit. To explain Gondor to someone who isn’t a programmer can be a bit tricky, if not near the impossible. I realize that I carry a lot of presuppositions when explaining Gondor even when trying to be non-technical. To get around that, I think I just need to try my best and explain some of these pre-requisites, if you will, to understanding Gondor and why it delivers so much value. First, Gondor solves a problem called “deployment” in software development circles. This basically means taking software that has been written in one place (e.g. my laptop) and putting it in a place where others can use it (e.g. on a web server). There are a lot of steps involved in just getting the software updated on the web server in between updates to the software. In addition, to the act of updating the software, it would require the developer or another person, to be skilled at setting up web servers, keeping them updated with security patches, etc. Secondly, Gondor, through …