Django community: RSS
This page, updated regularly, aggregates Community blog posts from the Django community.
-
Recap of DjangoConEurope 2017
"DjangoCon, why is everybody wearing this t-shirt?" wondered the security guys in the airport of Florence, Italy, in the beginning of April. The reason for that was DjangoCon Europe 2017 happening there for a week, full of interesting talks in an exciting location. What I liked, was that the conference was not only about technical novelties in Django world, but also about human issues that programmers deal with in everyday life. Interesting Non-tech Topics According to a manifest, the conference had a goal to strengthen the Django community and to shape responsible attitude towards the works done with Django. Healthy and Successful Community We have to build stronger communities including everyone who wants to participate without discrimination. Although, at first, it might be difficult as people have biases, i.e. prejudices for or against one person or group; by being emphatic we can accept and include everyone no matter what is their gender identity or expression, sexual orientation, ethnicity, race, neurodiversity, age, religion, disabilities, geographical location, food diversities, body size, or family status. Valuing diversity and individual differences is the key for a healthy, positive and successful community, that empowers its members and helps them grow stronger and happier. Responsibility for … -
DjangoCon 2017
I love DjangoCon. I've been going to it almost every year since I arrived in Europe back in 2010. Sure, a considerable portion of my career has been based on Django, but it's more than that: the community is stuffed full of amazing people who genuinely want us all to succeed and that just makes the conference all the more exciting. This year we all converged on Florence for three days of talks in a historic old theatre at the heart of the city and like every year, the talks at this single-track event were hit-and-miss -- but that's ok! When the talks were less-than-useful we could always just pop out for gelato or catch up in the hallways with other developers. The Good Community From talks covering gender bias or autism, to the re-labelling of all bathrooms to be unisex, DjangoCon has long been a shining example of how to be inclusive in a software development community and it's something I'm proud to be a part of. This year, they even raised enough money to pay for flights and accommodation for a number of people from Zimbabwe who are trying to grow a local Django community. It feels good … -
DjangoCon 2017
I love DjangoCon. I've been going to it almost every year since I arrived in Europe back in 2010. Sure, a considerable portion of my career has been based on Django, but it's more than that: the community is stuffed full of amazing people who genuinely want us all to succeed and that just makes the conference all the more exciting. This year we all converged on Florence for three days of talks in a historic old theatre at the heart of the city and like every year, the talks at this single-track event were hit-and-miss -- but that's ok! When the talks were less-than-useful we could always just pop out for gelato or catch up in the hallways with other developers. The Good Community From talks covering gender bias or autism, to the re-labelling of all bathrooms to be unisex, DjangoCon has long been a shining example of how to be inclusive in a software development community and it's something I'm proud to be a part of. This year, they even raised enough money to pay for flights and accommodation for a number of people from Zimbabwe who are trying to grow a local Django community. It feels good … -
Using ProtoBuf for Huge Object Serialization
We at Distillery faced a problem that the size of Memcached objects is huge. We’ve come close to exceeding the Memcached server storage limit which can trigger eviction of objects, putting more load on the databases. The purpose of this investigation is to find a way to reduce the size of Memcached objects which will lead to less traffic from IIS to Memcached servers. The post Using ProtoBuf for Huge Object Serialization appeared first on Distillery. -
Python 3
Helping my company migrate everything to Python 3. Righteous! And we’ll update everything else, including Django, when we do it. If only an updated Python Essential Reference was available… I’d buy it for every developer. I can’t hassle David anymore since I left Twitter. ‘Tis a shame. I could send him email and text messages, but it wouldn’t be the same. Tagged: Django, Python, social networking -
How many Django developers deal with small sites?
I read blogs, I listen to podcasts, I look at conference talks, all about deployment, and the impression I’m getting is that everyone’s problem is how to serve one billion requests per nanosecond. What the heck, am I the only one who makes small sites? I suspected that the people who blog are usually the ones who achieve more impressive feats, and therefore that the blogs aren’t representative of the developer population. So I made a web survey and asked people whether their deployments serve more or less than ten requests per second on the busiest second of the day. I chose ten because usually you can easily serve ten requests per second from a single virtual server; but still, if you reach ten, you will start thinking at least about the possibility of needing to scale. Detailed results from 59 submissions of the web survey. One of the questions concerned the professional experience of the person, so I have categorized results by more than three years, fewer than three years, and having worked only on unpaid projects. A web survey is not, however, representative of the population; the sample consists only of people who chose to respond to the … -
Deploy your Django/Python app to PyPi
Learn how to deploy an app to ... -
Angular Setup Guide
This is a step-by-step setup g... -
A decent Elasticsearch search engine implementation
The title is a bit of an understatement because I think it's pretty good. It's not perfect and it's not guaranteed to scale, but it works pretty well. Especially on search term typos. This, my own blog, now has a search engine built with Elasticsearch using the Python library elasticsearch-dsl. The algorithm (if you can call it that) is my own afternoon hack invention. Before I explain how it works try out a couple of searches: Try a couple of searches: (each search appends &debug-search for extended output) corn - finds Cornwall, cron, Crontabber, crontab, corp etc. crown - finds crown, Crowne, crowded, crowds, crowd etc. react - finds create-react-app, React app, etc. jugg - finds Jung, juggling, judging, judged etc. pythn - finds Python, python2.4, python2.5 etc. Also, by default it uses Elasticsearch's match_phrase so when you search for a multi-word thing, it requires a match on each term. E.g. date format which finds Date formatting, date formats etc. But if you search for something where the whole phrase can't match, it splits up the search an uses a match operator instead (minus any stop words). Typo-focussed This solution is very much focussed on typos. One thing I really … -
Angular 4 Setup Guide
# This guide is still being de... -
Testing django mixins
You may read all these books and tutorials that tell you - test your code! This blog post is to help you test your django mixins. Table of Contents: Why is it worth to test mixins? How to test mixins? Why is it worth to test mixins? You come to django world and you discover mixins - at the beginning, you think it awesome! Let write more of those! So you write this self-contained mixin - right now there is a time to test it. It can assure that your piece of code works as expected and can save you a lot of trouble. Ok, you are ready to write some test. How to do it? How to test mixins? Imagine that you have this simple TemplateView with mixin: from django.views.generic import TemplateView class SomethingMixin(object): def get_context_data(self, **kwargs): context = super(SomethingMixin, self).get_context_data(**kwargs) context['has_something'] = True return context class ExampleTemplateView(SomethingMixin, TemplateView): template_name = 'example.html' SomethingMixin is adding a new key to the context. Let's write some tests: from django.test import SimpleTestCase from django.views.generic import TemplateView from .views import SomethingMixin class SomethingMixinTest(SimpleTestCase): class DummyView(SomethingMixin, TemplateView): pass def test_something_mixin(self): dummy_view = self.DummyView() context = dummy_view.get_context_data() self.assertTrue(context['has_something']) I created a simple empty DummyView to … -
Testing django mixins
You may read all these books and tutorials that tell you - test your code! This blog post is to help you test your django mixins. Table of Contents: Why is it worth to test mixins? How to test mixins? Why is it worth to test mixins? You come to django … -
PyCon IT 2017 “Otto”
PyCon Italia is the national conference where professionals, researchers and enthusiasts of the most beautiful programming language gather together. -
Django 1.11 goes live
This version has been designated as a long-term support (LTS) release, which means that security and data loss fixes will be applied for at least the next three years. What’s new: The new django.db.models.indexes module contains classes which ease creating database indexes This feature allows creating composite and custom indexes for databases. Custom indexes provide better optimization for databases queries and can speed up the response time from databases. Template-based widget rendering to ease customizing form widgets This feature should have been implemented long time ago. It was an absolute pain to customize the output of the forms. Although at the moment we are simply using API, and this feature seems unnecessary, it still very nice improvement that will facilitate customization of the standard forms. At least we can expect this in django admin. Subquery expressions to create explicit subqueries using the ORM That’s rather interesting because Django 1.8 introduced conditional expressions for Django ORM. Subquery expressions expand the ORM capabilities. As a result, you can create even more complex things without raw SQL queries. You can find official release notes here https://docs.djangoproject.com/en/1.11/releases/1.11/ Previous versions With the release of Django 1.11, Django 1.10 has reached the end of mainstream support. … -
Django 1.11 Release Notes a Reading
Django 1.11 is released for the world to use. It comes with a lot of changes, which can take some time to read. In my last video I mentioned I would read these release notes if there was interest so here you go. I have read all of the release notes so you can just put on some headphones and hit play. Django 1.11 Release Notes a Reading -
Digging Into Django QuerySets
Digging Into Django QuerySets Object-relational mappers (or ORMs for short), such as the one that comes built-in with Django, make it easy for even new developers to become productive without needing to have a large body of knowledge about how to make use of relational databases. They abstract away the details of database access, replacing tables with declarative model classes and queries with chains of method calls. Since this is all done in standard Python developers can build on top of it further, adding instance methods to a model to wrap reusable pieces of logic. However, the abstraction provided by ORMs is not perfect. There are pitfalls lurking for unwary developers, such as the N + 1 problem. On the bright side, it is not difficult to explore and gain a better understanding of Django's ORM. Taking the time and effort to do so will help you become a better Django developer. -
Introduction to Django's Class based views - Understanding how a class based view works
Django has MVT architecture. A view in django is just a callable that takes a request and returns a response. But this can be more than just a function, that contains the actual business logic of an URL. In addition to normal funcation based views Django provides of some classes which can be used as views. These allow you to structure your views and reuse code by inheriting them. In the current blog post let us see how a Class Based view work. Using this explanation we can easily override any function of built in generic class based views. For this we’ll see a basic view. In views.py from django.http import HttpResponse from django.views.generic import View class TestView(View): def get(self, request, *args, **kwargs): return HttpResponse('Hello, World!') In urls.py from django.conf.urls import url from testapp.views import TestView urlpatterns = [ url(r'^hello-world/$', TestView.as_view(), name='hello_world'), ] When we type the url in the browser ‘http://locahost:8000/hello-world/’, it would be dispatched to the corresponding view to its as_view() function. The as_view() function will call the dispatch() function. dispatch(): This function validates if the request method i.e GET or POST or any other is in allowed methods of the … -
Building Real time web apps with Django channels
Django is a fully featured web framework for building web applications using the general purpose Python language . Django creators call it the pragmatic framework for perfectionists with deadlines which is really true .If you have already used Django for building web apps for clients then you already know how Django makes it dead easy to build a web application from the initial prototype to the final product .But Django was created ten years ago for satisfying the requirements for that era .Back then the web wasn't as modern and complex as today since the great portion of web apps were a bunch of static pages rendered on the server after fetching and formatting some data from a database .Developers used the popular MVC (Model View Controller ) design pattern to structure their code .Now it is 2017 ,the web has dramatically changed the web is seeing or has already seen the rise of the real time apps with a lot of interactions .Users don't have to refresh the page each time to see the updates .Apps can send real time notifications and updates whenever they are available etc .This is all possible thanks to the new technologies that emerged … -
Easy ecommerce with Django framework
One question that I usually stumble upon on online communities is can I use Django to build an ecommerce website ? Or which is the best Django framework/package to build ecommerce websites with Django ? and questions of this type .So throughout this post i'll try to answer these questions and shed some light on the subject of building ecommerce platforms with Django . The short answer to this question is Yes.You can use Django to build ecommerce websites/platforms but lets go in depth to talk about what are the requirements of an ecommerce website and how can Django framework provide the functionality needed to implement ecommerce related modules for web apps. Maybe you already know ecommerce platforms are not really easy to build .You have to deal with a lot of tasks beside common web apps things .For example you need to manage your inventory and all information about products ,also different algorithms for inventory management .You need to deal with product shipping ,orders and also invoices just to name a few of them .You need to work with customers and different payment methods and also shopping carts etc.So unless you want to spend a lot of time to … -
Building Real time web apps with Django channels
Django is a fully featured web framework for building web applications using the general purpose Python language . Django creators call it the pragmatic framework for perfectionists with deadlines which is really true .If you have already used Django for building web apps for clients then you already know how Django makes it dead easy to build a web application from the initial prototype to the final product .But Django was created ten years ago for satisfying the requirements for that era .Back then the web wasn't as modern and complex as today since the great portion of web apps were a bunch of static pages rendered on the server after fetching and formatting some data from a database .Developers used the popular MVC (Model View Controller ) design pattern to structure their code .Now it is 2017 ,the web has dramatically changed the web is seeing or has already seen the rise of the real time apps with a lot of interactions .Users don't have to refresh the page each time to see the updates .Apps can send real time notifications and updates whenever they are available etc .This is all possible thanks to the new technologies that emerged … -
Easy ecommerce with Django framework
One question that I usually stumble upon on online communities is can I use Django to build an ecommerce website ? Or which is the best Django framework/package to build ecommerce websites with Django ? and questions of this type .So throughout this post i'll try to answer these questions and shed some light on the subject of building ecommerce platforms with Django . The short answer to this question is Yes.You can use Django to build ecommerce websites/platforms but lets go in depth to talk about what are the requirements of an ecommerce website and how can Django framework provide the functionality needed to implement ecommerce related modules for web apps. Maybe you already know ecommerce platforms are not really easy to build .You have to deal with a lot of tasks beside common web apps things .For example you need to manage your inventory and all information about products ,also different algorithms for inventory management .You need to deal with product shipping ,orders and also invoices just to name a few of them .You need to work with customers and different payment methods and also shopping carts etc.So unless you want to spend a lot of time to … -
An easy tip to quickly access the Python reference
If you are like me, you visit the Python Standard Library Reference all the time. You already know there’s a “datetime” module, a “random” module, an “os.path” module, and so on, so how do you quickly go there to read the reference? Here’s what I do. I switch to my browser with Alt+Tab, I key in Ctrl+L or Ctrl+T, in the URL tab I type “p3 datetime”, and I press Enter. The whole procedure takes less than 3 seconds, and it immediately takes me to the Python 3 reference for datetime. How to do it Firefox: Visit https://docs.python.org/3/library/datetime.html and bookmark it. Go to the properties of the new bookmark, change the name to “Python 3 Library Reference”, specify “p3” in the keyword field, and in the URL change the “datetime” part to “%s”, so that the whole URL is https://docs.python.org/3/library/%s.html. Other browsers: I don’t know, but the information is around (e.g. Chrome) Actually I have a copy of the documentation on my local machine, so the URL I’m actually using is file:///usr/share/doc/python3-doc/html/library/%s.html. I have such shortcuts for the Python 3 library, the Python 2 library, the Django settings (but the setting must be typed in lower case and with hyphens … -
Django 1.11 Highlights
You can't always, easily, keep up with the latest and greatest of what is coming out in django, so since we have a new release candidate for django 1.11 here are a few of the highlights. I would say there are some interesting things that are on the horizon for django, especially since this is the last 1.x release before we are on to 2.0. Django 1.11 Highlights -
Come Visit Us at PyCon 2017
PyCon 2017 is fast approaching, and we’re excited to support the event this year as sponsors once again. It’s a great opportunity to meet new friends, exchange ideas and interact with the community at large. -
Django ile Web Programlama Video Serisi
Toplam 41 video dan oluşan Django ile Web Programlama eğitim serisi, temel düzeyde Python bilgisi olanlar ve daha önceden web programlama bilgisine sahip olmayanlar için temel seviyeden başlayıp, adım adım giderek Django ile bir web sitesi oluşturmayı hedefler. Django’nun temel mantığını anladıktan sonra, ortalama bir websitesini geliştirmek vaktinizi çok fazla almayacaktır. Django Nedir? Django, tamamen... Django ile Web Programlama Video Serisi yazısı ilk önce Python Türkiye üzerinde ortaya çıktı.