Django – get database configuration name in multi database settings

I’m very new in Python and Django programming. Recently I was writing a migration script to copy data across databases. Each database was in different machine and I’ve all the configurations in settings.py under different label like ‘default’, ‘staging’, ‘production’ etc.

While the migration was working almost fine, I was getting an error like the following during saving associated objects.

ValueError: Cannot assign "": instance is on database "staging", value is on database "default"

Continue reading →

Best flash charting script!

Uses of  flash chart is getting popularity day by day. Many medium to big web applications may use flash chart. But small application may ignore it due to complexities of implemention of flash chart. Even some web developers may not familiar with flash to make flash chart.

To make it easy, there are several open source and free of cost flash charting scripts that can be imported in your application. One of them is the  Open Flash Chart. So far I have seen, it is the best flash charting script which is very easy to implement. Moreover it supports many languages like PHP (4 & 5),  .NET, Java, Perl, Python etc. It provides the library files and examples which will understand very easily.

So test it now, and import it in your next project and impress your client.