[aur-dev] AUR2 directory structure

Sebastian Nowicki xilonmu at gmail.com
Sat Jan 5 12:56:29 EST 2008

I'd like to implement saving files to disk, but to do so I first need to
decide on the directory structure.

Django's FileField model field wants to upload files relative to
MEDIA_ROOT[1]. Since I'm currently using the main site's CSS and images
directly, MEDIA_ROOT hasn't been used yet. To simplify the problem I
think it's best to simply ignore the fact that there may be an SCM
backend. We should just focus on the relative directory structure.

The easy way to go would be dumping everything into
MEDIA_ROOT/repository/package_name/ (possible using
MEDIA_ROOT/packages/...). It's simple and easy to navigate. The
directory would hold the PKGBUILD, and source or install files and the
tarball. The files would be accessible via
MEDIA_URL/[packages/]repository/package_name/, with packages/ being

I'm not sure that using MEDIA_ROOT is a good idea since, if we
eventually get some, images and CSS files, etc. would also go into it,
so it seems a bit odd. Also if we do choose to go with an SCM like
subversion then it would most likely have to be separated from the
MEDIA_ROOT. I'm not sure if overloading this behaviour of the FileField
is possible, so we may simply need to use a CharField and do anything,
that FileField does for us, manually.

For those familiar with the current AUR code, how does AUR do it? Does
it even store the source file separately? And how does the main site
handle it?

[1] http://www.djangoproject.com/documentation/model-api/#filefield

More information about the aur-dev mailing list