{ "info": { "author": "Antoine Martin", "author_email": "antoine@openance.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Operating System :: Microsoft :: Windows", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: System :: Installation/Setup" ], "description": "Django-windows-tools\n====================\n\ndjango-windows-tools is a Django application providing management commands to host Django projects in Windows environments.\n\nIt provides management commands allowing to:\n\n- Host a Django application behind IIS as a FastCGI application (requires IIS 7 and Up).\n- Run Celery and Celery Beat background processes as a Windows Service.\n\nIt requires Django >= 1.4 and pywin32.\n\nCompatibility notes\n-------------------\n\n- django-windows-tools 0.1.3 is the last version to work with Django <= 1.7\n- the ``win_fcgi`` part is known to work with Django versions up to 1.11 and Python 3.6 (django-windows-tools 0.2 needed), and works with IIS up to version 10\n- installing services with newer versions of Django and Python 3 is not tested and may not work (see also the open issues)\n- newer Celery versions cannot be installed as a service as described (see #19)\n\nThe following gives a Quick overview of the project. For more information, please\nread the `Project documentation `_.\n\nInstallation and Configuration\n##############################\n\nYou install the application with the command: ::\n\n pip install django-windows-tools\n\nOr you may install the latest development version for more fixed bugs: ::\n\n pip install git+https://github.com/antoinemartin/django-windows-tools@master\n\nEnable the ``django_windows_tools`` application to be able to use the management commands. Add the app to\nthe project's list in ``settings.py``: ::\n\n INSTALLED_APPS += (\n 'django_windows_tools',\n )\n \nFastCGI Configuration\n#####################\n\nPre-requisites\n--------------\n\nOn the host machine, you need to have :\n\n- IIS 7 or better installed and running.\n- The ``CGI`` module installed.\n\nTo host your Django project under ``IIS`` with the binding ``www.mydjangoapp.com``, \nyou need first to collect your static files with the command: ::\n\n D:\\sites\\mydjangoapp> python manage.py collectstatic\n\nAnd then run the following command with Administrator privileges : ::\n\n D:\\sites\\mydjangoapp> python manage.py winfcgi_install --binding=http://www.mydjangoapp.com:80\n\nThe command will do the following:\n\n- Create the FastCGI application to serve your Django application dynamic content.\n- Create a site name ``mydjangoapp`` with the ``www.mydjangoapp.com`` binding pointing to the root of your project.\n- Install a ``web.config`` file in the root of the project that handles the \n redirection of requests to the Django application.\n- Create if needed a virtual directory to handle the serving of your static files through ``IIS``.\n\nTo remove the site created with the preceding command, type: ::\n\n D:\\sites\\mydjangoapp> python manage.py winfcgi_install --delete\n\nthe ``winfcgi_install`` command provides numerous options. To list them, type: ::\n\n D:\\sites\\mydjangoapp> python help winfcgi_install\n \nMore information on how the configuration is done is provided in \nthis `Blog post `_.\n\nRunning Celery or other Background commands as a Windows Service\n################################################################\n\nWith the application installed, on the root of your project, type the following command: ::\n\n D:\\sites\\mydjangoapp> python manage.py winservice_install\n \nIt will create two files, ``service.py`` and ``service.ini`` in the \nroot directory of your project. The first one will help you install,\nrun and remove the Windows Service. Ther later one contain the list of \nthe management commands that will be run by the Windows Service.\n\nConfiguration\n-------------\n\nThe ``service.ini`` is a configuration file that looks like the following: ::\n\n [services]\n # Services to be run on all machines\n run=celeryd\n clean=d:\\logs\\celery.log\n\n [BEATSERVER]\n # There should be only one machine with the celerybeat service\n run=celeryd celerybeat\n clean=d:\\logs\\celerybeat.pid;d:\\logs\\beat.log;d:\\logs\\celery.log\n\n [celeryd]\n command=celeryd\n parameters=-f d:\\logs\\celery.log -l info\n\n [celerybeat]\n command=celerybeat\n parameters=-f d:\\logs\\beat.log -l info --pidfile=d:\\logs\\celerybeat.pid\n\n [runserver]\n # Runs the debug server and listen on port 8000\n # This one is just an example to show that any manage command can be used\n command=runserver\n parameters=--noreload --insecure 0.0.0.0:8000\n\n [log]\n filename=d:\\logs\\service.log\n level=INFO\n\nThe ``services`` section contains :\n\n- The list of background commands to run in the ``run`` directive.\n- The list of files to delete when refreshed or stopped in the ``clean`` directive.\n\nYou can have several ``services`` sections in the same configuration file\nfor different host servers. The Windows Service will try to find the section which name\nmatches the name of the current server and will fallback to the ``services`` section if it\ndoes not find it. This allows you to deploy the same configuration file on serveral \nmachines but only have one machine run the celery beat background process. In the preceding\nconfiguration, only the server named ``BEATSERVER`` will run the ``celerybeat`` command.\nThe other ones will only run the ``celeryd`` command.\n\nFor each command name specified in the ``run`` directive, there must be a matching configuration\nsection. The section contains two directives:\n\n- ``command`` specifies the ``manage.py`` command to run.\n- ``parameters`` specifies the parameters to the command.\n\nIn the previous configuration file, the ``celeryd`` configuration will spawn a process \nthat will run the same command as : ::\n\n D:\\sites\\mydjangoapp> python manage.py celeryd -f d:\\logs\\celery.log -l info\n\nLastly, the ``log`` section defines the log level and the the log destination file\nfor the Windows Service.\n\nInstallation and start\n----------------------\n\nThe windows service is installed with the following command (run with\nAdministrator privileges) : ::\n\n D:\\sites\\mydjangoapp> python service.py --startup=auto install\n \nIt is started and stopped with the commands: ::\n\n D:\\sites\\mydjangoapp> python service.py start\n D:\\sites\\mydjangoapp> python service.py stop\n \nIt can be removed with the following commands: ::\n\n D:\\sites\\mydjangoapp> python service.py remove\n \nThe Windows Service monitor changes to the ``service.ini`` configuration\nfile. In case it is modified, the service does the following:\n\n- Stop the background processes.\n- Reread the configuration file.\n- Start the background processes.\n\nCustomization\n------------- \n \nThe ``winservice_install`` management command provides several options\nallowing to customize the name of the web service or of the script name.\nTo obtain information about them, type: ::\n\n D:\\sites\\mydjangoapp> python manage.py help winservice_install\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/antoinemartin/django-windows-tools", "keywords": "Django Windows", "license": "", "maintainer": "", "maintainer_email": "", "name": "django-windows-tools", "package_url": "https://pypi.org/project/django-windows-tools/", "platform": "", "project_url": "https://pypi.org/project/django-windows-tools/", "project_urls": { "Homepage": "https://github.com/antoinemartin/django-windows-tools" }, "release_url": "https://pypi.org/project/django-windows-tools/0.2.1/", "requires_dist": null, "requires_python": "", "summary": "Helper Management commands to host Django applications on Windows Servers.", "version": "0.2.1" }, "last_serial": 3591899, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "5992c71668fdc91ef8624dd8d53150fa", "sha256": "746f50a50346aab54d10a6c3df084303eb1fdecf28514d9802f9be2b661840ad" }, "downloads": -1, "filename": "django-windows-tools-0.1.win32.exe", "has_sig": false, "md5_digest": "5992c71668fdc91ef8624dd8d53150fa", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 228678, "upload_time": "2012-07-03T18:45:35", "url": "https://files.pythonhosted.org/packages/28/6b/3835f92e6dd4bb2acb259e2876864fbe1625170d8722d8d397fda0b375b0/django-windows-tools-0.1.win32.exe" }, { "comment_text": "", "digests": { "md5": "a982e91e1075038ccd6a6a9793cfd8ef", "sha256": "e1d6818ed0a104e96fca592c33f11aae4146549cb25cb24b7b09940cb6596467" }, "downloads": -1, "filename": "django-windows-tools-0.1.zip", "has_sig": false, "md5_digest": "a982e91e1075038ccd6a6a9793cfd8ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30495, "upload_time": "2012-07-03T18:16:36", "url": "https://files.pythonhosted.org/packages/73/b8/9cb9232b883c9c20d53299bc359a46d25ae268341b7c8fb806c3fce663e8/django-windows-tools-0.1.zip" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "da4deea8ff452e14c2d644e7030c10a0", "sha256": "f9d41bfa2d2b46dddc4e5dbca75fd3bbb3f5345018ac8768bbc4ad9631c543f9" }, "downloads": -1, "filename": "django-windows-tools-0.1.1.tar.gz", "has_sig": false, "md5_digest": "da4deea8ff452e14c2d644e7030c10a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24396, "upload_time": "2016-11-23T22:08:27", "url": "https://files.pythonhosted.org/packages/86/5c/c42267a6d6bb7db958bc88800ba6f4cadc5f1f440ae29a67e60594a596b6/django-windows-tools-0.1.1.tar.gz" }, { "comment_text": "", "digests": { "md5": "37bfdfb1c9270abdc3a24cd9babcc312", "sha256": "01023c6c704379a701a9a1147458528a363000b5fd777f9f6a9d73072a80e213" }, "downloads": -1, "filename": "django-windows-tools-0.1.1.win32.exe", "has_sig": false, "md5_digest": "37bfdfb1c9270abdc3a24cd9babcc312", "packagetype": "bdist_wininst", "python_version": "any", "requires_python": null, "size": 230655, "upload_time": "2012-08-18T08:09:11", "url": "https://files.pythonhosted.org/packages/00/31/77fdc12fb1d2ed189bd8bec12d4a861813b5ace80cda18ac1850aae7dd84/django-windows-tools-0.1.1.win32.exe" }, { "comment_text": "", "digests": { "md5": "687c448ac1016df1ba5712a915fec1b9", "sha256": "2f55b62224fe603cf54a63af31a91f31d63d1a9357ba82cf3ac6d6759b115dd8" }, "downloads": -1, "filename": "django-windows-tools-0.1.1.zip", "has_sig": false, "md5_digest": "687c448ac1016df1ba5712a915fec1b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 32737, "upload_time": "2012-08-18T08:04:40", "url": "https://files.pythonhosted.org/packages/87/1b/5c25422ec20b2ff1a6977db342ab9b7711a84f4df83ac8c8f4a8e749f181/django-windows-tools-0.1.1.zip" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "fe85b69dcd6f138c59c5a49eb393d6bb", "sha256": "a358a0f6025ddffe556fb5b47b25ce46aecad78b6b85924fe4faa896a31811e8" }, "downloads": -1, "filename": "django-windows-tools-0.1.2.tar.gz", "has_sig": false, "md5_digest": "fe85b69dcd6f138c59c5a49eb393d6bb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25060, "upload_time": "2016-11-23T22:11:24", "url": "https://files.pythonhosted.org/packages/ee/cc/18ec833952ccb8066569657617f8dd070feaa3ff5c529e14aafb834c38db/django-windows-tools-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8700b0cb2fd98e2945fd28ab451459a1", "sha256": "27bb0dfb04bb318562035695a0f56104864e7ce33275e7475e2b9fa31c88d15b" }, "downloads": -1, "filename": "django-windows-tools-0.1.3.zip", "has_sig": false, "md5_digest": "8700b0cb2fd98e2945fd28ab451459a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36282, "upload_time": "2017-01-15T16:19:07", "url": "https://files.pythonhosted.org/packages/eb/b6/4b0e34ccc26de822ead8d4084491b25092373fe9e4d0a221bf4931c68e30/django-windows-tools-0.1.3.zip" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "dc194aa77740b3bbded61118991aa401", "sha256": "80ffb1d3d0f6bd162fd57f65bfd0ab67f405e933066bfdd3e4fe653c9951af3c" }, "downloads": -1, "filename": "django-windows-tools-0.1.4.zip", "has_sig": false, "md5_digest": "dc194aa77740b3bbded61118991aa401", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 36254, "upload_time": "2017-02-15T18:10:59", "url": "https://files.pythonhosted.org/packages/99/6d/de51be8690cd95210f2b26f1a4b174f7e5bbeb1f5f5557c2f9ec19519596/django-windows-tools-0.1.4.zip" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "4cb614e386e84e3f4ba7a62db6a7b86e", "sha256": "8ded29b19e6880362cb85afc3030d4d551d58a9be2b531ebe8c1844ebbcce8a9" }, "downloads": -1, "filename": "django-windows-tools-0.2.tar.gz", "has_sig": false, "md5_digest": "4cb614e386e84e3f4ba7a62db6a7b86e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23902, "upload_time": "2017-05-17T19:55:59", "url": "https://files.pythonhosted.org/packages/a2/71/183439e7ecf98d2f76da6b026d2b6adc3ba441c3705707db48d901d277e9/django-windows-tools-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "64b3490a9b4b4abc55deadb16d0092fc", "sha256": "2d77f4babefbb5f381ce9b18ecb53134e9e2bf73c76b4b5f5bba7e7ece429283" }, "downloads": -1, "filename": "django-windows-tools-0.2.1.tar.gz", "has_sig": false, "md5_digest": "64b3490a9b4b4abc55deadb16d0092fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24123, "upload_time": "2018-02-17T21:07:37", "url": "https://files.pythonhosted.org/packages/4d/1c/f1ba120dbdcff91bb49f28f18cf64f1c3db9a25d5bb2363d4523b10f4733/django-windows-tools-0.2.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "64b3490a9b4b4abc55deadb16d0092fc", "sha256": "2d77f4babefbb5f381ce9b18ecb53134e9e2bf73c76b4b5f5bba7e7ece429283" }, "downloads": -1, "filename": "django-windows-tools-0.2.1.tar.gz", "has_sig": false, "md5_digest": "64b3490a9b4b4abc55deadb16d0092fc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24123, "upload_time": "2018-02-17T21:07:37", "url": "https://files.pythonhosted.org/packages/4d/1c/f1ba120dbdcff91bb49f28f18cf64f1c3db9a25d5bb2363d4523b10f4733/django-windows-tools-0.2.1.tar.gz" } ] }