Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

tiger-yash
Copy link
Member

@tiger-yash tiger-yash commented Jul 20, 2021

CSoC Task 2 Submission

I have completed the following tasks

  • Stage 1
  • Stage 2
  • Stage 3
  • Stage 4

Link to the Deployed Website:
Django-Library

Copy link
Member

@m-e-l-u-h-a-n m-e-l-u-h-a-n left a 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)
Copy link
Member

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.

Comment on lines +1 to +23
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
Copy link
Member

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'
Copy link
Member

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
Copy link
Member

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants