django admin_tools et file edition

28 views
Skip to first unread message

vassilux

unread,
Mar 31, 2016, 12:52:47 PM3/31/16
to Django users
Hi alls,
It is my first django project and   I look for a solution to edit files, for exemple allow to an "advanced user" editing configuration files.


I looked into django-ckeditor  but it is not clear for the moment

Where  I can look for informations / examples ?


Thanks





Alex Heyden

unread,
Mar 31, 2016, 4:31:44 PM3/31/16
to django...@googlegroups.com
CKEditor is appropriate for files that need solid typography and formatting. If you're looking for something simpler, Markdown is a common solution. Markdown is a markup syntax widespread on internet forums.

None of those really address "configuration files," though. Is fancy formatting actually the problem you're trying to solve? Are you trying to find a way to save and edit files on a hard drive? Save text to a database to affect the behavior of your website? Something else?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5d9fda07-2a03-4fe9-8046-e853fd616943%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vassilux

unread,
Apr 1, 2016, 3:13:28 AM4/1/16
to Django users
One part of the configuration can be loaded from the database and it works well. 

I have to edit some files of asterisk ipbx.
 
May be I can overload save / load methodes of djaongo model ?

Or make a "service for file " into server side of my application, à la "restful"  ?

Alex Heyden

unread,
Apr 1, 2016, 12:29:10 PM4/1/16
to django...@googlegroups.com
Ignoring security concerns for a moment, you could make a view that loads a file (using the standard os library) and passes the contents to a textarea in a template if the request has the GET method, and saves the contents back to the file if the request has the POST method.

Reply all
Reply to author
Forward
0 new messages