Comments (8)
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.
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.
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.
No, I mean if you try this particular repo code in all its glory, does it work?
from django-locallibrary-tutorial.
no, still it shows the same error.
from django-locallibrary-tutorial.
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.
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.
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)
- Using non heroku install HOT 1
- issues on ALLOWED_HOSTS HOT 1
- How to enable CORS headers in locallibrary tutorial ? HOT 4
- Handle case where Book belonging to Bookinstance is deleted.
- Visual Studio Code debugging HOT 3
- Copy skeleton into a new project HOT 2
- [spam] HOT 1
- Issue when logging out HOT 11
- Discrepancy in test_views RE permission error tests HOT 1
- remove uses of fields = '__all__' HOT 4
- the form validation for the renewal is not working HOT 3
- SystemCheckError HOT 4
- Adding more challenges, explanations to challenge solutions HOT 4
- Improving Pagination step HOT 2
- Loan_status. HOT 2
- raise NoReverseMatch(msg) django.urls.exceptions.NoReverseMatch: Reverse for 'renew-book-librarian' with arguments '(UUID('b3efb948-ab15-44dc-87af-50c6ede58c18'),)' not found. 1 pattern(s) tried: ['catalog/book/uuid:pk>/renew/$'] HOT 2
- Add fixtures to catalog HOT 6
- NoReverseMatch - Reverse for 'logout' not found. HOT 3
- 'RenewBookForm' object has no attribute 'cleaned_data' HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-locallibrary-tutorial.