-
Notifications
You must be signed in to change notification settings - Fork 17
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
feature/55 first approach to campaigns #92
Conversation
from drip.models import Drip | ||
from campaigns.models import Campaign, CampaignDrip | ||
|
||
DRIP_AMOUNT = 10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would use random.randint
. Just a suggestion
DRIP_AMOUNT = 10 | ||
|
||
|
||
class DripsTestCase(TestCase): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please test also using a class different from Drip, to test the GenericForeignKey
part
campaigns/models.py
Outdated
return Drip.objects.filter( | ||
id__in=self.campaign_drips.values_list('id', flat=True) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be a model manager to maintain the django interface
Looks good so far, keep in mind what we discussed 🚀 |
This does not make sense anymore since I've changed implementation
Description
Creates a new Model called "Campaign" that groups Drips through the CampaignDrip intermediate Model. Also allows the lib's user to configure the Drip Model to be used.
Closes issue(s)
Screenshots (if appropriate)
Changes include