Skip to Content
Django 3 Web Development Cookbook - Fourth Edition
book

Django 3 Web Development Cookbook - Fourth Edition

by Aidas Bendoraitis, Jake Kronika
March 2020
Intermediate to advanced
608 pages
17h 17m
English
Packt Publishing
Content preview from Django 3 Web Development Cookbook - Fourth Edition

Implementing the Like widget

Websites in general, and most commonly those with a social component, often have integrated Facebook, Twitter, and Google+ widgets to like and share content. In this recipe, we will guide you through the building of a similar Django functionality that will save information in your database whenever a user likes something. You will be able to create specific views based on the things that people liked on your website. We will similarly create a Like widget with a two-state button and badge showing the number of total likes.

The following screenshot shows the inactive state, where you can click on a button to activate it:

The following screenshot shows the active state, where you can click on a button to deactivate ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Django 2 Web Development Cookbook - Third Edition

Django 2 Web Development Cookbook - Third Edition

Jake Kronika, Aidas Bendoraitis

Publisher Resources

ISBN: 9781838987428Supplemental Content