This one isn’t really django -related, but when doing local development work with django you may have to do some fancy folder aliasing to get your image-uploads working, for example.
Since Apache can’t read an OS X alias file, the solution is to create a symlink.
For some reason I’ve always found symlinks to be a bit tricky. I think they’re kind of finicky, needing to be just so in order to work.
- Open Terminal.
- cd into the directory where you want to create the alias.
ln -s /Users/USERNAME/dir/to/link/to/ aliasDir
It’s important that the first argument be an absolute path (i.e., don’t use “~”) and that it have a trailing “/” on the end. HOWEVER, make sure that “aliasDir” doesn’t have a trailing “/”.
- Good to go!
Learn UNIX with the excellent Sams series: Sam’s Teach Yourself UNIX in 24 hours