How to upload and process the CSV file in Django

In this article we will discuss how to upload a csv file and then process the content without storing file on server. One approach could be uploading the file, storing it in upload directory and then reading the file. Another approach could be uploading file and reading it directly from post data without storing it in memory and displaying the data.

We will work with the later approach here.

Continue reading “How to upload and process the CSV file in Django”

Creating custom user model and custom authentication in Django

While working on some django project you might feel that the default user model is not fulfilling all the requirements. For example you may want to authenticate users by email Id and not by username. You may want to store some more extra information in the user model. In short you might want to define your own custom user model.

In particular we may encounter one out of below four scenarios:

  • You are happy with the way default authentication but you need to store extra information in the model itself.
  • You want different authentication process, for example using email, but do not want to store extra information.

Continue reading “Creating custom user model and custom authentication in Django”

Hello Word in Django : How to start with Django

In this article I will teach you how to make and run a python-django app in less than 5 minutes.

Prerequisite: Python (preferably python 3) is already installed.

Step to create and run the django app:
  • Install virtual environment. You may proceed without virtual environment too, but in long run it is going to be very helpful.
    $ pip install virtualenv

Continue reading “Hello Word in Django : How to start with Django”

How to host django app on pythonanywhere for free

So you developed a course project which you need to host somewhere so that everyone can access it.
Or you are working on some personal project and want to host it so that test users can test it.

What do you do in such scenario? You look for best hosting service provider. Right?
So what is best option to host your django app?

We tried multiple hosting providers and found out that best choice for a django app is pythonanywhere.com. why? Find out below.

Continue reading “How to host django app on pythonanywhere for free”