Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Haystack & Tastypie Orgs
Haystack & Tastypie Orgs -
How to Find the Performance Bottlenecks in Your Django Views?
Once you have your Django projects running, you come to situations, when you need to optimize for performance. The rule of thumb is to find the bottlenecks and then to take action to eliminate them by more idiomatic Python code, database denormalization, caching, or other techniques. What is a bottleneck? Literally it refers to the top narrow part of a bottle. In engineering, bottleneck is a case where the performance or capacity of an entire system is limited by a single or small number of components or resources. How to find these parts of your code? The most trivial way is to check the current time before specific code execution and after that code execution, and then count the time difference: from datetime import datetimestart = datetime.now()# heavy execution ...end = datetime.now()d = end - start # datetime.timedelta objectprint d.total_seconds() # prints something like 7.861985 However, measuring code performance for Django projects like this is inefficient, because you need a lot of such wrappers for your code until you find which part is the most critical. Also you need a lot of manual computation to find the critical parts. Recently I found line_profiler module that can inspect the performance of … -
Account Control part 1
This is the first in a series of videos on creating a site which utilizes other services to help your users stay informed. We start the series with getting our users setup with an account, and giving them the ability to log in and out.Watch Now... -
Astro Code School Tapped to Teach App Development at UNC Journalism School
Our own Caleb Smith, Astro Code School lead instructor, is teaching this semester at UNC’s School of Journalism, one of the nation’s leading journalism schools. He’s sharing his enthusiasm for Django application development with undergraduate and graduate media students in a 500-level course, Advanced Interactive Development. For additional details about the course and why UNC School of Journalism selected Caktus and Astro Code School, please see our press release. -
Astro Code School Tapped to Teach App Development at UNC Journalism School
Our own Caleb Smith, Astro Code School lead instructor, is teaching this semester at UNC’s School of Journalism, one of the nation’s leading journalism schools. He’s sharing his enthusiasm for Django application development with undergraduate and graduate media students in a 500-level course, Advanced Interactive Development. For additional details about the course and why UNC School of Journalism selected Caktus and Astro Code School, please see our press release. -
Solinea is looking for a Senior Backend Engineer (Python, Django, Elasticsearch)
This is my second week at Solinea, and I’m loving it! A position just opened up on our development team for a backend developer, and I wanted to share the love. :-) The company supports remote employees. Its headquarters is in Berkeley, CA, and I’m in Seattle, and I feel more connected now than, well, I did at some other companies I’ve worked for. If you’re in Seattle, I’d be happy to meet for coffee to talk at length about the job. To apply for this job, you can contact me at john@seeknuance.com, or click the “Apply for this position” button at the bottom of the job’s Recruiterbox page. Senior Backend Engineer (Python, Django, Elasticsearch) Location Berkeley, CA, US, or remote This position is only open to candidates based in and eligible to work in the United States. Responsibilities As a backend developer at Solinea, you will be primarily working on our flagship product from the API back, as well as committing to the OpenStack codebase. You will work in a sprint-based agile development team, and will participate in the full cycle including release/sprint planning, feature design, story definition, daily standups, development, testing, code review, and release packaging. You will … -
Reading/writing 3D STL files with numpy-stl
As a followup of my earlier article about reading and writing STL files with Numpy, I’ve created a library that can be used easily to read, modify and write STL files in both binary and ascii format. The library automatically detects whether your file is in ascii or binary STL format and is very fast due to all operations being done by numpy. First, install using pip or easy_install: pip install numpy-stl # Or if you don't have pip available easy_install numpy-stl Note that numpy numpy and python-utils version 1.6 or greater are required. While these should both be installed automatically by pip/easy_install, for numpy it’s generally recommended to download a binary release so it installs a bit faster. Example usage: https://github.com/WoLpH/numpy-stl from stl import stl mesh = stl.StlMesh('some_file.stl') # The mesh normals (calculated automatically) mesh.normals # The mesh vectors mesh.v0, mesh.v1, mesh.v2 # Accessing individual points (concatenation of v0, v1 and v2 in triplets) mesh.points[0] == mesh.v0[0] mesh.points[1] == mesh.v1[0] mesh.points[2] == mesh.v2[0] mesh.points[3] == mesh.v0[1] mesh.save('new_stl_file.stl') Documentation can be found here: http://numpy-stl.readthedocs.org/en/latest/ Please let me know if you have any problems using it or just to tell me that you like the project Link to this post! -
Django Logging Configuration: How the Default Settings Interfere with Yours
My colleague Vinod recently found the answer on Stack Overflow to something that's been bugging me for a long time - why do my Django logging configurations so often not do what I think they should? Short answer If you want your logging configuration to behave sensibly, set LOGGING_CONFIG to None in your Django settings, and do the logging configuration from scratch using the Python APIs: LOGGING_CONFIG = None LOGGING = {...} # whatever you want import logging.config logging.config.dictConfig(LOGGING) Explanation The kernel of the explanation is in this Stack Overflow answer by jcotton; kudoes to jcotton for the answer: before processing your settings, Django establishes a default configuration for Python's logging system, but you can't override it the way you would think, because disable_existing_loggers doesn't work quite the way the Django documentation implies. The Django documentation for disable_existing_loggers in 1.6, 1.7, and dev (as of January 8, 2015) says "If the disable_existing_loggers key in the LOGGING dictConfig is set to True (which is the default) the default configuration is completely overridden." (emphasis added) That made me think that I could set disable_existing_loggers to True (or leave it out) and Django's previously established default configuration would have no effect. Unfortunately, that's … -
Django Logging Configuration: How the Default Settings Interfere with Yours
My colleague Vinod recently found the answer on Stack Overflow to something that's been bugging me for a long time - why do my Django logging configurations so often not do what I think they should? Short answer If you want your logging configuration to behave sensibly, set LOGGING_CONFIG to None in your Django settings, and do the logging configuration from scratch using the Python APIs: LOGGING_CONFIG = None LOGGING = {...} # whatever you want import logging.config logging.config.dictConfig(LOGGING) Explanation The kernel of the explanation is in this Stack Overflow answer by jcotton; kudos to jcotton for the answer: before processing your settings, Django establishes a default configuration for Python's logging system, but you can't override it the way you would think, because disable_existing_loggers doesn't work quite the way the Django documentation implies. The Django documentation for disable_existing_loggers in 1.6, 1.7, and dev (as of January 8, 2015) says "If the disable_existing_loggers key in the LOGGING dictConfig is set to True (which is the default) the default configuration is completely overridden." (emphasis added) That made me think that I could set disable_existing_loggers to True (or leave it out) and Django's previously established default configuration would have no effect. Unfortunately, that's … -
We’re launching a Django code school: Astro Code School
One of the best ways to grow the Django community is to have more high-quality Django developers. The good news is that we’ve seen sharply increasing demand for Django web applications. The challenge that we and many other firms face is that there’s much higher demand than there is supply: there aren’t enough high-quality Django developers. We’ve talked about this issue intensely internally and with our friends while at DjangoCon and PyCon. We decided that we can offer at least one solution: a new Django-focused code school. We’re pleased to announce the launch of Astro Code School in Spring 2015. Astro will be the first Django code school on the East Coast. Programs include private trainings and weekend, 3-week, and 12-week full-time courses. In addition to Django, students will learn Python (of course), HTML, CSS, and JavaScript. They will come away being able to build web applications. The shorter programs will be geared towards beginners. The longer program will are for those with previous programming experience. Astro will also provide on-site, private corporate training, another area we frequently get asked about. Astro will be a separate company under Caktus. To support Astro, we welcome Brian Russell, the new director of … -
We’re Launching a Django code school: Astro Code School
One of the best ways to grow the Django community is to have more high-quality Django developers. The good news is that we’ve seen sharply increasing demand for Django web applications. The challenge that we and many other firms face is that there’s much higher demand than there is supply: there aren’t enough high-quality Django developers. We’ve talked about this issue intensely internally and with our friends while at DjangoCon and PyCon. We decided that we can offer at least one solution: a new Django-focused code school. We’re pleased to announce the launch of Astro Code School in Spring 2015. Astro will be the first Django code school on the East Coast. Programs include private trainings and weekend, 3-week, and 12-week full-time courses. In addition to Django, students will learn Python (of course), HTML, CSS, and JavaScript. They will come away being able to build web applications. The shorter programs will be geared towards beginners. The longer program will are for those with previous programming experience. Astro will also provide on-site, private corporate training, another area we frequently get asked about. Astro will be a separate company under Caktus. To support Astro, we welcome Brian Russell, the new director of … -
Why I Love Technical Blogging
I love writing blog posts, and today I’m setting out to do something I’ve never tried before: write a blog post about writing blog posts. A big part of our mission at Caktus is to foster and help grow the Python and Django development communities, both locally and nationally. Part of how we’ve tried to accomplish this in the past is through hosting development sprints, sponsoring and attending conferences such as PyCon and DjangoCon, and building a knowledge base of common problems in Python and Django development in our blog. Many in the Django community first get to know Caktus through our blog, and it’s both gratifying and humbling when I meet someone at a conference and the person thanks me for a post Caktus wrote that helped him or her solve a technical problem at some point in the past. While I personally don’t do as much software development as I used to and hence no longer write as many technical posts, the Caktus blog and many others in the community continue as a constant source of inspiration and education to me. As software developers we are constantly trying to work ourselves out of a job, building tools that … -
Why I Love Technical Blogging
I love writing blog posts, and today I’m setting out to do something I’ve never tried before: write a blog post about writing blog posts. A big part of our mission at Caktus is to foster and help grow the Python and Django development communities, both locally and nationally. Part of how we’ve tried to accomplish this in the past is through hosting development sprints, sponsoring and attending conferences such as PyCon and DjangoCon, and building a knowledge base of common problems in Python and Django development in our blog. Many in the Django community first get to know Caktus through our blog, and it’s both gratifying and humbling when I meet someone at a conference and the person thanks me for a post Caktus wrote that helped him or her solve a technical problem at some point in the past. While I personally don’t do as much software development as I used to and hence no longer write as many technical posts, the Caktus blog and many others in the community continue as a constant source of inspiration and education to me. As software developers we are constantly trying to work ourselves out of a job, building tools that … -
Why you should donate to the Django fellowship program
Disclaimer: I do not represent the Django Software Foundation in any way, nor has anything below been endorsed by the DSF. The following opinions are my own, unsolicited rambling. If you hadn’t been looking for it specifically, you may have missed it. The Django Softare Foundation is running a fundraising effort for the new Django Fellowship program. It sounds like they’re still trying to figure out how to get the word out, so I wanted to do what I could to tell you why you should chip in. This particular blog post is going to focus on encouraging (peer-pressuring) commercial Django users in particular, though enthusiasts are welcome to read along! Humble beginnings Django is free and open source. Just provide the expertise and the infrastructure and you can build just about whatever web powered contraption you’d like. So you end up doing just that. Your first stop is the Django tutorial, written and maintained by a community of volunteers (just like the rest framework itself). You stumble along, slowly at first. Perhaps you find yourself frustrated at times, or maybe things move along at a faster pace. In no time, you’ve got "Hello World!" rendering, and here comes a business idea! One hundred lines of … -
Caktus is looking for a Web Design Director
Over the last two years Caktus’ design portfolio has rapidly been growing. We’ve taken on new projects primarily focused on design and have received community recognition for those efforts. We are happy to have grown our design capabilities to match the level of quality we demand from our Django developers. We have found it’s important to have strength on both sides of the table as each side challenges the other and forces the final product of our process to be as high quality as possible. In an effort to continue to push ourselves and expand our web design skill sets, Caktus is looking to hire a new Web Design Director. We’re searching for someone who can do a bit of wireframing and user experience and then has the tools necessary to design and code pages. We’re looking for someone who is attune to both form and function and knows where to focus depending on clients’ needs. Caktus is committed to doing good in our development communities as well as through the projects that we choose to work on, so we are also interested in finding someone who is engaged in the design community. If you or someone you know would … -
Caktus is looking for a Web Design Director
Over the last two years Caktus’ design portfolio has rapidly been growing. We’ve taken on new projects primarily focused on design and have received community recognition for those efforts. We are happy to have grown our design capabilities to match the level of quality we demand from our Django developers. We have found it’s important to have strength on both sides of the table as each side challenges the other and forces the final product of our process to be as high quality as possible. In an effort to continue to push ourselves and expand our web design skill sets, Caktus is looking to hire a new Web Design Director. We’re searching for someone who can do a bit of wireframing and user experience and then has the tools necessary to design and code pages. We’re looking for someone who is attune to both form and function and knows where to focus depending on clients’ needs. Caktus is committed to doing good in our development communities as well as through the projects that we choose to work on, so we are also interested in finding someone who is engaged in the design community. If you or someone you know would … -
Introducing High Performance Django Expert Sessions
With the launch of our book, High Performance Django, we’ve received a number of inquiries from people asking for advice, for which the answers are too specific to their application to give good general advice, and too short to sign a consulting engagement. Rather than decline to help, we now offer Expert Sessions - a one-hour online consultation with a member (or members) of the Lincoln Loop team. Schedule an Expert Session and we'll meet up with you via Google Hangouts, Skype, or phone to answer any questions or provide expertise on building and scaling your complex Django application. In the past, we've answered such questions as: What technologies should we use for building a complex, high-performance application? Our app is super complex and it takes us 3 days to onboard a new developer. How can we simplify things to speed up onboarding? Should we move our infrastructure to Amazon Web Services or Heroku? What are the benefits and how do we perform the correct analysis? How can we make our deploys more reliable? How do we move from our legacy system to Django in order to improve reliability and cut costs? Should we use MongoDB or Redis? How do … -
Webinar: Testing Client-Side Applications with Django
Technical Director Mark Lavin will be hosting a free O’Reilly webinar today at 4PM EST or 1PM PT on Testing Client-Side Applications with Django. Mark says testing is one of the most popular question topics he receives. It’s also a topic near and dear to Caktus’ quality-loving heart. Mark’s last webinar garnered more than 500 viewers, so sign up quick! Here’s a description from Mark: During the session we'll examine a simple REST API with Django connected to a single page application built with Backbone. We'll look at some of the tools available to test the application with both Javascript unit tests and integration tests written in Python. We'll also look at how to organize them in a sane way for your project workflow. To sign up, visit the webinar page on O’Reilly’s site. -
Webinar: Testing Client-Side Applications with Django
Technical Director Mark Lavin will be hosting a free O’Reilly webinar today at 4PM EST or 1PM PT on Testing Client-Side Applications with Django. Mark says testing is one of the most popular question topics he receives. It’s also a topic near and dear to Caktus’ quality-loving heart. Mark’s last webinar garnered more than 500 viewers, so sign up quick! Here’s a description from Mark: During the session we'll examine a simple REST API with Django connected to a single page application built with Backbone. We'll look at some of the tools available to test the application with both Javascript unit tests and integration tests written in Python. We'll also look at how to organize them in a sane way for your project workflow. To sign up, visit the webinar page on O’Reilly’s site. -
Self-Hosted Server Status Page with Uptime Robot, S3, and Upscuits
For quite a while I've had a public "Status" page online for WhisperGifts via Pingdom. It basically just shows uptime over the past few days, but given my site is relatively low-volume and not ovely critical to my customers, the $10/month for Pingdom was actually one of my largest expenses after hosting. So, I started looking for an alternative. Today I re-deployed the WhisperGifts Status Page using a combination of Uptime Robot, Upscuits and Amazon S3. In short, I have Uptime Robot checking the uptime of my site (including it's subsites, such as the admin and user pages). The statistics are gathered and presented by Upscuits, which is entirely client-side JavaScript hosted on S3. My basic todo list for next time: Sign up for Uptime Robot. I'd been using them for ages on their Free plan as a backup to Pingdom; this gives 5-minute checks. Their paid plan gives 1-minute resolution. Add your sites, make sure they're being monitored correct. On the Uptime Robot dashboard, click My Settings. Open the section labelled Monitor-Specific API Keys and search for your Monitor. Copy the API key to a text file for later; repeat this step for subsequent monitors you want to include … -
Self-Hosted Server Status Page with Uptime Robot, S3, and Upscuits
For quite a while I've had a public "Status" page online for WhisperGifts via Pingdom. It basically just shows uptime over the past few days, but given my site is relatively low-volume and not ovely critical to my customers, the $10/month for Pingdom was actually one of my largest expenses after hosting. So, I started looking for an alternative. Today I re-deployed the WhisperGifts Status Page using a combination of Uptime Robot, Upscuits and Amazon S3. In short, I have Uptime Robot checking the uptime of my site (including it's subsites, such as the admin and user pages). The statistics are gathered and presented by Upscuits, which is entirely client-side JavaScript hosted on S3. My basic todo list for next time: Sign up for Uptime Robot. I'd been using them for ages on their Free plan as a backup to Pingdom; this gives 5-minute checks. Their paid plan gives 1-minute resolution. Add your sites, make sure they're being monitored correct. On the Uptime Robot dashboard, click My Settings. Open the section labelled Monitor-Specific API Keys and search for your Monitor. Copy the API key to a text file for later; repeat this step for subsequent monitors you want to include … -
Self-Hosted Server Status Page with Uptime Robot, S3, and Upscuits
For quite a while I've had a public "Status" page online for WhisperGifts via Pingdom. It basically just shows uptime over the past few days, but given my site is relatively low-volume and not ovely critical to my customers, the $10/month for Pingdom was actually one of my largest expenses after hosting. So, I started looking for an alternative. Today I re-deployed the WhisperGifts Status Page using a combination of Uptime Robot, Upscuits and Amazon S3. In short, I have Uptime Robot checking the uptime of my site (including it's subsites, such as the admin and user pages). The statistics are gathered and presented by Upscuits, which is entirely client-side JavaScript hosted on S3. My basic todo list for next time: Sign up for Uptime Robot. I'd been using them for ages on their Free plan as a backup to Pingdom; this gives 5-minute checks. Their paid plan gives 1-minute resolution. Add your sites, make sure they're being monitored correct. On the Uptime Robot dashboard, click My Settings. Open the section labelled Monitor-Specific API Keys and search for your Monitor. Copy the API key to a text file for later; repeat this step for subsequent monitors you want to include … -
Self-Hosted Server Status Page with Uptime Robot, S3, and Upscuits
For quite a while I've had a public "Status" page online for WhisperGifts via Pingdom. It basically just shows uptime over the past few days, but given my site is relatively low-volume and not ovely critical to my customers, the $10/month for Pingdom was actually one of my largest … -
Building Django proxies and MUD libraries
2015 is here and there is a lot of activity going on in Evennia's repository, mailing list and IRC channel right now, with plenty of people asking questions and starting to use the system to build online games.We get newcomers of all kinds, from experienced coders wanting to migrate from other code bases to newbies who are well versed in mudding but who aim to use Evennia for learning Python. At the moment the types of games planned or under development seems rather evenly distributed between RPI-style MUDs and MUSH games (maybe with a little dominance of MUSH) but there are also a couple of hack-and-slash concepts thrown into the mix. We also get some really wild concepts pitched to us now and then. What final games actually comes of it, who can tell, but people are certainly getting their MU*-creative urges scratched in greater numbers, which is a good sign. Since Christmas our "devel" branch is visible online and is teeming with activity. So I thought I'd post an summary about it in this blog. The more detailed technical details for active developers can be found on Evennia's mailing list here (note that full docs are not yet written … -
Mirroring my article on Chennai 36 – The Alumni Blog of IITM
Recently, I wrote an article to Chennai36 which is a blog maintained by the Alumni Association of IITM. The article was about my opinions on how to apply to graduate school for an undergrad at IITM. In this post, I am mirroring that article on this blog. The original article can be found here. ——————————————————————————————————————————————————— The Grad Guru : Karthik Abinav at University of Maryland, College Park Note : Whenever I mean grad school, I am going to be referring to a PhD program. Though most of this advice also applies to MS programs, you should bear in mind that my focus is on PhD program. Since, I do not have much knowledge about the MS programs, I will not comment much about them in this article. 1. Please tell us about yourself, the university you are studying at, the research field you are working on, and the scope it has to offer after an MS or PhD. Also tell us about a typical day in the life of a postgraduate student. I recently started my PhD in Computer Science at University of Maryland at College Park. I am broadly interested in theoretical computer science. At a high level, …