#django

67 bookmarks tagged with #django · RSS Feed · ← All Tags

Django 6.0 released | Weblog | Django

https://www.djangoproject.com/weblog/2025/dec/03/django-60-released/
The Django team is happy to announce the release of Django 6.0. The release notes assembles a mosaic of modern tools and thoughtful design. A few highlights are: Template Partials: modularize templates using small, named fragments for cleaner, more maintainable code. (GSoC project by Farhan Ali Raza, mentored by Carlton Gibson) Background Tasks: run code outside the HTTP request-response cycle with a built-in, flexible task framework. (Jake Howard)

Going build-free with native JavaScript modules | Weblog | Django

https://www.djangoproject.com/weblog/2025/nov/19/going-build-free-with-native-javascript-modules/
Modern CSS supports many of the features natively that the build tools were created for. CSS nesting to organize code, variables, @supports for feature detection. JavaScript ES6 / ES2015 was a big step forward, and the language has been progressing steadily ever since. It now has native module support with the import / export keywords Meanwhile, with HTTP/2 performance improvements, parallel requests can be made over the same connection, removing the constraints of the HTTP/1.x protocol.

Litestar is worth a look

https://www.b-list.org/weblog/2025/aug/06/litestar/
A few years ago at work, I had a project which offered an opportunity to look at the new generation of async-first, type-hint-driven Python web frameworks. For reasons which aren’t particularly relevant today, on that project I ended up choosing Litestar, which is the one that doesn’t have a ravenous all-consuming hype machine surrounding it. And I’m very glad I did, because today I’m more convinced than ever it was the right choice, and for the last 18 months or so every new project I’ve started at my day job has been built with Litestar.

The definitive guide to using Django with SQLite in production | alldjango.com

https://alldjango.com/articles/definitive-guide-to-using-django-sqlite-in-production
Especially for side projects with limited traffic requirements and scaling concerns, the promise of SQLite is that it can remove a lot of ongoing hassles. Without a separate database, cache, or queue, there is less network traffic (because the SQLite file is local), and less servers to manage, maintain, and backup.

Using Travis-CI with Python and Django - David Cramer's Blog

http://justcramer.com/2012/05/03/using-travis-ci/
I’ve been using Travis-CI for a while now. Both my personal projects, and even several of the libraries we maintain at DISQUS rely on it for Continuous Integration. I figured it was about time to confess my undenying love for Travis, and throw up some notes about the defaults we use in our projects.

Django Development Server with HTTPS - xster.net - Never relearn twice

http://tech.xster.net/tips/django-development-server-with-https/
Sometimes you can’t avoid using HTTPS right starting from development (such as for developing Facebook canvas applications). You can setup Apache on your local machine and go through a bunch of trouble setting up your domain and setting up the certificate etc but there’s an easy way of using Django’s python manage.py runserver to work with HTTPS.

Django Development Server with HTTPS - xster.net - Never relearn twice

http://tech.xster.net/tips/django-development-server-with-https
Sometimes you can’t avoid using HTTPS right starting from development (such as for developing Facebook canvas applications). You can setup Apache on your local machine and go through a bunch of trouble setting up your domain and setting up the certificate etc but there’s an easy way of using Django’s python manage.py runserver to work with HTTPS.

Introducing django-lazysignup — Stereoplex

http://www.stereoplex.com/blog/introducing-django-lazysignup
So I started wondering - what if we just created a real user for every person who visited the site? Django already has support for creating users with unusable passwords - so if we just create a user with an unusable password every time a new person comes along, log them in, and then at some future point (presumably once they've fallen in love with your site) they can set themselves up with a real username and password. And as a bonus, all that data that they created while messing about with the site sticks around, and carries over into their 'real' user.

Why Django Sucks, Except When It Doesn’t « Coffee on the Keyboard

http://coffeeonthekeyboard.com/why-django-sucks-except-when-it-doesnt-664/
If you’re prototyping a new project, or if you’re a start-up and need to ship something, or if you’re just one person working on a little app with a few (even a few tens of thousands) of users, odds are that none of those benefits are worth losing the nice stuff Django gives you, or the time it takes to build APIs (even using existing apps to do it) or abstraction layers between the silos.

Why Django Sucks, Except When It Doesn’t « Coffee on the Keyboard

http://coffeeonthekeyboard.com/why-django-sucks-except-when-it-doesnt-664
If you’re prototyping a new project, or if you’re a start-up and need to ship something, or if you’re just one person working on a little app with a few (even a few tens of thousands) of users, odds are that none of those benefits are worth losing the nice stuff Django gives you, or the time it takes to build APIs (even using existing apps to do it) or abstraction layers between the silos.

News Center being remodeled to facilitate employee relocation / LJWorld.com

http://www2.ljworld.com/news/2012/jun/14/news-center-being-remodeled-facilitate-employee-re/
Also, as part of a plan to re-emphasize a digital and local focus, Mediaphormedia, which created the internationally accepted Django Web framework, released 10 employees and will phase out its commercial software operations to serve only the company’s specific internal needs. The change was announced to employees and clients earlier this week.

News Center being remodeled to facilitate employee relocation / LJWorld.com

http://www2.ljworld.com/news/2012/jun/14/news-center-being-remodeled-facilitate-employee-re
Also, as part of a plan to re-emphasize a digital and local focus, Mediaphormedia, which created the internationally accepted Django Web framework, released 10 employees and will phase out its commercial software operations to serve only the company’s specific internal needs. The change was announced to employees and clients earlier this week.

Custom Admin Views and Reversing Django Admin URLs - Ian Lewis

http://www.ianlewis.org/en/reversing-django-admin-urls
The key parts are the get_urls function and the admin_update_feeds view. The get_urls method returns the urls for this admin to which we are adding our custom view. The custom view does the updating of the lifestream feeds and returns the user to the Item model's changelist view. We get the url for that view by calling reverse with the pattern "<namespace>:<app>_<model>_changelist" which in our case is "admin:lifestream_item_changelist" since the django admin uses the admin namespace.

django-webdav - Django webdav implementation. - Google Project Hosting

http://code.google.com/p/django-webdav/
WebDAV implemented as a Django application. The motivation for this project is to allow authentication of users against Django's contrib.auth system, while also exporting different directories per user. Many Django tools and app can be combined with this such as django-digest etc. to provide a powerful WebDAV server.

CookBookNewFormsDynamicFields – Django

https://code.djangoproject.com/wiki/CookBookNewFormsDynamicFields
But what if you're allowing your users to create their own survey questions, so that you don't know ahead of time how many answers you'll need? Luckily, you can add fields to the form as you're constructing it, in addition to specifying them as class attributes. If you have all your survey questions in a list (let's call it questions just to be confusing), you could create a Survey class that looks like this:

Ned Batchelder: Global Django requests

http://nedbatchelder.com/blog/201008/global_django_requests.html
"As my Django sites get larger and larger, there inevitably comes a point where I want access to the current request from deep inside some function that doesn't have the request object. The latest reason was that I wanted a model class helper to have access to the session so it could access some debug flags. "

Django Signals enable Aspect-Oriented programming. by Elf Sternberg

http://www.elfsternberg.com/2010/07/29/lightbulb-django-signals-aspectoriented-programming
"This is exactly the kind of cross-cutting concern (note the use of a signal publisher for notification!) that would be better handled with a signal from the microblogging app. Perhaps the app could have published “tweet received” as a signal, with an optional “module for common associated applications” dispatching that event to logging, activity streams, notifications or whatever as available. The presence of explicit publication would have signaled to any developer to look for subscribers, so I don’t think this is a dangerous case of unlabeled subroutines and the potential for spaghetti code that goes with it. Most Django apps are small silos of code; it would not have been onerous to separate out and isolate this cross-cutting concern from the rest of the microblogging application’s functionality."

SplitSettings - Django - Trac

http://code.djangoproject.com/wiki/SplitSettings
"If you use a source control system (CVS, SVN, ...), or want to publish your application on the web, it may be a good idea to move sensitive or machine/user specific settings like database passwords and such out of the main settings.py file. "

Python Package Index : django-app-plugins 0.1.1

http://pypi.python.org/pypi/django-app-plugins/0.1.1
"A template extension system for marking points in your django templates as 'plugin-points', and providing plugins which inject themselves at those points. Multiple applications can be injected at each plugin point, and 'registered' plugin-points can have the visibility, order and access of the plugins controlled via DB models. This control can be done on a site wide or per-user basis. Thus you can allow users to add, remove, and reorder the plugins on their profile page for instance."

Django Software Stack : Sourcefabric

http://www.sourcefabric.org/en/home/blog/139/Django-Software-Stack.htm?tpl=355
"Here at Sourcefabric we have been looking in to what software stack to use for our next web products. This discussion used to be (oh, 5-10 years ago) a lot simpler, mainly involving choosing an operating systems, a language, and a database. But now it’s about higher-level things like out-of-the-box support for commenting, activity streams, ajax, cloud storage, deployment tools, scalability, geolocation, tagging, RESTful interfaces, search, twitter, facebook, and a whole lot more. Users and customers are starting to expect all of this built into any web application you build. Building applications these days is largely about integrating a large number of existing technologies instead of building something from scratch."

Making development with Django more fun with BDD under Freshen | Francisco Souza

http://www.franciscosouza.net/2010/06/making-development-with-django-more-fun.html
"Freshen is an acceptance testing framework for Python, inspired by Cucumber and has the same goal: make BDD fun, but using Python instead of Ruby. Freshen uses the same syntax of Cucumber (Gherkin Syntax) and runs as a plugin of Nose, a powerful Python tool for using daily when you with TDD"

Django tip: Caching and two-phased template rendering | Holovaty.com

http://www.holovaty.com/writing/django-two-phased-rendering
"It's a clever solution because you end up defining what doesn't get cached instead of what does get cached. It's a sideways way of looking at the problem -- sort of like how Django's template inheritance system defines which parts of the page change instead of defining server-side includes of the common bits."

Redo The Web » Designing a CMS Architecture

http://redotheweb.com/2008/09/19/designing-a-cms-architecture
"Start changing one single line of code in an application build on top of Drupal or ezPublish, to name only the two major ones, and you are in trouble. The moment you need something that is not natively supported, you enter the Dark Zone of CMS hell. You are going to spend a lot of money on development. You will never see the end of the tunnel. That is, until someone says, a few years from now, “Do we need all that crap? Let’s build something that fits our needs and that actually works”.Given number of available open-source CMS solutions, building one on your own sounds like a stupid idea. But if your website is 50% content management and 50% something else, you probably need to start with a web application framework like symfony or Django, rather than a CMS. These frameworks provide plugins that do part of the Content Management job already, so creating a CMS today is like assembling Lego bricks to build something that exactly fits your needs."

about:cmlenz - Logic in Templates

http://www.cmlenz.net/blog/2007/06/logic-in-templa.html
"In my humble opinion, this kind of “dumbed-down” templating results in only one thing: more lines of code in the application modules, lines of code that are really only about presentation, and should be in the templates."