background preloader


Facebook Twitter

Finally, Real-Time Django Is Here: Get Started with Django Channels. Today, we're thrilled to host Jacob Kaplan-Moss.

Finally, Real-Time Django Is Here: Get Started with Django Channels

Jacob's a former Herokai and long-time core contributor to Django, and he's here to share an in-depth look at something that he believes will define the future of the framework. When Django was created, over ten years ago, the web was a less complicated place. The majority of web pages were static. Database-backed, Model/View/Controller-style web apps were the new spiffy thing.

Ajax was barely starting to be used, and only in narrow contexts. The web circa 2016 is significantly more powerful. Django Girls Tutorial. Setting up Django with Nginx, Gunicorn, virtualenv, supervisor and PostgreSQL - Michał Karzyński. Django is an efficient, versatile and dynamically evolving web application development framework.

Setting up Django with Nginx, Gunicorn, virtualenv, supervisor and PostgreSQL - Michał Karzyński

When Django initially gained popularity, the recommended setup for running Django applications was based around Apache with mod_wsgi. The art of running Django advanced and these days the recommended configuration is more efficient and resilient, but also more complex and includes such tools as: Nginx, Gunicorn, virtualenv, supervisord and PostgreSQL. In this text I will explain how to combine all of these components into a Django server running on Linux. Prerequisites I assume you have a server available on which you have root privileges.

If you don’t have a server to play with, I would recommend the inexpensive VPS servers offered by Digital Ocean. I’m also assuming you configured your DNS to point a domain at the server’s IP. Update your system Let’s get started by making sure our system is up to date. $ sudo aptitude update $ sudo aptitude upgrade PostgreSQL Application user Gunicorn Nginx. Django 1.9 получит новый дизайн админки / Хабрахабр. Всем привет Вероятно многие из нас сдавая очередной Django-проект ловили себя на мысли о том, что интерфейс администратора выглядит, мягко говоря, непрезентабельно и несовременно.

Django 1.9 получит новый дизайн админки / Хабрахабр

Однажды мне стало стыдно отдавать хороший Django-проект хорошему заказчику именно по причине убогости админки, и я решил обновить ее внешний вид, вдохновившись обновленным сайтом Django. Настройка веб-сервера для Django с nginx и uWSGI - Веб-разработка и Администрирование. Assign object permissions — django-guardian 1.2.0 documentation. Assigning object permissions should be very simple once permissions are created for models.

Assign object permissions — django-guardian 1.2.0 documentation

Prepare permissions¶ Let’s assume we have following model: class Task(models.Model): summary = models.CharField(max_length=32) content = models.TextField() reported_by = models.ForeignKey(User) created_at = models.DateTimeField(auto_now_add=True) ... and we want to be able to set custom permission view_task. We let Django know to do so by adding permissions tuple to Meta class and our final model could look like:

Django-Guardian: A Full Access Control Logic (ACL) Example. This image has absolutely nothing to do with django except that the word guardian reminds of an angel and angels remind me of my old magic the gathering days.

Django-Guardian: A Full Access Control Logic (ACL) Example

Миграции — Документация Django 1.7. Starting a Django Project the Right Way. Check out the new, updated version of this post with Django 1.6 specific changes and updates.

Starting a Django Project the Right Way

One of the things I wish I had known when starting my Django project for IllestRhyme was "How do I start a real Django project". As in, one that's actually going to be used and developed more, not the toy project from the (admittedly excellent) Django documentation. Having just gone through this process again for my new site, I wanted to share the knowledge I've gained about how to properly start a project in Django.

By the end of this post, you will have 1. None of these steps, except for perhaps the first, are covered in the official tutorial. A working knowledge of Python is assumed. Preparing To Install I'm assuming you have Python installed. So, what's the first step? After installing virtualenv in whatever way you want, create a new virtualenv, which we'll call 'env', using the following: or, if virtualenv isn't in your $PATH (though it should be): Ui/django-rq · GitHub. Django: Highlighting in HTML using Pygments and Beautiful Soup – Stefan Scherfke. Two months ago I wrote about Django, Pygments and Beautiful Soup.

Django: Highlighting in HTML using Pygments and Beautiful Soup – Stefan Scherfke

A few days after the post I switched from HTML markup to reStructuredText and thus didn’t need my filter anymore and forgot to post more about it. Today I received a comment asking me to publish the source code of the template filter—so here it is: Copy the code into a file called templatetags/ within a new or an existing Django app. highlight() searches the passed HTML code for <pre>-tags with a class denoting the lexer to be used, e.g. <p><em>Hello World! Furthermore you might want to create a CSS file containing all the style definitions in your static media directory. Django Packages : Django Packages reusable apps, sites and tools directory. Model with recursive self relation in Django's admin.