django-server-config

Sagteware kiekie:
django-server-config
Sagteware besonderhede:
Weergawe: 0.1.3
Upload datum: 11 May 15
Ontwikkelaar: Alexander Ivanov
Lisensie: Gratis
Populariteit: 12

Rating: 3.5/5 (Total Votes: 2)

Django-bediener-config is 'n Django app nuttig vir aanwend bediener installasie.
- Voeg die bestuur opdrag om configs maak vir jou projek. Nou is dit kan config vir lighttpd, logrotate, monit genereer en te ontplooi skrifte.
- Erken outomaties media dopgehou in 3-party programme en neem hulle in ag neem.
Installasie:
In settings.py:
1. Plaas config jou INSTALLED_APPS.
2. Stel domein name vir jou projek
& Nbsp; CONFIG_SITES = ['www.project-name.com,]
3. Domains waarvoor jy wil aansture na jou webwerf
& Nbsp; CONFIG_REDIRECTS = ['project-name.com,]
4. Stel pad na media vir ongewone 3-party aansoek
& Nbsp; CONFIG_APP_MEDIA = {
& Nbsp; 'n aansoek-naam ': [
& Nbsp; ('media-wortel "," media-url',),
& Nbsp;]
& Nbsp;}
Dopgehou media met dieselfde naam as die aansoek modulde sal outomaties bygevoeg word. Byvoorbeeld, in tinymce module media lêers
tinymce /
& Nbsp; media /
& Nbsp; tinymce /
& Nbsp; js / tinymce.js
& Nbsp; css / style.css
sal beskikbaar wees by url wees
& Nbsp; /media/tinymce/js/tinymce.js /media/tinymce/css/style.js
In urls.py:
5. config om urls.py vir dien statiese lêers in debug modus Voeg. Voeg dit voor die django.views.static.serve
& Nbsp; as settings.DEBUG:
& Nbsp; urlpatterns + = patrone ('', (r '^', sluit in ('config.urls')))
In buildout.cfg:
6. As jy zc.buildout, kan jy voeg by jou dele make-config om konfigurasielêers outomaties maak:
& Nbsp; [make-config]
& Nbsp; resep = iw.recipe.cmd
& Nbsp; on_install = true
& Nbsp; on_update = true
& Nbsp;. Cmds = sudo rm-f bin / init.d bin / lighttpd bin / logrotate bin / monit bin / * py
& Nbsp; bin / Django make_config init.d> bin / init.d
& Nbsp; bin / Django make_config lighttpd> bin / lighttpd
& Nbsp; bin / Django make_config logrotate> bin / logrotate
& Nbsp; bin / Django make_config monit> bin / monit
& Nbsp; bin / Django make_config install.py> bin / install.py
& Nbsp; bin / Django make_config uninstall.py> bin / uninstall.py
& Nbsp; bin / Django make_config enable.py> bin / enable.py
& Nbsp; bin / Django make_config disable.py> bin / disable.py
& Nbsp; sudo chown wortel: wortel bin / *
& Nbsp; sudo chmod ug = rw, o = r bin / *
& Nbsp; sudo chmod ug = rwx, o = rx bin / init.d bin / Django bin / buildout
& Nbsp; eggo configs is gered om "bin /"
Staticfiles ondersteuning
Sedert 0.1.1 bediener-config ondersteun django.contrib.staticfiles en staticfiles apps. As een van hulle teenwoordig is in INSTALLED_APPS, sal config vir webbediener gegenereer met toepaslike herschrijfregel.
As staticfiles gebruik word is daar geen behoefte om config.urls in urlconf.py sluit. Aan die ander kant, sal waarskynlik jy wil staticfiles_urlpatterns () van staticfiles app sluit (sien: Django dokumentasie
& Nbsp; daaroor)
& Nbsp; uit django.contrib.staticfiles.urls invoer staticfiles_urlpatterns
& Nbsp; urlpatterns + = staticfiles_urlpatterns ()

Wat is nuut in hierdie release:

  • Nood lighttpd config fix (staticfiles didn ' t werk), gebruik nie v0.1.1!

Wat is nuut in weergawe 0.1.1:

  • Staticfiles ondersteun bygevoeg

Vereistes :

  • Python
  • Django

Ander sagteware ontwikkelaar Alexander Ivanov

Kommentaar te django-server-config

Kommentaar nie gevind
Kommentaar te lewer
Draai op die foto!