python - How to make django task.py code editable in admin panel? -


i have functions tasks in tasks.py file in django , want able edit code of each task in administration panel. there way of doing this. if possible, able add more tasks in tasks.py file directly through administration panel without having go tasks.py file add new task function. if can point me in right direction, appreciated.

as peter saying bad idea. if must it, below 1 might little better:

create view render form, user can choose task name, class name, , text area write function or task (or) totally new task.py (as per requirement).

once submitted, in backend check pep8 code formatting , (having copy of entire source code in server/somewhere) , copy new file there , run python manage.py shell basic sanitize code.

restrict access form based on users model (users).

again peter saying totally spectacular security hole.


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -