Giving something back

Let's face it, we've all been there. Here we post the things we think it can help the community to have a deep understanding and to solve common problems.

Tag – Django

How to deploy a django project with Apache + mod_wsgi

Posted by Andres Haskel

In this guide we will talk about how to deploy a django project using Apache and it’s module, mod_wsgi. This two have a main role in the deploying process.

We will handle the client requests using Apache, which will be the one of delegating the requests that need logic to the Django app through mod_wsgi.

Setting a virtual environment

First, we will install pip

$ sudo easy_install pip

Next we need to install the virtualenv command to create these environments.

$ sudo pip install virtualenv

When virtualenv gets installed we can create a Python virtual environment by typing:

$ virtualenv exampleve

Then, to ...

Read More

Django Channels

Posted by Ignacio Duran

What is “Django Channels” and why should it be used?

Django Channels is a way to include WebSockets and HTTP2 to your Django servers, and extend its basic functionalities. It allows frontend code to receive notifications either when data changes or an event triggers on the backend, without forcing the frontend to ask continually and periodically for updates to the backend. Django Channels also makes it possible for the server to run code after a response is sent to the user, allowing for quicker responses and easier data management.

The basic WebSocket functionality works in three steps. First the client ...

Read More

How to configure a server with nginx, gunicorn and supervisor.

To deploy a Django project on a production server it is needed a proper environment which manages the http requests. It should be powerful enough to handle a lot of connections at the same time, but it should have a good performance. Also, if it's possible, it should be easy to install and configure.

The first thing you need to do is configure the http server which afterwards redirects to the Django framework. For this you have different tools you can employ. In this tutorial we will be explaining how to use gunicorn and nginx. They are easy to configure and highly ...

Read More

Back