How to add sitemap to your website using Django and Python
What is a sitemap? Django comes with a sitemap framework, which allows you to generate sitemaps for your site dynamically. A sitemap is an XML file that tells search engines … Read More
What is a sitemap? Django comes with a sitemap framework, which allows you to generate sitemaps for your site dynamically. A sitemap is an XML file that tells search engines … Read More
One of the most powerful parts of Django is the automatic admin interface. It reads metadata from your models to provide a quick, model-centric interface where trusted users can manage … Read More
Open console using. python manage.py shell then use following script in shell from django.contrib.auth.models import User User.objects.filter(is_superuser=True) will list you all super users on the system. if you recognise your … Read More
The requests module lets you easily download files from the Web without having to worry about complicated issues such as network errors, connection problems, and data compression. The requests module … Read More
webbrowser Comes with Python and opens a browser to a specific page. Requests Downloads files and web pages from the Internet. Beautiful Soup Parses HTML, the format that web pages … Read More
String There are three ways you can declare a string in Python: single quotes (‘), double quotes (“), and triple quotes (“””). You can use quotation marks within strings by … Read More
Catching exceptions Whenever a runtime error occurs, it creates an exception object. The program stops running at this point and Python prints out the traceback, which ends with a message … Read More
Files Note: Take care of Indentation in codes. While a program is running, its data is stored in random access memory (RAM). RAM is fast and inexpensive, but it is … Read More
Numpy NumPy is the fundamental package for scientific computing with Python. It contains among other things: a powerful N-dimensional array object sophisticated (broadcasting) functions tools for integrating C/C++ and Fortran … Read More
The following snippet counts the number of decimal digits in a positive integer: n = 40265 count = 0 while n != 0: count = count + 1 n = … Read More