dzxs / django-photologue

Automatically exported from code.google.com/p/django-photologue
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Using ImageModel outside Photologue still requires Photologue application #126

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. from photologue import ImageModel
2. class MyPhotoModel(ImageModel)
3. ...depend on non-existent tables ... ADD CONSTRAINT
"effect_id_refs_id_53e621a5" FOREIGN KEY ("effect_id") REFERENCES
"photologue_photoeffect" ("id") ...

What is the expected output? What do you see instead?
Given the 2.2 implementation, that's expected.  Had hoped for the promised
(or did I misunderstand that?) ability to embed ImageModel in a larger app
without all the stuff I don't need. :-/

What version of the product are you using? On what operating system?
Photologue 2.2, Django 1.1, Debian Lenny

Please provide any additional information below.
The immediate problem is, of course, that ImageModel contains a FK to
another of the models.  From a fairly quick look at the code I believe this
could be refactored (move "effect" to Photo, refactor to not require it in
ImageModel's methods), but then there'd be much the same problem with
PhotoSize and maybe other things.

I suspect that there is indeed a (relatively) simple ImageModel that could
be separated out from the Gallery business (and its somewhat heavier
Photo), but it doesn't look so simple. :-(

Original issue reported on code.google.com by ma...@two14.net on 10 Aug 2009 at 4:09

GoogleCodeExporter commented 9 years ago
ImageKit(http://bitbucket.org/jdriscoll/django-imagekit/) should do exactly 
what you 
want, creates no tables or relationships and only needs to be installed to use 
the 
management commands.

Original comment by justin.d...@gmail.com on 10 Aug 2009 at 4:46

GoogleCodeExporter commented 9 years ago
Interesting... I think I'd stumbled across imagekit when I was looking for 
existing
apps - not sure why I didn't look further into it (might have been the hard to 
read
dark styling at bitbucket, actually - I was in winnowing the chaff mode).  Now 
I'm
curious, what's the relation between imagekit and photologue?  On a first 
glance it
seems odd that Photologue isn't built on imagekit, or was the origin the other 
way
around?

I don't know if it was just me, but that item about ImageModel in the "What's 
New"
section really gave me the wrong impression about what to expect.  And if the 
answer
really is "imagekit", perhaps you should add it to
http://code.djangoproject.com/wiki/DjangoResources

Thanks!

Original comment by ma...@two14.net on 10 Aug 2009 at 5:12

GoogleCodeExporter commented 9 years ago
I took the lower level bits of Photologue and created imagekit to get 
configuration out 
of the database and make it more flexible. Photologue v3 will be built on top 
of 
ImageKit and you can see some functional proof-of-concept code in the 3.x 
branch on 
this site.

I do need to update this project site but I'm trying to get 3.0 out as well as 
another 
2.x release. I will add ImageKit to the resources page. I'd forgotten about it. 

Original comment by justin.d...@gmail.com on 10 Aug 2009 at 5:20