-
Notifications
You must be signed in to change notification settings - Fork 42
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
Django Task Complete #7
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work @tiger-yash 🎉 . Your submission has been evaluated.
class BRating(models.Model): | ||
critic = models.ForeignKey(User, related_name='critic', null=True, blank=True, on_delete=models.SET_NULL) | ||
book = models.ForeignKey(Book, on_delete=models.CASCADE) | ||
rating=models.FloatField(default=0.0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As per instructions this should be integer. But using a separate model was nice.
appdirs==1.4.3 | ||
apturl==0.5.2 | ||
autopep8==1.5.7 | ||
backports.entry-points-selectable==1.1.0 | ||
bcrypt==3.1.7 | ||
binwalk==2.2.0 | ||
blinker==1.4 | ||
Brlapi==0.7.0 | ||
certifi==2019.3.9 | ||
chardet==3.0.4 | ||
chrome-gnome-shell==0.0.0 | ||
Click==7.0 | ||
colorama==0.4.3 | ||
command-not-found==0.3 | ||
cryptography==2.8 | ||
cupshelpers==1.0 | ||
cycler==0.10.0 | ||
dbus-python==1.2.16 | ||
decorator==4.4.2 | ||
defer==1.0.6 | ||
distlib==0.3.2 | ||
distro==1.4.0 | ||
distro-info===0.23ubuntu1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can use or virtual environments to keep only requirements specific to your project otherwise you deployment will be heavy in size and cost.
@@ -108,13 +109,13 @@ | |||
|
|||
LANGUAGE_CODE = 'en-us' | |||
|
|||
TIME_ZONE = 'UTC' | |||
TIME_ZONE = 'Asia/Kolkata' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's good that you updated timezone.
''' | ||
''' | ||
|
||
|
||
@csrf_exempt |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While @csrf_exempt
would work here but it is considered a good practice to use it in application that are pure Django based (like this one) for security reasons. When sending requests using jquery ajax you can simply query the DOM to get hidden csrf element and fetch its value and include it in your request.
CSoC Task 2 Submission
I have completed the following tasks
Link to the Deployed Website:
Django-Library