[SciPy-Dev] SciPy Central: Using Class based views, in-memory for creating repos, ajax previewing

Surya kasturi.surya at gmail.com
Tue Apr 29 00:17:53 EDT 2014


Hello all,

Its been quite much time I emailed in the community.

Currently I am working on rewriting "scipy_central/submission" module
which seems to be quite messy.

The major changes to the present version of it are to be followed:

1. Rewrite `create new submission`, `edit submission` views using
django's class based views. They provide much API to automate several
things! [on the way]

2. The preview of restructured text is done by ajax [done but not committed]

3. The syntax highlight of written source code is done using
javascript (Ace editor) which technically eliminates the usage of
`Pygments` module
This editor provides much capabilities [in master]

4. This app also stores submitted data in file system as Hg
repositories apart from storing in database. The current module simply
handles operations directly on file system, and doesn't take care of
errors raised during the process which means there might be several
temporary, unused, broken folders in the file system being not used
anymore.

My idea is to first do all the process in-memory and only save at last
when no errors arise. It has to be noted that the following data to be
handled by in-memory

1. created Hg repo files
2. Submitted snippet file / zip-file (limit of 25 Mb)

I am doubtful whether using in-memory would be a good idea or not in
this case! It would be great if anyone suggests.

Looking forward your comments

Thanks



More information about the SciPy-Dev mailing list