Filed under Django

No module named simple (Django)

Upgrading an application from lower Django version to upper can be a problem when it carries with a lot many errors with it. This usually occurs when we migrate from Django 1.4.* to Django 1.5.*. This is usually because Django 1.5 and plus totally supports class based views, so with this come some changes in … Continue reading

No module names Image (Django)

When developing a Django application, you may require to have a field where you ask the user to upload an image and this image is ought to be stored in database. But Whoop!!.. you can’t move further because you have got an error that says “No module named Image”. This can be easily solved using … Continue reading

How Django Framework works?

For a newbie, understanding the working of Django framework and importance of each file in the application is quite difficult. When making an application one need to have following things: Django & MySQL installed. Apache configured with application. Basic knowledge and understanding of Python. When building a module in an application one should have understanding … Continue reading

Extending a base file in Django

Recently I was in need to have a code that could enable the extending of base file in other template files depending on type of user logged in into the site. This basically is used when we want different different look of site for different types of users. Following are the methods which I used … Continue reading

Distance Calculator with map in Django

I had an urgent need to embed a distance teller map into my Django application. I used many pre-made Django modules like GeoDjango etc, but they did not serve my need. Then I used Google map distnce calculator api and tweaked some code of my application to save the distance in database. So these are … Continue reading

Updating the database using Shell in Django

Recently, I had a urgent need to change or say, update the database fields without affecting any code of my Django projects. This came to me as a challenge. Sometimes these challenges help us to learn a lot. I had a table named ‘Amount’ which had 2 columns as field and other_field.These columns were filled … Continue reading

Error “templatedoesnotexist” in Django

Recently I was facing had been facing from the error “templatedoesntexist” in django.  The error looked like: Template-loader postmortem Django tried loading these templates, in this order: Using loader django.template.loaders.filesystem.Loader: /home/sandy/account_department/templates/fee_form/form.html (File exists) Using loader django.template.loaders.app_directories.Loader: /usr/local/lib/python2.6/dist-packages/django/contrib/admin/templates/fee_form/form.html (File does not exist All I could think was my templates are at right positions as described by me in file … Continue reading