Monday, 19 August 2013

Installing a postgresql driver for Djangofor virtual environment

I tried installing pycopg2 for one of the virtual environment and there is an error with error return 1. And if installed using python setup.py install and mt.exe error.

The easiest and the successful way was as suggested http://stackoverflow.com/questions/5420789/how-to-install-psycopg2-with-pip-on-python by Praveen Gollakota.

Download the installer from http://stickpeople.com/projects/python/win-psycopg/ and do something like easy_install [BINARY_FILE]

Saturday, 17 August 2013

Heroku Integration of the application

By the way, I have implemented a virtual environment for django which is awesome.

Something like this: Instead of using your system with multiple projects, multiple packages and also maybe multiple versions of the django application this concept serves ideally well for the fact that this keeps every project in its own environment.

And finally a git on this project and integration with Heroku. My Heroku URLS is: http://floating-dusk-3285.herokuapp.com/

Loved the way it has turned up this far. But still the login on everypage is really eating my head!!

Login option from everypage like in StackOverflow

Now my first and foremost thing I want to have done in my web application is to have something like in StackOverflow where I can login from any page. An Ajax or a jquery plugin for it to pop-up a modal box where I can fill in my details and bang!! I am logged-in.

Here's whats in my mind, login is one of the basic functionalities.. It is the one which enables session, which is the concept as important as breathing for any usable web application. And, me being a noob in, web application development, am banging my head to get this done. How the heck I do I get it done with Django and jquery is the biggest question. Biggest question of my life, probably now!

Saturday, 27 July 2013

Initial setup

Here is what I have in my system:
Python 2.7 (32 bit version) on a Windows 64 bit machine. Django 1.6b version. Installation was a piece of cake. All that I had to do was download the gzipped tar ball and run "python setup.py install". First steps of web developments are always easy. So they say!

Postgres is the database choice I have thought of, for my application.


Just so that I do not forget the changes I had to do, is what I am registering in this blog:


1) Changes in settings.py, specific to postgres:


DATABASES = {

'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'django_learn',
'USER': 'akk',
'PASSWORD': 'admin',
'HOST': 'localhost',
'PORT': '5432',
}

}


2) Changes in settings.py for my Timezone. I noticed that the time is not in sync with my system time. One of the entries somewhere in the web helped me there.


TIME_ZONE = 'Indian/Reunion'


Yep! It helped!

Whats the plan!

Hmmm.. After 2 years of thoughts on which tool to choose to develop a application, I finally settle down on Django. Although I do understand now, It is not about the tools you choose before you START, but rather, It is more about roll up your sleeves and START!

Here is the project I have in mind, a basic web application which will help people to organize a trip/party/tour. The money should be pre-calculated and should be able to have a payment gateway to get money from everyone, and only then give it to the appropriate vendors which is finally a green signal to the organized party/tour/trip. The beauty is in:


1) Knowing the expense well in advance.

2) The burden of expense is all distributed before the event starts.

Although my good friend suggests me to have only a single webapp for only the end users and reside on 3rd party tools for all the vendor related information, I am thinking:


1) Have a web application built on Django (Without knowing much of Python).

2) Have a camelot desktop application for each of our vendors or optionally an appropriately previleged admin page on Django web app itself. Whichever suits well. Not everyone has Internet connection :)

Lets see how things roll out there. So where do I start. No surprise there! Start with Django developer documentation!! He He!