adzenith wrote:It would also be cool if identically-named files automatically had part of their path names added to their view names so that you could tell them apart.
that's exactly what I was working on. it's working but going to save the file will prompt you to choose where to save... making it much less seamless, even if I were to swap it back on post_save. Jon?

for anyone curious, my renaming method is as follows:
1. get the name of all views (I use a hack for this, but it should be in the api in the future

)
2. group any views with the same filename
3. find the common suffix of each group (by reversing and using os.path.commonprefix)
4. chop the common suffix, jump to the closest directory separator, hack the pathname based on conditions:
a) if there are one or more folders in the common suffix, prefix /.../ to the filename, otherwise prefix /
b) add the topmost folder name before this
this logic produces results as follows:
input:
1. foo/bar/common.py
2. foo/baz/common.py
3. bar/foo/common.py
output (instead of just showing common.py):
1. bar/common.py
2. baz/common.py
3. foo/common.py
input:
1. foo/common/__init__.py
2. bar/common/__init__.py
3. baz/common/__init__.py
output (instead of just showing __init__.py):
1. foo/.../__init__.py
2. bar/.../__init__.py
3. baz/.../__init__.py