[PYTHON] The story of making a web application that records extensive reading with Django

Introduction

Extensive reading in English, it is a mentor to open and record the extensive reading notebook every time you read, and you cannot maintain your motivation. .. .. So I made the Extensive Reader a web application. What I made → https://tadokuapp.herokuapp.com/tadoku/

function

Since it would be dull to list dates, titles, words, etc. like a paper extensive reader, the number of words is displayed on the calendar. Also, the number of words read each month is output as a bar graph. Screenshot from 2020-03-20 02-51-34_Original.jpg Screenshot from 2020-03-20 02-55-13_Original.jpg

Development environment

python3.7.6 Django3.0.3

calendar

Series of making calendars with Django I referred to this person's calendar. I really appreciate it. ~~ I can't make it myself ~~ The number of words read that day is displayed below the date.

Around authentication

For login and logout, use the one that comes standard with Django, and sign up yourself. Also, write html at the top of the page so that "Welcome (username), logout" is displayed when logging in and "Welcome gust, login" is displayed when logging out.

base.html


{% if user.is_authenticated %}
    <a href="{% url 'accounts:logout' %}" class='user'>Welcome {{ user.get_username }}, logout</a>
{% else %}
    <a href="{% url 'accounts:login' %}" class='user'>Welcome guest, login here!</a>
{% endif %}

Graph

Pass the book information of the user who is currently logged in in views to the template. Chart.js is used to draw the graph. In addition, the number of words (monthly and all two), the amount of increase in the number of words from the previous month, and the number of books read (monthly and all two) are displayed below the graph. I also added a tweet button. https://publish.twitter.com/#

profile

I'm lonely with just the user name and user information, so I introduced the user rank ~~ (something like Atcoder's rate) ~~. The user rank is changed to gray, brown, green ... depending on the number of words read.

Deploy

This is heroku. (I wanted to deploy with DigitalOcean, but I gave up because the payment is credit card or PayPal)

Impressions

I started studying Django, so it took me an unexpected amount of time, but I'm glad it was completed. There are many improvements, such as speeding up by optimizing queries and introducing cache, and improving usability by improving social authentication and rates (such as lowering if skipped), so I will continue development.

Summary

Django is fun.

Recommended Posts

The story of making a web application that records extensive reading with Django
The story of making a module that skips mail with python
The story of developing a web application that automatically generates catchphrases [MeCab]
Build a web application with Django
The story of making a question box bot with discord.py
The story of making a standard driver for db with python.
I made a WEB application with Django
A story that visualizes the present of Qiita with Qiita API + Elasticsearch + Kibana
The story of making a university 100 yen breakfast LINE bot with Python
The story of making a sound camera with Touch Designer and ReSpeaker
The story of making a package that speeds up the operation of Juman (Juman ++) & KNP
The story of making a lie news generator
The story of making a mel icon generator
The story of making a box that interconnects Pepper's AL Memory and MQTT
The story of Django creating a library that might be a little more useful
The story of making a Line Bot that tells us the schedule of competitive programming
A story that reduces the effort of operation / maintenance
The story of making a music generation neural network
A story that struggled with the common set HTTP_PROXY = ~
The story that Japanese output was confused with Django
A story that analyzed the delivery of Nico Nama.
Web application creation with Django
Create a web application that recognizes numbers with a neural network
The story of a Django model field disappearing from a class
Create a web API that can deliver images with Django
Deploy a Django application with Docker
The story of remounting the application server
The story of writing a program
A story stuck with the installation of the machine learning library JAX
[python, ruby] fetch the contents of a web page with selenium-webdriver
A story that struggled to handle the Python package of PocketSphinx
The story of the release work of the application that Google does not tell
The story of creating a site that lists the release dates of books
A story that supports electronic scoring of exams with image recognition
Test the application of migration files with Django + PostgreSQL (Evil Way)
Launched a web application on AWS with django and changed jobs
Note that I was addicted to accessing the DB with Python's mysql.connector using a web application.
The story of making a tool that runs on Mac and Windows at the game development site
The story of creating a bot that displays active members in a specific channel of slack with python
A story that I had a hard time trying to create an "app that converts images like paintings" with the first web application
The story of a Parking Sensor in 10 minutes with GrovePi + Starter Kit
The LXC Web Panel that can operate LXC with a browser was wonderful
The story of making Python an exe
The story of having a hard time introducing OpenCV with M1 MAC
The story of making an immutable mold
[Python] A quick web application with Bottle!
Hit a method of a class instance with the Python Bottle Web API
The story of making a slackbot that outputs as gif or png when you send the processing code
The result of making the first thing that works with Python (image recognition)
Run a Python web application with Docker
The story of blackjack A processing (python)
The story of making a tool to load an image with Python ⇒ save it as another name
The story of using mysqlclient because PyMySQL cannot be used with Django 2.2
The advantages and disadvantages of Django that people with one year of experience think
The story of IPv6 address that I want to keep at a minimum
Around the authentication of PyDrive2, a package that operates Google Drive with Python
I failed to install django with pip, so a reminder of the solution
I want to create a web application that uses League of Legends data ①
The story of the learning method that acquired LinuC Level 1 with only ping -t
A story about creating a web application that automatically generates Minecraft sound block performances
[Python] A program that calculates the number of updates of the highest and lowest records