Giter VIP home page Giter VIP logo

Comments (8)

hamishwillee avatar hamishwillee commented on June 23, 2024 1

OK, so this all works and builds fine with the right environment, so probably you have just imported the current requirements/versions as you have gone through the tutorial. One of these has been updated since the tutorial was written, breaking the code.

You can test this by creating a clean environment, then import the requirements.txt/follow the steps as shown in https://github.com/mdn/django-locallibrary-tutorial#quick-start

If that works then you've done nothing wrong in your code and the example will need and update. If it does not work then i'm a bit stumped.

from django-locallibrary-tutorial.

hamishwillee avatar hamishwillee commented on June 23, 2024

Is this failing on this repo or your own version?
I assure you that Book does have self.id - every model has one auto created by default.

from django-locallibrary-tutorial.

KushGrandhi avatar KushGrandhi commented on June 23, 2024

i suppose the problem is with my own version
i copy pasted the code and tried as well, but still it was failing for me.

from django-locallibrary-tutorial.

hamishwillee avatar hamishwillee commented on June 23, 2024

No, I mean if you try this particular repo code in all its glory, does it work?

from django-locallibrary-tutorial.

KushGrandhi avatar KushGrandhi commented on June 23, 2024

no, still it shows the same error.

from django-locallibrary-tutorial.

KushGrandhi avatar KushGrandhi commented on June 23, 2024

Yes it seems to work now with the quick setup but when i opened vscode it still shows errors, i don’t understand whats wrong

from django-locallibrary-tutorial.

hamishwillee avatar hamishwillee commented on June 23, 2024

The fact it works tells us that one of the dependencies has changed since the tutorial was created, and now that part of the code (and the dependencies) should be updated. To find out which, you look at https://github.com/mdn/django-locallibrary-tutorial/blob/master/requirements.txt
Then in your old environment you compare to see what has changed. For example, what version of Django are you using?

Also note that VSCode reporting errors is not something I can help with - I coded this in a text editor.

from django-locallibrary-tutorial.

KushGrandhi avatar KushGrandhi commented on June 23, 2024

the only difference in my old environment was that django version was 2.2 as 2.1 has been deprecated.
Thank you so much for the help!

from django-locallibrary-tutorial.

Related Issues (20)

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.