| Name | Eliness |
|---|---|
| Email Address | n/a |
| Posts | 2 |
-
- 2009-10-26 11:23:49
- Re: Admin : call a method to fill in some fields automatically ?
- Board » Django » Middleware
-
Well, that gives me a good start to work on !
Thank you for your advice, let's code now
!
-
- 2009-10-18 14:14:58
- Admin : call a method to fill in some fields automatically ?
- Board » Django » Middleware
-
Hi everyone !
Sorry for my bad English, I am French, I hope you will be able to give me some clues to help me with my idea.
I'm creating a website with Django : this site will display different informations about some movies. So let's imagine I have the model for a movie, with the following fields : title, director, note.
There exists a python library called imdbpy, which I know how to use : it fetches different informations when you give to a method of this library the IMDB number of the movie of interest.
I'd like to use such a thing in my Django app : there would be in my model a "IMDB number" field, and when entered, it would fetch the title and director informations thanks to the imdbpy library.
So, when I want to add a new movie to my website, instead of filling in all the fields in my django admin page, I'd just have to give to it the IMDB number, and click on a button to automatically fill in the other fields.
The only problem is that I don't know at all how to create this button, and how to make it call the method of the imdbpy library, and then how to put the information fetched into the "title" and "director" field.
Sigh, my english is terrible, I hope you understand what I mean. I'm just a beginner with Django, not with python, and I'd really like to achieve such a thing. I looked into the documentation on the Django website, but I have trouble finding things, has anyone a link or a hint to help me achieve my project ?
Thank you very much


