Django 3 Web Development Cookbook Published by Packt
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
Django 3 Web Development Cookbook Published by Packt
License: MIT License
Django 3 Web Development Cookbook Published by Packt
If you have already purchased a print or Kindle version of this book, you can get a DRM-free PDF version at no cost.
Simply click on the link to claim your free PDF.
When I run this project Chapter 8 on localhost on login page I get this type of error on loading static files in browser. Any suggestion how to solve this ?
The resource from “http://localhost:8000/static/admin/css/base.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
The resource from “http://localhost:8000/static/admin/css/responsive.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
The resource from “http://localhost:8000/static/admin/css/dashboard.css” was blocked due to MIME type (“text/html”) mismatch (X-Content-Type-Options: nosniff).
Hi,
I'm running into some errors when I try to run chapter 2, on Ubuntu 20.10:
File "/home/[user_name]/DjangoProjects/ch03/myproject_virtualenv/src/django-myproject/myproject/apps/search/multilingual_whoosh_backend.py", line 31, in __init__
lang_code_underscored = translation.get_language().replace("-", "_")
I simply don't know what's going on... Does Django changes so much on each newer release?
Hi,
Implementing MultilingualField and MultilingualCharField as abstract base classes and using them as mixins for various models is really very useful, thank you very much for this insight in the book. Yet, a small trick would be even more fruitful; right now is there the default language set in the settings is "en", and if there are two languages of application defined as "en" and "de" and if we name the model field as "title", what the method does is producing "title_en" and "title_de" fields into the DB. Instead, if we create only the marginal languages on top of the default one, it will be super helpful in many places throughout the application. What I mean is the following:
LANGUAGE_CODE = "en"
LANGUAGES = [
("en", "English"),
("de", "German"),
Model field name = "title"
-> Create the following fields in the DB: "title" and "title_de". No, "title_en" as it is the name given for the primary language anyway.
Unfortunately I've found the relevant django classes used in the book very complicated and could not do this by myself.
Am running on Linux Ubuntu 18.04
Python version 3.8
Django==3.0.3
I tried reinstalling and installing the correct versions for django-elasticsearch-dsl and django-haystack but the error still persists
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.