Comments (3)
Ok, I tested the solution and it doesn't fully work.
It allows you to actually start the migration process, but errors are raised by the migration files (they all still use references to "auth.User").
A more deep code refactoring is needed to support Django custom User model...
from django-yarr.
Thanks for letting me know about this! I've not used custom user models before, but have had a read around the subject and it looks like your solution should work nicely.
However, you're quite right about the migrations not working with a custom model; this seems to be a problem with South, but it looks like a few people have come up with solutions which I'll try out as soon as I get the chance:
- http://kevindias.com/writing/django-custom-user-models-south-and-reusable-apps/
- ixc/django-guardian@369c168
In the meantime, you could either try one of those solutions, or you could manually change yarr's migrations to use your custom user model, by changing orm['auth.User']
and the auth.User
definition in the models
dict (maybe copy it from a migration in another app).
from django-yarr.
I still haven't had a chance to set up a test project with a custom user model, but I have made some untested changes on an experimental branch, custom_user
. This should add support to the model, migrations and import_opml management command.
I will test this when I get a chance, but I've pushed it here in case anyone is brave enough to give it a try. If anyone does, do let me know how you get on.
You can do a clean yarr install using it with:
pip install -e git+https://github.com/radiac/django-yarr.git@custom_user#egg=django-yarr
Or if you've already installed it, you could switch to your pip src dir, and pull and check out the new custom_user
branch.
Once you've got this branch, make sure your settings.AUTH_USER_MODEL
before you first run the migrations.
If you have already installed yarr and set up the database with auth.User, and now want to switch to a custom user model, you will probably need some custom migration voodoo to replace the fk field in Yarr's tables. Exercise left to reader.
from django-yarr.
Related Issues (20)
- Media rendering
- Adaptive feed check frequency
- Load feed when added
- Duplicate post consolidation HOT 3
- <style> tag content displayed in feeds HOT 1
- Links should open in new tab HOT 5
- Feed list scrolls to the top on click HOT 1
- At least some default page working HOT 5
- Feed update clobbers changes to feed title HOT 2
- "Mark all as read" on saved items results in items with both saved and read flags HOT 3
- Mark all read doesn't always work
- unexpected keyword argument 'namedtuple_as_object' HOT 2
- error when comparing datetimes HOT 2
- Compatibility with Django 1.7 HOT 5
- Include a ready to use yarr site HOT 2
- Supported browsers? HOT 1
- Don't report CharacterEncodingOverride as a feed error
- models error HOT 1
- __init__() got an unexpected keyword argument 'mimetype'
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-yarr.