Python | Django | Application Level Features

Last Updated :
Discuss
Comments

Question 1

What is the main purpose of the Django session framework?

  • Store session data on the client side only

  • Encrypt all data sent to the client

  • Keep state between requests by storing data per browser on the server side

  • Provide internationalization of strings

Question 2

How does Django identify which session belongs to which browser/client?

  • By using the user’s IP address only

  • By storing full session data in a cookie

  • By tracking the browser fingerprint

  • By sending a session ID in a cookie and storing session data on the server

Question 3

What does internationalization (i18n) support in Django allow developers to do?

  • Store user sessions in multiple languages


  • Convert all URLs to Unicode only

  • Automatically detect user location from IP

  • Translate text and format numbers/dates for different locales and languages

Question 4

In Django what is a slug field typically used for in a model?

  • To store password hashes

  • To store a URL-friendly short label (slug) often generated from a title

  • To store user session data

  • To mark translated strings

Question 5

Which characters are generally allowed in a Django slug (when using SlugField)?

  • Any unicode characters including spaces

  • Only digits

  • Only letters, numbers, hyphens and underscores

  • Only lowercase letters and spaces

Question 6

Why might slug fields be preferred over numeric IDs in URLs?

  • Slugs improve human-readability and SEO friendliness of URLs

  • Slugs guarantee uniqueness automatically

  • Numeric IDs are not allowed in Django URLs

  • Slugs encrypt the URL parameters

Tags:

There are 6 questions to complete.

Take a part in the ongoing discussion