Closed X17 closed 8 years ago
ValueError at /admin/campaign/campaign/1/send/
Empty module name
Request Method: POST
Request URL: http://foo_domain/admin/campaign/campaign/1/send/
Django Version: 1.7
Exception Type: ValueError
Exception Value:
Empty module name
Exception Location:***/local/lib/python2.7/site-packages/campaign/context.py in get_mail_processors, line 18
The issue is in context.py in get_mail_processors, line 18
for path in getattr(settings, 'CAMPAIGN_CONTEXT_PROCESSORS',('campaign.context_processors.recipient')): i = path.rfind('.') module, attr = path[:i], path[i+1:]
returns an empty value for path
if i put string directly it works. module, attr = 'campaign.context_processors','recipient_dict'
Which Django Version are you using?
Please show your CAMPAIGN_CONTEXT_PROCESSORS setting (./manage.py diffsettings | grep CAMPAIGN
for example).
CAMPAIGN_BACKEND = 'campaign.backends.mandrill_api' ### CAMPAIGN_CONTEXT_PROCESSORS = 'campaign.context_processors.recipient_dict' ### CAMPAIGN_FROM_EMAIL = 'foo@domain.com' ###
I followed the docs and comments in the mandrill.py
CAMPAIGN_CONTEXT_PROCESSORS = 'campaign.context_processors.recipient_dict'
This setting should be a tuple:
CAMPAIGN_CONTEXT_PROCESSORS = ('campaign.context_processors.recipient_dict',)
Ahhhh.... feeling kinda dumb.
Thanks for correcting me, though i worked it around but yeah this the correct way.
one last thing from where does it pick the sender's name, my guess is django_site but it's not picking the same.
one last thing from where does it pick the sender's name
By default it takes the sender name configured in the mandrill web user-interface (where you get your api key from). But you can override it with the following setting (I've included some more options as examples):
MANDRILL_API_SETTINGS = {
"from_name": "My Sender Name",
#"tracking_domain": "newsletter.mydomain.com",
#"auto_text": False,
#"auto_html": False,
#"view_content_link": False,
#"track_opens": True,
#"important": False,
}
Is there any feature to add tags to separate campaigns / mailing list . if, not any suggestion how to go about it.
there is no feature to add tags and it is not planned to add such a feature. maybe you can use django-taggit to add tags.
Are you writing in reference to mandrill tags as their api supports tags which marks every mail. It gives easy access in order to filter mails in mandrill dashboard.
I am looking for http://help.mandrill.com/entries/28563573-How-do-I-use-tags-in-Mandrill
In Mandrill API https://mandrillapp.com/api/docs/messages.html, we send a request json. All i need is to add the following in the json request sent
"tags": [ "foo_value or Campaign_name or mailing_list_name" ],
If you could tell me how to access the campaign name or mailing list value in mandrill_api.py, i can tweak it in the json formed there.
ok, I misunderstood the question. I have to take a look into it ...
i have just now added few things into my previous comment for more clarity, have a look.
Suggestion : Tags will be passed just like the sender's name instead of hardcode if we can give dynamic
MANDRILL_API_SETTINGS = { "tags": ["foo_variable" ],
#"tracking_domain": "newsletter.mydomain.com",
#"auto_text": False,
#"auto_html": False,
#"view_content_link": False,
#"track_opens": True,
#"important": False,
}
@arneb any progress???
if someone interested here is another fork https://github.com/bashu/fluentcms-campaign
0.3.0 is now released
i am trying to implement via mandrill got stuck at this error