GithubHelp home page GithubHelp logo

packtpublishing / django-2-web-development-cookbook-third-edition Goto Github PK

View Code? Open in Web Editor NEW
65.0 8.0 41.0 1.78 MB

Django 2 Web Development Cookbook - Third Edition, by Packt

License: MIT License

Dockerfile 0.10% Python 73.55% Shell 0.25% HTML 15.38% JavaScript 8.64% CSS 2.08%

django-2-web-development-cookbook-third-edition's Issues

Custom Template Tags Don't Work

The custom template tags - for example 'try_to_include' - all subclass from the Template.Node class and implement a render method. But this render method in fact gets passed a RequestContext object and not a context object which your code assumes.

Chapter 1, Docker Recipe, 502 Bad Gateway

Hi

I'm new to web development and thought this book looked great to help me with Django. But I'm stuck on the first chapter already and can't see my fault. Please help !

After cloning the repo, I navigate to the root of the chapter_1/myproject_docker. Before running any commands I have created this line in /etc/hosts (on my Ubuntu 18.04 OS)

127.0.0.1 myproject.local media.myproject.local static.myproject.local

And I have made sure the dev script is executable.

I then build the docker image with -

run ./bin/dev build

And finally I run -

MYSQL_USER=myproject_user MYSQL_PASSWORD=pass1234 ./bin/dev up -d

It creates the containers fine. However when i go to "http://myproject.local" in my browser I get "502 Bad Gateway - nginx/1.17.2"

Any ideas ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.