Are you a candidate looking to sharpen your skills? Try our practice tests or view sample interview questions & Get hired by the best. Click Here×

Online Django Test

Topics Covered

  • QuerySets
  • Jinja Filters
  • Django Template
  • Django Model
  • ModelForm Django Commands

Useful for hiring

  • Django Developer
  • Python Developer

Start hiring job-fit candidates using this assessment


"Our recruiters no longer rely only on the telephonic interviews. We shortlist candidates based on assessment reports. The detailed test reports provide skill wise analysis of each candidate. This has helped our clients reduce their time to hire by 60%."

Vipin Sharma, Mobile Programming,
General Manager HR & Recruitement

How do you concatenate two QuerySets into one list?

Note: There can be multiple correct answers to this question.

    • result = list(query_set_1 | query_set_2)

    • from itertools import chain
      result = list(chain(query_set_1, query_set_2))

    • from django.db.models import Q
      result = Q(query_set_1) | Q(query_set_1)

    • result = query_set_1 + query_set_2


Assuming you have a Django model named 'User', how do you define a One to one relation for this model in another model?

Note: There can be multiple correct answers to this question.

    • supervisor = models.OneToOneField(User, on_delete=models.CASCADE)

    • supervisor = models.OneToOneRel(User, on_delete=models.CASCADE)

    • supervisor = models.OneToOne(User, on_delete=models.CASCADE)

    • supervisor = models.ForeingKey(User, on_delete=models.CASCADE, unique=True)


Using Django forms, how do you change the default input for a password input?

    • password = forms.CharField(input_style=forms.PasswordInput())

    • password = forms.CharField(input=forms.PasswordInput())

    • password = forms.CharField(widget=forms.PasswordInput())

    • password = forms.CharField(widget=forms.Password)

Good News! You can customize this test as per your requirement

  • Choose and add questions from Interview Mocha question libraries

  • Add your own set of questions

  • Customize test settings like duration, number of questions, passing score, web proctoring and much more

  • Mail us at to create a custom test

Looking for a tailor-made test, to suit your assessment needs?

Get in touch

Global companies using Mocha assessments

  • altran
  • credit suisse
  • sephora
  • nielsen
  • capgemini
  • akamai

How Mocha assessments are brewed

Speed up your IT recruitment with Interview Mocha

  • 500+ IT skill tests
  • 20+ coding languages
  • 50+ domain knowledge tests
  • 100+ digital 2.0 skill tests
  • Customer focus aptitude tests
  • Enterprise ready features & more...

Why hiring managers and recruiters across the globe love Interview Mocha

Take your first step to hire job fit candidates