{ "info": { "author": "Grzegorz T\u0119\u017cycki", "author_email": "grzegorz.tezycki@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Framework :: Django", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Topic :: Utilities" ], "description": "django-admin-shell\n------------------\n\n.. image:: https://travis-ci.org/djk2/django-admin-shell.svg?branch=master\n :target: https://travis-ci.org/djk2/django-admin-shell\n\n.. image:: https://requires.io/github/djk2/django-admin-shell/requirements.svg?branch=master\n :target: https://requires.io/github/djk2/django-admin-shell/requirements/?branch=master\n :alt: Requirements Status\n\n\nDjango application can execute python code in your project's environment on django admin site.\nYou can use similar as `python manage shell` without reloading the environment.\n\n\n* Tested by tox with:\n - Python :2.7, 3.4\n - Django : 1.9, 1.10, 1.11, 2.0-dev\n\n* Require:\n - Django >= 1.9\n\n* Tested on browsers\n - OK - Firefox 50.1.0 - Ubuntu 14.04\n - OK - Firefox 31.1 - CentOS 6.4\n - OK - Chromium 53.0 - Ubuntu 14.04\n - OK - Microsoft Edge 38 - Windows 10\n - OK - Internet Explorer 11.0 - Windows 8.1\n - OK - Internet Explorer 10.0 - Windows 7\n - OK - Internet Explorer 9.0 - Windows 7\n - ERR - Internet Explorer 8.0 - Windows 7 (javascripts not working / console work properly)\n\n\n\nScreens\n-------\n.. image:: https://raw.githubusercontent.com/djk2/django-admin-shell/master/doc/static/screen1.png\n :alt: Django admin shell view\n\n\n\nInstall\n--------\n\n1. Install::\n\n pip install django-admin-shell\n\n or\n\n pip install git+https://github.com/djk2/django-admin-shell.git\n\n or after download zip\n\n pip install django-admin-shell.zip\n\n\n2. Add `django_admin_shell` to your INSTALLED_APPS setting\n\n *settings.py* ::\n\n INSTALLED_APPS = [\n ...\n 'django_admin_shell',\n ...\n ]\n\n3. Add the `django_admin_shell` urls to your root url patterns (above admin/) :\n\n *urls.py* ::\n\n urlpatterns = [\n url(r'^admin/shell/', include('django_admin_shell.urls')),\n ...\n url(r'^admin/', admin.site.urls),\n ]\n\n\nUsage\n------\n* shell is available on url: **/admin/shell**\n* On default settings user must be authenticated to django admin site and\n User must have superuser permission and DEBUG mode must be set on True.\n\n.. note::\n\n Make sure that in your project session is enable\n\n More about session and how enabling session read here :\n https://docs.djangoproject.com/en/dev/topics/http/sessions/\n\n Usualy default session in django project is enable\n\nSettings\n---------\n\nADMIN_SHELL_ENABLE\n^^^^^^^^^^^^^^^^^^^\n*type* : **bool**\n\n*default* : **True**\n\nIf shell is enable or disable. When application is disable then url: /admin/shell return Http404 Not found\n\n\nADMIN_SHELL_ONLY_DEBUG_MODE\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n*type* : **bool**\n\n*default* : **True**\n\nIf flag is set on True, then shell is available only in DEBUG mode.\n\nIf debug mode is required and debug mode is disabled then url: /admin/shell will return Http 403 Forbidden\n\nADMIN_SHELL_ONLY_FOR_SUPERUSER\n^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n*type* : **bool**\n\n*default* : **True**\n\nIf flag is set on True, then shell is available only for user with superuser permission.\n\nIf superuser is required and user not have permission then url: /admin/shell will return Http 403 Forbidden\n\nADMIN_SHELL_OUTPUT_SIZE\n^^^^^^^^^^^^^^^^^^^^^^^^\n*type* : **integer**\n\n*default* : **250**\n\nFlag determines how many outputs can be remember.\n\n\n\nADMIN_SHELL_SESSION_KEY\n^^^^^^^^^^^^^^^^^^^^^^^^\n*type* : **string**\n\n*default* : **django_admin_shell_output**\n\nName for key in session where is stored history last executed codes.\n\n\nCode examples\n-------------\n\n* show django settings::\n\n from django.conf import settings\n\n for key in dir(settings):\n val = getattr(settings, key, None)\n print(key, \"=\", val)\n\n\n* run command in operating system and take output::\n\n import os\n\n os.system('date > /tmp/admin_console.tmp')\n os.system('echo ------- >> /tmp/admin_console.tmp')\n os.system('who >> /tmp/admin_console.tmp')\n os.system('echo ------- >> /tmp/admin_console.tmp')\n os.system('ps aux | grep python >> /tmp/admin_console.tmp')\n\n with open('/tmp/admin_console.tmp', 'r') as f:\n print(f.read())\n\n\n* run big python code (get python source from website)::\n\n import requests\n\n req = requests.get('http://foo.bar.com/example.py')\n if req.status_code == 200:\n code = req.text\n print(code, '\\n------------\\n')\n exec(code)\n\n\nUseful for me:\n---------------\n* https://docs.djangoproject.com/\n* https://jquery.com/\n* http://alan.blog-city.com/jquerylinedtextarea.htm\n\nSimilar projects:\n-----------------\n* https://github.com/onrik/django-webshell", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/djk2/django-admin-shell", "keywords": "django admin shell console terminal", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "django-admin-shell", "package_url": "https://pypi.org/project/django-admin-shell/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-admin-shell/", "project_urls": { "Homepage": "https://github.com/djk2/django-admin-shell" }, "release_url": "https://pypi.org/project/django-admin-shell/0.1/", "requires_dist": [ "Django (>=1.9)" ], "requires_python": "", "summary": "", "version": "0.1" }, "last_serial": 2603968, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "732c928b82ae2ad069a6e72d03e49847", "sha256": "aa46e0313a1b87d21c4f715abbcb37ffe03ac1948abaa412e7d44082c817b46a" }, "downloads": -1, "filename": "django_admin_shell-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "732c928b82ae2ad069a6e72d03e49847", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 184588, "upload_time": "2017-01-28T19:00:02", "url": "https://files.pythonhosted.org/packages/90/95/8521ecf7d8245e3649447ba8ce4b260248fc36de2bf18c4ee66234ebec2f/django_admin_shell-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c86468d4332a950bf3535c732f85ce77", "sha256": "8a8588ab1ebdfe226dfa9e11d5b58ab34808ed673e03bbcfc6be9e5b2e666a19" }, "downloads": -1, "filename": "django-admin-shell-0.1.tar.gz", "has_sig": false, "md5_digest": "c86468d4332a950bf3535c732f85ce77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9406, "upload_time": "2017-01-28T19:00:05", "url": "https://files.pythonhosted.org/packages/2e/7d/d929dd2d0a1a5e508f2828800ba88f14a551c5aea9f9c50977fa04b9ffa4/django-admin-shell-0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "732c928b82ae2ad069a6e72d03e49847", "sha256": "aa46e0313a1b87d21c4f715abbcb37ffe03ac1948abaa412e7d44082c817b46a" }, "downloads": -1, "filename": "django_admin_shell-0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "732c928b82ae2ad069a6e72d03e49847", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 184588, "upload_time": "2017-01-28T19:00:02", "url": "https://files.pythonhosted.org/packages/90/95/8521ecf7d8245e3649447ba8ce4b260248fc36de2bf18c4ee66234ebec2f/django_admin_shell-0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c86468d4332a950bf3535c732f85ce77", "sha256": "8a8588ab1ebdfe226dfa9e11d5b58ab34808ed673e03bbcfc6be9e5b2e666a19" }, "downloads": -1, "filename": "django-admin-shell-0.1.tar.gz", "has_sig": false, "md5_digest": "c86468d4332a950bf3535c732f85ce77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9406, "upload_time": "2017-01-28T19:00:05", "url": "https://files.pythonhosted.org/packages/2e/7d/d929dd2d0a1a5e508f2828800ba88f14a551c5aea9f9c50977fa04b9ffa4/django-admin-shell-0.1.tar.gz" } ] }