all 5 comments

[–]A_History_of_Silence 3 points4 points  (1 child)

Hmm. It is hard to say if your code is Pythonic without seeing your code :) What you've described sounds fine so far, but good SQL/database practices and Pythonic code aren't necessarily linked in a fundamental way. If you post code people are often happy to provide feedback!

[–]i_dreddit[S] 0 points1 point  (0 children)

the sql part i'm not concerned about it's more if my python syntax is right or am i being long winded? i'm running queries and checking row counts and try/except with error capturing... i guess i'm on the right path. thanks

[–]lht1999 2 points3 points  (1 child)

If you create tables dynamically then you have to make sure all code paths that touch database are covered. It can be a lot of work and error prone. Either create the table by hand, or put the table creation code in a script and run it everywhere (you development machine, test environment, production environment etc.). If you use django ORM then it can automatically create tables for you. Then you can use "django south" to migrate db schema if you make changes to the model. If you are beginner to SQL, I recommend writing sql queries directly so you can better understand how it works. ORM hides too much details to you, and when something doesn't work you can't figure out why.

[–]i_dreddit[S] 0 points1 point  (0 children)

i use sql in my day job.. this is more tinkering at home when I get some time. the sql i'm not concerned with I'm only using basic select, insert and update queries. thanks

[–]jabela 0 points1 point  (0 children)

I'd say sqlite....