Tag Archives: Django

django

Using django-import-export python module.

The tutorial today will show you how to use the python module named django-import-export for importing and exporting files. If the Django project is done on a virtual environment, you will need to activate it. Install the python module using the pip utility:

You must add the following to the file settings.py the INSTALLED_APPS… Read More »

How to reset django or create another superuser.

If you know your username (for example admin) then use this:

Also, You may try through the console to see and change the password: Use the shell console and start the Django shell:

Now use this Django script:

If you need to create another superuser.

XSS sanitization on django – variables and templates

XSS attacks allow a user to inject client side scripts into the browsers of other users. Using Django templates protects you against the majority of XSS attacks. To do this you need to protect your templates this code:

If you need to disable auto-escaping for an individual variable, then use the safe filter:

Read More »

python 3.2 and django 1.4 – installation

Although most of us prefer the python version 2.6, today I tried to install the latest version of django and python 2.3.2 . Make a new folder , named test-dj .

On the official site, I got the two archives:

I will start with the installation of python. We unzip the archive:

Read More »