django-textflow 0.1.3

Creator: codyrutscher

Last updated:

Add to Cart

Description:

djangotextflow 0.1.3

========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 You can't use 'macro parameter character #' in math modeYou can't use 'macro parameter character #' in math mode('.your-element').textFlow({options...}); 16.2 Stop textflow textflow.stopTextFlow(); 16.3 Start textflow textflow.startTextFlow(); Method | Argument | Description ------ | -------- | ----------- startTextFlow | options : None | Start textflow if not active stopTextFlow | options : None | Stop textflow if active17. Dependencies jQuery 1.3 Django 1.8 **For multilingual support (Django only)** django-modeltranslation18. LicenseCopyright (c) 2014 Michael JüngerLicensed under the MIT license.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Customer Reviews

There are no reviews.