Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update readme and version bump to 1.1.0 #4

Merged
merged 2 commits into from
Mar 28, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Affect is a flagging engine which applies a flag value to requests based on defi

Installing
----------

Affect has been tested and working with Django 1.4, 1.5, and 1.6, and requires django-extensions.

Install from [github](https://github.com/ConsumerAffairs/django-affect) with pip:

pip install -e [email protected]:ConsumerAffairs/django-affect.git#django-affect
Expand Down Expand Up @@ -98,6 +101,17 @@ In Affect, Flags are the primary indicator of whether action should be taken by
else:
template = 'app/old_template.html'

####Use in Templates####

If you are using RequestContext when passing context to your template, you can also check for the flag from within the template. This work for both Django
and Jinja templates.

{% if 'rev_b' in request.affected_flags %}
<div class="new-style">
{% else %}
<div class="old-style">
{% endif %}

###Settings###

`AFFECTED_NONENETRY_DOMAINS` - A list of domains to exclude when deciding if a user if entering your site. `['example.com', 'www.example.net']` will exclude example.com and www.example.net from entry detection, (this would not exclude www.example.com or example.net)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name='django-affect',
version='1.0.0',
version='1.1.0',
description='Request flagging engine inspired by django-waffle',
author='Jeremy Sattefield',
author_email='[email protected]',
Expand Down