Package: django-textflow
========Textflow========Textflow is a simple Django app to animate texts. Texts slide randomly from the right to the left or reverse after thepage is loaded.1. Open the settings.py file, find the INSTALLED_APPS section and enable the app.INSTALLED_APPS = (...'textflow')2. Now create the database model.python manage.py migrate3. Start the development server and visit http://127.0.0.1:8000/admin/to create a few FlowObjects (you'll need the Admin app enabled).4. pen your views.py file and import the FlowObject model.from textflow.models import FlowObject5. Go to the view and pass the texts to the view by simply call the serialize method.def your_view(request):return render(request, 'template.html', {'texts': FlowObject.serialize(),})6. Then open your template.html file and add the the following two lines at the top.{% load staticfiles %}{% load textflow %}7. Add a link to the css file in your <head>:<link rel="stylesheet" type="text/css" href="{% static 'stylesheets/textflow.min.css' %}"/>8. Then, before the closing <body> tag add:<script type="text/javascript" src="{% static 'javascripts/jquery.textflow.min.js' %}"></script>9. Now call the textflow tag within the <body> tag where you want to show the texts:{% textflow texts %}10. In your javascript file then add the initializing code$(document).ready(function() {$(element).textFlow();});11. Start your server and visit http://127.0.0.1:8000/your_view/ and you should see the texts12. You can add multilingual texts by installing the django-modeltranslation app.Please refer to the official Django documentation for more information about translation.https://docs.djangoproject.com/el/1.10/topics/i18n/translation/Also refer to the official documentation of django-modeltranslationhttp://django-modeltranslation.readthedocs.io/en/latest/installation.htmlpip install django-modeltranslation13. Enable the app in settings.py:INSTALLED_APPS = (...'modeltranslation','textflow',)14. Update your models:python manage.py migrate15. SettingsOption | Type | Default | Description------ | ---- | ------- | -----------width | string/int: Any valid css unit | 100% | Sets the width in relation of the parent nodeheight | string/int: Any valid css unit | 200px | Sets the heighttop | string/int: Any valid css unit | 0 | Sets the top position within the parent nodeleft | string/int: Any valid css unit | 0 | Sets the left position within the parent nodemaxTexts | int | 15 | Sets the maximum amount of texts that are simultaneously shownmarginTop | int | 25 | The space in pixel between the top border and the textmarginBottom | int | 0 | The space in pixel between the bottom border and the texttexts | array | ['Add', ... 'here'] | The texts that are shown, ignored when using data-texts attributecolor | string: Any valid css unit | #000 | The text colorbackground | string: Any valid css unit | transparent | The background color of the canvas (This is actually not needed because the background of the textflow div can be set in css. However it might happen that this could be useful for some reason so it is there... :)font | string | sans-serif | The font family of the texts16. MethodsMethods are called on textflow instances:16.1 Get the instancevar textflow = $('.your-element').textFlow({options...});16.2 Stop textflowtextflow.stopTextFlow();16.3 Start textflowtextflow.startTextFlow();Method | Argument | Description------ | -------- | -----------startTextFlow | options : None | Start textflow if not activestopTextFlow | options : None | Stop textflow if active17. DependenciesjQuery 1.3Django 1.8**For multilingual support (Django only)**django-modeltranslation18. LicenseCopyright (c) 2014 Michael JüngerLicensed under the MIT license.