Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you tell if a site has been made with Django?

Tags:

django

A company I'm looking at claims to have made the website for an airline and a furniture store using Django, but when I look at the sites, there is no indication what the underlying web technology is. How can you tell?

like image 432
hughdbrown Avatar asked Apr 06 '09 15:04

hughdbrown


People also ask

How can I tell if a website is using Django?

Try http://site.com/admin/ and see if it says "Django site admin" at the top. Inspect all of the HTML source code of every form you can find on the site, and see if any contain an input tag with name='csrfmiddlewaretoken' . csrfmiddlewaretoken is Django's CSRF token identifier.

Do you know any companies that use Django?

Prezi, NASA, National Geographic, Quora, The Onion, Reddit, Udemy, Robinhood and many more are out there. So Django is a perfect solution for both startups and large companies.

Is Instagram built on Django?

Instagram currently features the world's largest deployment of the Django web framework, which is written entirely in Python.


2 Answers

This is quite an old question, but I don't see any canonical answers. As the other answers have noted though, there's no sure-fire way to know, and if someone wanted to hide the fact that they're using Django, they can. That said, you can always do a little detective-work and determine with some confidence whether it uses Django or not. If that's your goal, here are some strong indicators you can look out for:

Admin Panel

First and foremost, check if the site has a /admin/ page. If it does, and it gives that familiar Django admin login page, you're 99% sure (unless someone went through a lot of trouble to make it look like Django).

Forms

There are a number of things you can look out for in forms:

  • Form fields with id attributes starting with id_
  • Check for a hidden field with the name csrfmiddlewaretoken
  • If the site has a formset, check for -TOTAL-FORMS and -DELETE hidden inputs.

Cookies

  • If the site uses the contrib.auth package for authentication, you will probably see a cookie called sessionid being set when you log in.
  • Forms will also probably set a cookie called csrftoken.

Trailing Slashes

Trailing slashes after URLs, and/or redirecting you to the page with a trailing slash if you try to go to one without it. This is Django's default behavior, and to my knowledge not extremely common in other frameworks. Note, though, that it can be easily deactivated in Django.

Error Pages

Failing all this, or still not being convinced, you can try to force error pages, and try to learn something from that. Go to an unmapped URL with a 404 page, and see if DEBUG still happens to be true (in which case you should probably notify the owner that they're not being very secure about their site).

like image 197
Herman Schaaf Avatar answered Sep 30 '22 03:09

Herman Schaaf


You can try a few things, such as attempting to find error pages, and checking the default location of the administration panel that Django creates, but overall there's no way to determine what technologies a given site is using.

See also: https://stackoverflow.com/questions/563316/is-there-a-generic-way-to-see-what-is-a-website-running-on/563335#563335

like image 26
Chad Birch Avatar answered Sep 30 '22 03:09

Chad Birch