Comments (8)
Hi there, I tested the migrations on a fresh project and it seems to work ok. If you're upgrading from older version of post-office, you'll actually need to do two things:
- Upgrade post-office to 1.0 and apply all migrations (using south) to make sure your DB is up to date
- Upgrade to Django 1.7
- Install
post-office
1.1 (I released this on PyPI just now).
Let me know if that fixes your problem.
from django-post_office.
Hi, thanks for the reply. I've applied the 1.0 migrations with South to my existing production DB, which is using Django 1.5. I then copied that DB with createdb -O ownername -T originaldb newdb
, where newdb is a fresh copy of the database I'm using to upgrade the app.
With post_office
commented out of my settings migrations apply to the new DB as expected. With post_office
(now 1.1) installed and in settings then interesting things happen. Firstly, I get the same error message as before when applying migrations — the second error trace above. Secondly, I now get that error when trying to run the test client (presumably because it needs to create a database). The same error even appears when I try to migrate another app, with no dependence on post_office
on its own. But when I start up a browser and use my site both the site and the post_office
app itself work perfectly. This only seems to affect migrations.
I wondered whether this might even be a Django/Python 3.4 issue but the release notes suggest they're compatible.
I'll try tweaking some things in the post_office
migration to see if it helps.
from django-post_office.
Okay, taking the error message as my hint, I changed all the byte strings in the migration file to ordinary strings. The migrations now apply and everything works as expected. My test suite runs and all tests that rely on post_office pass. Would you take a pull request for this or would the change I'm making there break other things?
from django-post_office.
Hi there, yes, I would welcome a PR for that. Thanks for the offer :).
I think a good first step would be to modify .travis.yml so that Travis to run the tests on Python 3.4 in addition to 3.3. And then, you could add your modification on the second commit :)
Thanks!
from django-post_office.
Okay, I'll do it tonight (my corporate proxy doesn't allow git pull/push). Thanks for your help.
from django-post_office.
I added Python 3.4 to Travis and it passed, so I suppose migration isn't
tested in test cases. https://travis-ci.org/ui/django-post_office
So please just remove the "b" strings on tonight's pull request. Thanks for
the report and your contribution :)
Win~
On Fri, Sep 26, 2014 at 5:27 PM, Garry Cairns [email protected]
wrote:
Okay, I'll do it tonight (my corporate proxy doesn't allow git pull/push).
Thanks for your help.—
Reply to this email directly or view it on GitHub
#77 (comment)
.
from django-post_office.
I released version 1.1.1 containing the migration fix to PyPI. Thanks for your contribution :)
from django-post_office.
Thanks for accepting, glad to help.
from django-post_office.
Related Issues (20)
- Already rendered Email is re-rendered without context HOT 2
- jQuery $ is not available in Django admin by default
- Emails are rendered without context data HOT 2
- E-Mail subject rendered without context in E-mail admin list view
- Add reply_to attribute to mail.send() HOT 1
- [QUESTION] Can I still use my own smtp email backend?
- Django 4.1 compatibility HOT 8
- When using celery emails are not sent directly HOT 8
- MEDIA_ROOT not documented
- Post-office raise 2 same error when there are SMTP connection error HOT 1
- dictionary update sequence element #0 has length 1; 2 is required
- Authorisation fails for Office 365 with new default policies in place HOT 4
- Commit aa1617e creates issues when creating a new email where context is also set. HOT 2
- Mocking email template for tests
- Bleach is deprecated as of 2023-01-23 HOT 1
- Can Templates include sub-Templates? For example, consistent signature/unsubscribe footers HOT 1
- Suggestion: Minimal support for implementing retention policies HOT 1
- Spanish translations
- Create New Email From Django Admin HOT 3
- insanely hard to edit default content for a template HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-post_office.