I can create seperate branches and do three seperate pull request for these features if you want, but there's only three commits, so I'll put them all in here for now :p
I wanted your library to do some things it didn't already:
My project doesn't have feincms and so the way you check if it exists fails when it hasn't been defined yet.
Make it possible to specify import paths to markup types in my settings.py
It would seem when I import markupmirror in my settings.py to register a markup type there, your code imports my settings and it all fails.
So I've made it so that you can specify import paths that are resolved by the markup pool.
As part of this change it was necessary to make the conditional registration a bit more declarative and so I added a "requires" functionality to markup types where they say what libraries are required and markup pool will try to import them and only register the markup type if all the requirements could be fullfilled.
I wanted to access some extra POST variables when doing my conversion which meant access to the request object.
This change is questionable.
I've made it so that __call__ for the markup type will be given a request object by the preview view and it will pass request onto convert, before_convert and after_convert, only if they take a request parameter.
Update:: I've added another couple commits that does a similar thing to what I did with passing the request onto the converters so that I can get the instance of the model being saved when a markup is being called because we saved a model.
@Stephen Moore, I just checked your pull request now, and got some quesions / feedback:
FeinCMS check is great.
I agree with your changes, but I'll make some small changes to your code. That will take a while, but hopefully not too long.
Can you explain, why you need access to the request during text conversion? Wouldn't it be possible to register custom converters (e.g. multiple different Markdown converters) for different usecases? I do not really like to use the inspect module there. If you have a good reason, it might be better to just change the API of the BaseMarkup class, to include the request (and optionally args/kwargs) for all conversion methods.
For the changes we should have some tests. As soon I have your answer, I will update them a bit.
Apart from that, I think markupmirror should be updated to support Python 3, Django 1.5 and the newer versions of textile, markdown, docutils and FeinCMS - also it should use the new version of Codemirror.
I am currently not using markupmirror myself in any of my projects, so my motivation is a bit low. Are you interested in putting some time into it?
Yeah, I was a bit lax with making tests, sorry about that :p
also, unfortunately, I'm only using this for a hobby like project of mine, so my available time for doing much more to this is tiny...