-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tutorial part 3 #64
Comments
Is this failing on this repo or your own version? |
i suppose the problem is with my own version |
No, I mean if you try this particular repo code in all its glory, does it work? |
no, still it shows the same error. |
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. |
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 |
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 Also note that VSCode reporting errors is not something I can help with - I coded this in a text editor. |
the only difference in my old environment was that django version was 2.2 as 2.1 has been deprecated. |
in models.py
class Book(models.Model):
title = models.CharField(max_length=200)
there is no self.id in class Book and is giving an error
the get_absolute url seems to not work as the foriegn keys are not getting linked somehow
The text was updated successfully, but these errors were encountered: