https://github.com/sophilabs/django-tatujs
Integration of TatuJS with Django.
https://github.com/sophilabs/django-tatujs
unmaintained
Last synced: 7 months ago
JSON representation
Integration of TatuJS with Django.
- Host: GitHub
- URL: https://github.com/sophilabs/django-tatujs
- Owner: sophilabs
- License: mit
- Created: 2013-10-07T15:16:36.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2017-05-17T17:32:30.000Z (over 8 years ago)
- Last Synced: 2025-02-08T14:45:13.108Z (9 months ago)
- Topics: unmaintained
- Language: HTML
- Homepage:
- Size: 37.1 KB
- Stars: 0
- Watchers: 25
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# django-tatujs
[](http://unmaintained.tech/)
Integration of [TatuJS](https://github.com/sophilabs/tatujs) with Django.
## Installation
Run the included ```setup.py```.
## Configuration
### 1. Enable the middleware
Add ```tatujs.middleware.ExtractorMiddleware``` to your ```MIDDLEWARE_CLASSES``` setting in your django project.
### 2. Configure TatuJS
#### Example configuration:
```js
// The middleware included will look for this HTTP header.
tatu.configuration.headerName = 'X-Source'; // <= Sources header
tatu.configuration.extractor = 'silent';
tatu.configuration.reload = false;
tatu.configuration.targetSymbol = '>>';
tatu.configuration.concurrency = 42;
tatu.configuration.sources = {
/*
* Pages of the menu
*/
'.navbar a': {
'loader': 'html',
'selectors': 'title,.container,.navbar',
'handlers': 'title,outer,history,inspect,event',
'cache': 'object',
'sources': {
'img': {
'loader': 'image'
},
'video': {
'loader': 'video',
'minBuffered': 10
}
}
},
/*
* Tabs inside Page 0
*/
'.tatu-tabs a': {
'loader': 'html',
'selectors': 'title,.tatu-tab-content,.tatu-tabs',
'handlers': 'title,outer,inspect,event',
'cache': 'object'
}
};
```
## Example
An example is included. Enable the middleware, add ```tatujs.demo``` to your ```INSTALLED_APPS```, and add the following to your main urlconf.
```
url(r'^demo/', include('tatujs.demo.urls')),
```
## License
django-tatujs is Copyright (c) 2017 sophilabs, inc. It is free software, and may be
redistributed under the terms specified in the [license](/LICENSE) file.
## About
[](https://sophilabs.co)
django-tatujs is maintained and funded by sophilabs, inc. The names and logos for
sophilabs are trademarks of sophilabs, inc.