Dave Dash

python: relative paths

Tagged: programming, php, python, django, __FILE__

So I started yesterday with Django, and I decided I didn't want to futz with creating another mysql database that I'd need to manage, etc. Instead I'll just use sqlite.

I wanted to keep my sqlite database within my project regardless of where I might move my project later. So I did this:

I confused a lot of people on IRC, but it's really quite easy:

So really all we were doing is creating a relative path, but setting it absolutely.