documentation and setup.py
This commit is contained in:
		
							
								
								
									
										90
									
								
								README.md
									
									
									
									
									
								
							
							
						
						
									
										90
									
								
								README.md
									
									
									
									
									
								
							@ -16,13 +16,91 @@ Platform to manage a radio, schedules, website, and so on. We use the power of g
 | 
			
		||||
* **cms**: defines models and templates to generate a website connected to Aircox;
 | 
			
		||||
 | 
			
		||||
## Installation
 | 
			
		||||
For now, we provide only applications availables under the aircox directory. Create a django project, and add the aircox applications directory.
 | 
			
		||||
### Dependencies
 | 
			
		||||
Python modules:
 | 
			
		||||
* `django-taggits`: `aircox.programs`, `aircox.cms`
 | 
			
		||||
* `watchdog`: `aircox.programs` (used for files monitoring)
 | 
			
		||||
* `wagtail`: `aircox.cms`
 | 
			
		||||
* `django-honeypot`: `aircox.cms`
 | 
			
		||||
* `dateutils`: `aircox.programs` (used for tests)
 | 
			
		||||
 | 
			
		||||
Later we would provide a package, but now we have other priorities.
 | 
			
		||||
Applications:
 | 
			
		||||
* `liquidsoap`: `aircox.controllers` (generation of the audio streams)
 | 
			
		||||
 | 
			
		||||
### settings.py
 | 
			
		||||
Base configuration:
 | 
			
		||||
 | 
			
		||||
    ```python
 | 
			
		||||
    INSTALLED_APPS = (
 | 
			
		||||
        # dependencies
 | 
			
		||||
        'wagtail.wagtailforms',
 | 
			
		||||
        'wagtail.wagtailredirects',
 | 
			
		||||
        'wagtail.wagtailembeds',
 | 
			
		||||
        'wagtail.wagtailsites',
 | 
			
		||||
        'wagtail.wagtailusers',
 | 
			
		||||
        'wagtail.wagtailsnippets',
 | 
			
		||||
        'wagtail.wagtaildocs',
 | 
			
		||||
        'wagtail.wagtailimages',
 | 
			
		||||
        'wagtail.wagtailsearch',
 | 
			
		||||
        'wagtail.wagtailadmin',
 | 
			
		||||
        'wagtail.wagtailcore',
 | 
			
		||||
        'wagtail.contrib.settings',
 | 
			
		||||
        'taggit',
 | 
			
		||||
        'honeypot',
 | 
			
		||||
 | 
			
		||||
        # ...
 | 
			
		||||
 | 
			
		||||
        # aircox
 | 
			
		||||
        'aircox.programs',
 | 
			
		||||
        'aircox.controllers',
 | 
			
		||||
        'aircox.cms',
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    MIDDLEWARE_CLASSES = (
 | 
			
		||||
        # ...
 | 
			
		||||
        'wagtail.wagtailcore.middleware.SiteMiddleware',
 | 
			
		||||
        'wagtail.wagtailredirects.middleware.RedirectMiddleware',
 | 
			
		||||
    )
 | 
			
		||||
 | 
			
		||||
    TEMPLATES = [
 | 
			
		||||
        {
 | 
			
		||||
            # ...
 | 
			
		||||
            'OPTIONS': {
 | 
			
		||||
                'context_processors': (
 | 
			
		||||
                    # ...
 | 
			
		||||
                    'wagtail.contrib.settings.context_processors.settings',
 | 
			
		||||
                ),
 | 
			
		||||
            },
 | 
			
		||||
        },
 | 
			
		||||
    ]
 | 
			
		||||
 | 
			
		||||
    # define your wagtail site name
 | 
			
		||||
    WAGTAIL_SITE_NAME = 'My Radio'
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
To enable logging:
 | 
			
		||||
 | 
			
		||||
    ```python
 | 
			
		||||
    LOGGING = {
 | 
			
		||||
        # ...
 | 
			
		||||
        'loggers': {
 | 
			
		||||
            'aircox.core': {
 | 
			
		||||
                'handlers': ['console'],
 | 
			
		||||
                'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
 | 
			
		||||
            },
 | 
			
		||||
            'aircox.test': {
 | 
			
		||||
                'handlers': ['console'],
 | 
			
		||||
                'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
 | 
			
		||||
            },
 | 
			
		||||
            'aircox.tools': {
 | 
			
		||||
                'handlers': ['console'],
 | 
			
		||||
                'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
 | 
			
		||||
            },
 | 
			
		||||
        },
 | 
			
		||||
    }
 | 
			
		||||
    ```
 | 
			
		||||
 | 
			
		||||
Each application have a `settings.py` that defines options that can be reused in application's `settings.py` file.
 | 
			
		||||
 | 
			
		||||
Dependencies:
 | 
			
		||||
* wagtail (cms)
 | 
			
		||||
* honeypot (cms)
 | 
			
		||||
* taggit (cms, programs)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -28,7 +28,7 @@ import aircox.controllers.settings as settings
 | 
			
		||||
from aircox.controllers.plugins.plugins import Plugins
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
logger = logging.getLogger('aircox.controllers')
 | 
			
		||||
logger = logging.getLogger('aircox.core')
 | 
			
		||||
 | 
			
		||||
Plugins.discover()
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -1,7 +1,7 @@
 | 
			
		||||
Django>=1.9a1
 | 
			
		||||
django-taggit>=0.12.1
 | 
			
		||||
django-suit>=0.2.15
 | 
			
		||||
django-autocomplete-light>=2.2.8
 | 
			
		||||
easy-thumbnails>=2.2
 | 
			
		||||
watchdog>=0.8.3
 | 
			
		||||
wagtail>=1.5.3
 | 
			
		||||
django-honeypot>=0.5.0
 | 
			
		||||
dateutils>=0.6.6
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user