django-server-config

Software screenshot:
django-server-config
Software informatie:
Versie: 0.1.3
Upload datum: 11 May 15
Ontwikkelaar: Alexander Ivanov
Licentie: Gratis
Populariteit: 12

Rating: 3.5/5 (Total Votes: 2)

django-server-config is een Django app nuttig voor het implementeren server installatie.
- Voegt beheer opdracht om configs te maken voor uw project. Nu kan het config voor lighttpd, logrotate, monit genereren en implementeren van scripts.
- Herkent automatisch media directories in 3-party applicaties en neemt ze rekening.
Installatie:
In settings.py:
1. Zet config uw INSTALLED_APPS.
2. Stel domeinnamen voor uw project
& Nbsp; CONFIG_SITES = ['www.project-name.com',]
3. domeinen waarvoor u doorverwijst naar uw site
& Nbsp; CONFIG_REDIRECTS = ['project-name.com',]
4. Stel pad naar media voor ongebruikelijke 3-party applicatie
& Nbsp; CONFIG_APP_MEDIA = {
& Nbsp; 'applicatie-naam': [
& Nbsp; ('media-root', 'media-url ",),
& Nbsp;]
& Nbsp;}
Mappen Media met dezelfde naam als de toepassing modulde worden automatisch toegevoegd. Bijvoorbeeld, in TinyMCE module mediabestanden
tinymce /
& Nbsp; media /
& Nbsp; tinymce /
& Nbsp; js / tinymce.js
& Nbsp; css / style.css
zal beschikbaar zijn op URL
& Nbsp; /media/tinymce/js/tinymce.js /media/tinymce/css/style.js
In urls.py:
5. config om urls.py te dienen statische bestanden in debug-modus toevoegen. Voeg het VOORDAT django.views.static.serve
& Nbsp; Als settings.DEBUG:
& Nbsp; urlpatterns + = patronen ('', (r '^', onder meer ('config.urls')))
In buildout.cfg:
6. Als u gebruik maakt zc.buildout, kunt u toevoegen aan uw onderdelen make-config om config bestanden automatisch te maken:
& Nbsp; [make-config]
& Nbsp; recept = 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 root: 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; echo Configs werden opgeslagen in "bin /"
Staticfiles support
Sinds 0.1.1 server-config ondersteunt django.contrib.staticfiles en staticfiles apps. Als een van hen aanwezig in INSTALLED_APPS zal config voor webserver worden gegenereerd met de juiste herschrijfregel.
Als staticfiles wordt gebruikt is het niet nodig om config.urls in urlconf.py omvatten. Aan de andere kant, waarschijnlijk wilt u staticfiles_urlpatterns () uit staticfiles app bevatten (zie: django documentatie
& Nbsp; over)
& Nbsp; van django.contrib.staticfiles.urls importeren staticfiles_urlpatterns
& Nbsp; urlpatterns + = staticfiles_urlpatterns ()

Wat is nieuw in deze release:

  • Emergency lighttpd config fix (staticfiles wist niet t werk), gebruik geen v0.1.1!

Wat is nieuw in versie 0.1.1:

  • Staticfiles ondersteuning toegevoegd

Eisen

  • Python
  • Django

Andere software van ontwikkelaar Alexander Ivanov

Reacties op django-server-config

Reacties niet gevonden
Commentaar toe te voegen
Zet op de beelden!