On Oct 16, 2:46 pm, "RajeshD" <[EMAIL PROTECTED]> wrote:
> > The admin does not show the full path of the uploaded file, so the end
> > user would need to fiddle with the path ... trying to smoothen this
> > process so the url that is displayed in admin is the full path or at
> > least a path that works. Or god forbid drag and drop! ;)
> As a quick fix, in the admin list page for your images, you could add a
> custom column that does show the correct (Markdown-friendly) path for
> each image. The user could then cut and paste that path into the
> Markdown based text where needed.
Another column in the model that is updated from the other attributes
of the object ... sounds like it should do the trick.
It turns out MEDIA_URL is used to render the links for file fields as
expected, but mine didn't have a trailing slash so was being truncated,
hence broken. The anchor is rendered like <a href="{{
settings.MEDIA_URL }}{{ myapp.files.file }}">{{ myapp.files.file }}</a>
which turns out to be something like <a
href="http://1.2.3.4:8000/media/upload/20060914R4.oak.pdf" >
upload/20060914R4.oak.pdf </a>.
Also I'm rethinking my model, I initially had a model with one-to-many
relationships like
Tutorials 1-N Sections 1-N Files
I think I will change this to
Tutorials 1-N Sections
Tutorials 1-N Files
So files can be reused in different sections and both sections and
files can be edited in one admin screen using edit_inline.
Thanks.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---