Search test library by skills or roles
⌘ K

Adaface Sample Django Questions

Here are some sample Django questions from our premium questions library (10273 non-googleable questions).

Skills

Others

Embedded Systems Agile/Scrum Cyber Security SAP ABAP SAP HANA SAP Fiori SAP GRC SAP QM SAP SuccessFactors Salesforce Developer Salesforce Administrator Boomi Dynamics 365 SCM Dynamics 365 Finance Dynamics 365 Customer Service Dynamics 365 Sales Dynamics 365 Customer Voice Dynamics 365 Commerce Dynamics AX Spark Adobe InDesign Oracle Hyperion Planning Customer Support ITIL Blue Prism SAS SCCM SSAS SSIS SSRS Citrix Google AdWords Weblogic Talend UML Human Resource Management Talent Acquisition Power Apps RPA CISCO CISCO DCIM French Apache NiFi Apache Pig TIBCO Spotfire TIBCO Business Studio TIBCO Administration TIBCO ActiveMatrix BPM TIBCO Hawk TIBCO Apache Tomcat Oracle Hyperion Financial Management Oracle Fusion Oracle AIA Oracle APEX Oracle BPM Oracle Apps Oracle Financial Apps Oracle OAF Oracle SOA SAP Hybris SAP BusinessObjects SAP BI SAP PowerDesigner SAP PowerBuilder SAP Leonardo SAP MDM SAP MDG SAP BW SAP SRM SAP UI5 SAP MM SAP HCM SAP BTP (SCP) SAP PI SAP PP SAP Basis SAP SD SAP WM SAP PS SAP BODS SAP DBM SAP Litmos SAP FI Loadrunner WPF WebFOCUS Ranorex Informatica Data Quality GDPR RabbitMQ Gradle Grunt EJB SnapLogic SharePoint Progress (OpenEdge) Informatica B2B Data Exchange Informatica MDM Joomla Ionic Liferay Sqoop Computer Literacy Communication Skills Technical Support Ecommerce Analytics Software Support Growth Marketing Marketing Analysis Digital Marketing Product Marketing SEO Outreach Market Research Jira German Italian Spanish Grammar & Vocabulary Listening Comprehension Reading Comprehension Sentence Structure
🧐 Question

Easy

URL Dispatcher
Routes
Solve
Review the following sample Django URL.conf:
 image
Pick the correct statements if settings.APPEND_SLASH=False:
            
            A: A request to /books/2015/04/ would match the third entry in the list. Django would call the function views.month_books(request, year=2015, month=4).
            B: A request to /books/2015/04/ would match the second entry in the list. Django would call the function views.year_books(request, year=2015).
            
            C: A request to /books/2023/ will match the first entry in the list. Django would call the the function views.custom_newyear_2023(request).
            D: A request to /books/2023/ would match the second entry in the list. Django would call the function views.year_books(request, year=2023).
            
            E: /books/2022 would not match any of these patterns, because each pattern requires that the URL end with a slash.
            F: A request to /books/2022 would match the second entry in the list. Django would call the function views.year_books(request, year=2022).

Medium

External Bank Transfer
Database Transactions
Solve
Review the following Django code for a banking application:
 image
The code needs to debit an account with the provided amount and deposit the amount in an external entity. Here’s how the code is broken:
            
            1) First, the amount is debited from the account by creating a new row in BalanceLine table.
            2) Next, a new row is created in the DB in ExternalTransfer table and a new id (used as unique reference) is created for the transfer.
            3) An external 3rd party API call is made using the new id created in step 2.
            
            The function transfer_to_other_bank is called as shown below:
 image
Pick the correct statements:
            
            A: If post_transfer_emails() raises an exception, the database transactions that happened in transfer_to_other_bank are not rolled back since they are listed in a separate atomic transaction.
            B: If post_transfer_emails() raises an exception, the database transactions (new rows in ExternalTransfer and BalanceLine tables) are rolled back. The banking_api call is called again with a null reference.
            C: If post_transfer_emails() raises an exception, the database transactions are rolled back but the banking_api is not called again.
            D: If post_transfer_emails() raises an exception, the banking_api is called again with rollback=True. If the response is success, then the database transactions are rolled back. If the response is failure, the database transactions are committed.

Medium

Query retired people
Solve
An HRTech startup has the following Django code:
 image
We want a QuerySet with all Person objects where retired == True and age != 45. Which of the following do you think we should use?
 image
🧐 Question🔧 Skill

Easy

URL Dispatcher
Routes

2 mins

Django
Solve

Medium

External Bank Transfer
Database Transactions

3 mins

Django
Solve

Medium

Query retired people

2 mins

Django
Solve
🧐 Question🔧 Skill💪 Difficulty⌛ Time
URL Dispatcher
Routes
Django
Easy2 mins
Solve
External Bank Transfer
Database Transactions
Django
Medium3 mins
Solve
Query retired people
Django
Medium2 mins
Solve

Trusted by recruitment teams in enterprises globally

Amazon Morgan Stanley Vodafone United Nations HCL PayPal Bosch WeWork Optimum Solutions Deloitte Microsoft NCS Doubtnut Sokrati J&T Express Capegemini

We evaluated several of their competitors and found Adaface to be the most compelling. Great library of questions that are designed to test for fit rather than memorization of algorithms.


Swayam Narain, CTO, Affable

hashtag image heart icon Swayam
customers across world
Join 1200+ companies in 75+ countries.
Try the most candidate friendly skills assessment tool today.
g2 badges
Ready to streamline your recruitment efforts with Adaface?
Ready to streamline your recruitment efforts with Adaface?
logo
40 min tests.
No trick questions.
Accurate shortlisting.
ada
Ada
● Online
Previous
Score: NA
Next
✖️