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

How to do it...

Follow these steps to complete the recipe:

  1. Make sure to have the Idea model created with the picture field and picture version specifications. See the Creating an app with CRUDL functions and Uploading images recipes for more information.
  2. Make sure to have a detail view ready for ideas. See the Creating an app with CRUDL functions recipe for information on how to do that.
  1. Plug the detail view into the URL configuration. How to do that is described in the Creating an app with CRUDL functions recipe.
  2. In the settings of your specific environment, define WEBSITE_URL and MEDIA_URL as full URLs of the media files, as in this example:
# myproject/settings/dev.pyfrom ._base import *DEBUG = TrueWEBSITE_URL = "http://127.0.0.1:8000" ...
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