Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Adding MediaFile inline to 3rd party model's admin?
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
t scytale  
View profile  
 More options Jan 31, 4:00 pm
From: t scytale <scyt...@gmail.com>
Date: Tue, 31 Jan 2012 13:00:28 -0800 (PST)
Local: Tues, Jan 31 2012 4:00 pm
Subject: Adding MediaFile inline to 3rd party model's admin?

I'm using using from feincms.module.medialibrary.models.MediaFile in my own
models.
At the moment it's admin field shows as a drop-down list with a '+' to open
a new window to add new files (see attached image
"current_media_inline.png")
I'd really like to have field that uses the MediaFile inline form that
shows up on feincms admin pages (see attached image
"feincms_media_inline.png")
I've been reading the feincms source to try to figure out how to get this
working but not making progress.
I'd really appreciate any tips on how to set this up because at the moment

thanks

At the moment here's my setup:

models.py:

from feincms.module.medialibrary.models import MediaFile
from feincms.module.medialibrary.fields import MediaFileForeignKey
...
class Foo(models.Model):
    ...
    image = MediaFileForeignKey(MediaFile, blank=True, null=True)

---

I've

  current_media_inline.png
3K Download

  feincms_media_inline.png
10K Download

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthias Kestenholz  
View profile  
 More options Jan 31, 4:19 pm
From: Matthias Kestenholz <m...@feinheit.ch>
Date: Tue, 31 Jan 2012 16:19:02 -0500
Local: Tues, Jan 31 2012 4:19 pm
Subject: Re: Adding MediaFile inline to 3rd party model's admin?

Hi

You have to add the image field to raw_id_fields when registering your
model with the admin site. Otherwise, MediaFileForeignKey behaves exactly
the same way as a stock Django ForeignKey.

Best,
Matthias
 On Jan 31, 2012 4:00 PM, "t scytale" <scyt...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
t scytale  
View profile  
 More options Feb 6, 8:26 am
From: t scytale <scyt...@gmail.com>
Date: Mon, 6 Feb 2012 05:26:05 -0800 (PST)
Local: Mon, Feb 6 2012 8:26 am
Subject: Re: Adding MediaFile inline to 3rd party model's admin?

ah! of course! thanks very much.

I have to say that the mediafile library is excellent as a stand-alone
project.

t


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »