Pushing The Pony's Boundaries - Django Admin Customization

Video in TIB AV-Portal: Pushing The Pony's Boundaries - Django Admin Customization

Formal Metadata

Pushing The Pony's Boundaries - Django Admin Customization
Title of Series
Part Number
Number of Parts
CC Attribution - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date

Content Metadata

Subject Area
1) Short introduction 2) Run through available extension libraries and what’s possible in them: - Django Suit - Grappeli - Django Admin Tools 3) Quick run through available Django Admin options. - list display, list filter, list editable, search fields, ordering, sortable - readonly fields - raw id fields - fieldsets - actions 4) Customizing Django Admin on your own. Let’s create a super custom Django Admin together! The case study of DjangoGirls.org website, that supports a management system for various users who should be able to only manage pages they’re assigned to. - Limiting objects to users - Displaying computed fields in list page - Limiting add/edit forms for different types of users - Automatically saving information per user - Custom actions 5) Summary - Instructions where to look for more information
Area Computer animation Ferry Corsten Bilderkennung Reverse engineering
Building Group action Cellular automaton Multiplication sign Interface (computing) Flag Game theory Endliche Modelltheorie
Inference Computer animation View (database) Multiplication sign Interface (computing) Endliche Modelltheorie Measurement Dimensional analysis Tuple
Shift operator Computer animation Gender Right angle
Arithmetic mean Computer animation Observational study Bit rate State of matter Personal digital assistant
Information Computer file Code Multiplication sign Cellular automaton Student's t-test Instance (computer science) Line (geometry) Mereology Cartesian coordinate system Machine vision Arithmetic mean Goodness of fit Computer animation Configuration space Software framework Endliche Modelltheorie Series (mathematics) Family Social class
Group action Greatest element State of matter Code Length Multiplication sign View (database) Sheaf (mathematics) Teilkörper Set (mathematics) Insertion loss Image registration Mereology Subset Estimator Mathematics Roundness (object) Computer configuration Cuboid Endliche Modelltheorie Social class Mapping Electronic mailing list Bit Instance (computer science) Category of being Arithmetic mean Configuration space Website Pattern language Whiteboard Resultant Windows Registry Web page Functional (mathematics) Perfect group Computer file Latent heat Average Term (mathematics) Software testing Condition number Default (computer science) Home page Dependent and independent variables Graph (mathematics) Gender Memory management Line (geometry) Cartesian coordinate system Dirac delta function Word Uniform resource locator Computer animation Personal digital assistant Network topology Object (grammar)
Fraction (mathematics) Addition Computer animation Code Computer configuration Multiplication sign Data structure Endliche Modelltheorie Körper <Algebra> Mathematical optimization Descriptive statistics
Revision control Web page Computer animation Link (knot theory) Computer configuration Electronic visual display Natural language Object (grammar) Körper <Algebra> Field (computer science)
Group action Mathematics Standard deviation Computer animation Internet forum Divisor View (database) Cuboid Object (grammar) Position operator Number
Default (computer science) Mathematics Computer animation Computer configuration Endliche Modelltheorie Number Spacetime
Voting Computer animation Object (grammar) Mathematical optimization
Web page Greatest element Content management system Gender Counting Lattice (order) Event horizon Theory Word Latent heat Mathematics Computer animation Website Damping Endliche Modelltheorie Object (grammar)
Web page Data management Computer animation Gender Maschinelle Übersetzung Multiplication sign Self-organization Natural language Text editor Cartesian coordinate system Event horizon
Computer animation Gender Self-organization Right angle Virtualization Endliche Modelltheorie Object (grammar) Physical system
Computer animation Set (mathematics)
Computer animation Statement (computer science) Endliche Modelltheorie Event horizon Symbol table
Word Touchscreen Computer animation Form (programming)
Web page Latent heat Computer animation Computer configuration Personal digital assistant Read-only memory Mathematical analysis 1 (number) Mereology Event horizon Field (computer science) Condition number
Electronic mailing list Event horizon Polarization (waves) Computer programming Mathematics Computer animation Single-precision floating-point format Self-organization Video game Electronic visual display Right angle Object (grammar) Table (information) Spacetime Social class
Medical imaging Estimator Computer animation Self-organization Electronic visual display Software maintenance
Medical imaging Home page Group action Computer animation Multiplication sign Natural language Spacetime
Web page Group action Computer animation Multiplication sign Event horizon
Web page Existential quantification Data management Computer animation Code Natural number Network topology Multiplication sign Interface (computing) Selectivity (electronic) Mereology Freezing
Filter <Stochastik> Point (geometry) Open source View (database) System administrator Direction (geometry) Multiplication sign Decision theory Control flow Mereology Field (computer science) Number Mathematics Different (Kate Ryan album) Damping Endliche Modelltheorie Error message Social class Task (computing) Key (cryptography) Gender Projective plane Complete metric space Tensor Computer animation Query language Order (biology) Statement (computer science) Self-organization Pattern language Resultant Spacetime
Computer animation
fed north with some D. N. ministers him so so you so move so we can say that I have about
undirected here is my 1st in the US that way and then going down the reverse of years but the first one I have the exhibit here and you know from very good throughout the 1 and that they had and I know I've of agreement stating area on the area so we thank you for being here and image analysis on me and standing for a between you and the possible impact of the ferry hit
an atom fool sorry so special ball would and I mean so this is sort of like the 1st feature that sold me and normal with the switch from P to be to quite overnight I was that I was uh so it also has 14 and I spend my days mainly flag games and the internet and and I feel that I can't do then that's that's you carry over all your child excitement models so the game
and the 1st gyrus right what action and interface and and I was status just like the him and that's uh this was begins and Shiite fiercely the and the peace building and by cells die casting and hold a is dealing through extensive I mean the faces of people but actually managed again and also setting the cell is for there to be I'm kind of waste my time where they could be building up the way to no into that perhaps the review goes on so there are no words and
then show me at that Don gardening and so me actually just created must be out of models in the living and an ideal Cantonese but at this very time some years ago I knew I was sold and this going to be writing now and so then I wanna show view of the of cigarettes I learned in 7 years of feeling at the interfaces faces with general at so as dimension measurements for
what they were all of us inference potato and just on the agency based in London also some francisco and restore sm could also denotes pay for my team tuple across the from the other side of the pond Acusticum from 1 males living working on the now and quite involved and those
failed organized u junga comes in Europe and started gender girls there were all of these things here and also named 1 of my and so a lot of them have an so that's all my nite shift and and right work senior agenda the local data that what that means and
they wanted about 2 things the 1st
step of the states of I mean and I know that how this works and then have them along to the takes and also O case study of how we build generals of means and what it it takes for you still
have to go from like this very usual dental while the left such the whole thing shut it off goaltender as it says do this new shiny and we're using now concealed the rate of the
have the dive right into the 1st part and so the the dark series 1st how mean actually works the does that mean exists in the very 1st information of a general framework that's that's stating the she's and and is 1 of the most mysterious and the other to figure out what parts of the jungle code because of it's right there incredibly goods but most of the cell can change over so many visions of Don grinding works it is by the fact that so much investable here's given the legend that problem as in that time that meaning is to something of defend than usual drunk obligations so it probably has the murals that belongs in the Urals pi file that family has use interviews by file and maybe some models in the models failed to what we probably have to be more about that because they are afraid that someone's a friend from what you could imagine how hard I mean it's the classical dengue basically contains 3
main classes each of them is of these 500 lines long something that this and which is basically the basic configuration of your adding fact the you can have multiple and interface instances in your application and all you have to do is to set up another instance of a last and include the rest so for example if you like to have a different I mean for on that completed family for some parts of the using of users like students and I mean for teachers that we accomplish with that yeah
and there's more lightning fast which is there the class most commonly because that's the glacier extent every time you want to create our model of means for your model and the definition of this class I will give you a picture of how big it it's the model and a class and that's slave all of them happening options and we show that for a given model this takes care of everything and it's almost a thousand lines of code the 1st as change which they start displaying amending the fuel we've of objects in the model so if you click on some of you see this list of the objects created in a model can search its future it and you see that so there is no URL so there's no views and looks like nothing it like you would expect so to fully understand how I mean books let's deltas encoded C 4 can find something interesting the the so we have decides that that means that the object encapsulates an instance of the gender of application and 30 to be hooked into your EUR euro that the end of utterance that perfect classification and in the this uh 1 little bit which is aligned the fines and means that if the default instance of that states which you use when you're actually the speed so you includes that happening in your euros you might main euros using had just uncomment this line In Django so this is the glass option is of course wanted also create emotional I mean to say is that by creating the instance and plug it into your euros something file and so if you don't have a loss of something and insight into the like this and included in the same neural spent so I have but introduce euros files so how the section work and take a look into this there's you will see that adding take class have the property probe euros was basically executing that gets euros methods going to the if you look at the case where else methods that you see that actually and think then it creates all your your your else so they're not always in down but it kind of creates them as well as as that of function is executed so it creates an air but the common site white think that they're things falling belonging to logout password change and then uh but you only have but there is also no views right there are all these views so we would normally be based that is by fire are actually methods on that same class that I will save as the whole the highlighting how they did this is visible here and the 2nd part of the euro's created thing at the and consist of euros to each of your adjusted model he got fired models is that look for this registry and creates an euros for each of these models and so it looks for them instantly euros pattern on this set of labeled model name and includes the euros for that model and its the so which brings us to the next board and part of what I mean that and that's the model is a tree the model are adjusted with AdInsight using there just a map so every time you do that's cited history in your code which was used being having high file the action is that means saving again if you sign up and 7 another good faster certain have to and that that this was the result of being online and infant just repeating actionable ultramodern Class name let appendices the greater and and that will take care of adjusting the model for you we 1 thing I found out of the final round such revenges book was it that you can answer if there if you just want to use that that model and interest without overwriting and have options just mentioned like that said in the past that outer and name and the greatest the and probably even more surprising thing is which I don't think it's probably a good pattern but again defined options in their registration so heap registering that creating the outer and in class but it just reduces options passed and Earth the estimate and the last thing that can be interesting here is that we need to determine some basic configuration have been seen that so there's some money were it's acceptable length and the king of the file on that can define how diving is I was the had that mean was the title it was displayed in that H 1 that on average and that page for even the index page state of the state of the vote of of that means screen so that means term and now the model and test which is amongst the and and above that and what I mean is almost a thousand lights that lives in the in the country I mean options file I think that I really tell you that it actually does everything you have for any given model and so now we can have got 1 that will occur with that that means that it the whole that whole I mean and then go on looking at the mean for specific models the same thing as before you can use that model I mean also have to get your most methods responsible for the routine and all the URL think of it it works the same way so basically creates all of their worlds them in and doesn't have these every 1 of them separately so all having can imagine except maybe few variously bond that's more the I all useful responses Urals and you just a methods of work on this article however that's this make so it's quite because but it makes it quite easy overwrite things and as you you want as later in that part out of the actually exercising this opportunity they have we as and then I go to the whole class give because the probably secure and get worse is well-documented so you can look up everything hunting and condition and unintelligible uh that was my favorite the things in this graph and things that I discovered late late and I was surprised at this great city the 1st 1 is that actions on top and actions on about some desired fluxes and at to eventual false and this defines the the word action versus
it's of example this action by at the bottom here which his actions and his actions the bell at so you can define whether it's visible on the bottom and top purple it was quite a surprise to me because they are often used to help like long lists and then you check all these boxes and got the bottom and action actions but what there because in the fulfillment of they have strong Hungary out and selected so this where can just kind of switch it on the quickly and some of and other parts of filtered
there and I think that optimize counseling with huge models and if you eat and save viewing appliance of fusion if you spend a fraction the structure and integrated properly when even heightened fears that are not visible for everyone and it should be as dangerous to show some of those people who are not familiar with the code base so the basic
what time it of the probably sometimes hours enhancement of the set up but that that useful to and is it so here for example a grouped into 3 5 filter and I all it also description to the 2nd 1 so this way and you can the field it should be there but think of the and the and right not convex you can have a set the fact that the last so here for example additional options options so on Advances there should have access to them it there's
also option called these display links that was a specify which fields thing objects people are acceptable and directed to edit the fucking I mean that if all of that is just the 1st field genome sometimes going confusing should play some versions being there the and it's very useful to have a way to change that then so it looks like this
and so here can also be that 1st languages is spreading over this dinner for an not and you also go to the Edit page of adding
and then I'll use that they action is another really useful thing at doses specify which will spend the available forum the if you and usually is the 1st thing that boxes 2nd used is the publisher of the expected objects about this can be 0 that dangerous and there is a factor Croatia Open House 0 6 thousand years ago this hazardous if the number is 1 1 3 1 3 that says is that spending under tremendous you think if you got a lot of users using the thing I mean as I have 1 person come out of you and other personal view the 2nd person to something the 1st person that did something and then they can of the changes and it's a standard method in interest and so this is our looks like basically
I was intermediate at the position here in place of evil clicking on that that it's that about in 1st we and if you need on a
different default ordering and then in other places and this can also define holding on that model I mean by to consider that that here and that will allows you to discover the friend following it the other it needs number reversing is right you feel so bad that in and the specify all the stuff in their foraging kiss and they will show up as a anti-patterns instead so that's space for you
got only few options and you than the safe uses simply the open the whole eastern of change of the available options and always have at that's 1 thing is that the 1
I have only heard about like a year ago I was very surprised that actually exists and is turned off air In the vote but there there is the same as and method that you can turn around and this allows you to this will add the onion but I see new thing when you're
adjusting object then you can think of the and about that and instead of like editing is an optimal can save it as an object that's quite useful if want to have a base a base of 1 object and uses a on assessing and then have 1
word at show full is overcome they now installed on onto the bottom of that means mates you see that fool the count of how many objects this model this can be and get a lot after his well when you have lots of objects are when you're using and know as well the base so it's quite a useful to have an ability to turn it off the so as occurred more investors have a lot of model specific things except this 1 so when you're disappears when you and there is this you 1 enter dental having and you see that this and to the the the things this is actually handled by the change so if you want to change the way objects are displayed and this this this is probably going to be however as you will see soon enough most of the things you ever want to no need to change our model adding last if you can't overriding any change this year from a couple of steps through it into this article hello here let's go straight into magic tricks and I'll show you how to make any last we 10 have been
so we can use a general as example and meet many basic theory I will organize more than 1 sentence itself these events have their own website which is managed by a 110 Learning and that gender goes at park so you can take a look at the death of a subsite at the very end of basic content management system world from scratch in on the home which was the events and of the government to go to the next page which is
fully customizable from gender having so this ourselves as the of thinking of languages at a
certain time by Hungary without implementing a whole translation systems these are the organizer of the event as axis manager and an editor on ebay you wrote about page without having access to answer other at each other even so as great France the the 1st thing
modified to make sure that organizes on have permission of things they needs and nothing else is building more advanced relations and In this that the most important thing was implementing a right to the organizers axis on even they organized and no more going to the more
virtual permission system as the permission what specific objects and the whole model so here so that I look for ASR and by passing that gender goes minions themes that help organizes all over the world manage their own right so we've got with the old even and that and there's there's no need for us to hide any of them our mental nicer and have
this nice had of course I left with is a package called down set which gives you a really nice API to manage your site and and makes it easy to bring somewhere else as an
example and then use just is the an asset onion co-organizer time-reversal shipping parties and stay at the consulate said he found it and fortunately there is a nice and
short way to do this going to do is all right and get worse and that the new model and that's the but even here and we have defined our that process and so we get the old ways that 1st and then if a recently where it and the whole thing but if not we are only few filtering by the gene that's what this statement
the symbol that is not an hourly see on event so it's easy enough and now it's a seal
happens if the modified even hoped that if they actually can't see the whole thing again so they can override the fact that at so we need to kind of go around this and make it and so that for
them now we look in the in state so that we can also have a method called gets farm just exactly what you think it gets a form that is displayed on the screen so here we need to do the same feel thing all right again and Eve a user is not possible user we need to filter out the words that right at and then I turn it and this way we only got 1
back 1 page available for it is not
so this we modified when it comes to specific emissions for analysis was they bring an option to edit the page after the event of a and organizes that dose of a 2nd edition of the workshop they're going back and changing all pages instead of creating new ones the are case ISOpure they also messy so consented to forbid them very and the condition shows that there's something called the read-only fields with we decided to use those bad to make this happen the trigger and the me would have an hour to trying hack into different places in the insights of that and I also learned that it's the recalling fills a hands-free tightly coupled with other parts but uh I finally found a way to use the annual men talk that from the 1 . 8 so yeah if user was noticeably is there and if they event was in the past then he looks at all of the fields as read-only and this like
1 and we are now asking the gentleman messing would enter the space it would still be able to edit it by the organizers wouldn't so that's how we want and this is where they have next favorite thing
to do is a kind of make my life easier is creating custom versus plate on the change the tables so for example we had been still from that polarizes from organizing team and we did want to kind of go for having and find the emotion that we wanted to display just necessary that same so we did the right thing as single methods on events happening class that they express object and displays that displays of that you know so we can see that we defined the got programs that there might here and also added the police late and at the least the whole I mean that the whole team of that event of their names and e-mails an advance which is intended as a comma-separated list and this is how the think and that means
so now next the maintenance so the organisers and mouse and let them that the
and we also wanted to despite extensive data easily fade to the same but then you cannot set lean estimate of the true I
will make them into this place and has instead of just playing award there is also
a display images in this way so you the same thing neurotensin some have a similar an the you can see off the I use my friend's
face for it as those language I had my half time but I think of the of the image of the space here I would use the for sponsor logos are approaches for this so it's easy to about
and I think the last full here I present actions so for example in a way to quickly publish most both humans and the home page which is on the so we have but then this
with that but here the example that I
wouldn't by just that creating a limited on that events happening that's as shown page updates everything to show how it is something which chose and at the end we also need to add it to the actions actions this and that the fact that this by using the
money out of time so that gives us about this
but that's the 1 thing I wanted to mention is to make sure that you don't fall into the trap of customizing and forever and not always possible to do everything in and and you can kind of going a of our what is making the code so much better hard to customize eyes something's to forfeit to create a new page so don't use it
and adding interface your user freezing the things for a public his ears because there's probably a idea don't waste much time spent part something if you see that there is that and means that some sometime driving cars not just that aeciospores the the presence of selected something is easier to back off and write path from here but still spend some time to make your managers and only slightly zeros just above small trees and tweaks your approach and nature of his then radio outside of too much for him giving them access to everything that has that user doesn't that things of course a
few the key someone's only those 2 things so you
got to track and whom we're we started a project always museum moving in and you'd like 1 of 1 of the change was sneeze Schenker customized and then like 2 years later got so much admin customization that maybe like a year ago we realize like we really should be make has some stuff we're like so far into have you had like experience like at what really are you can decide to and then you got that we do you go on rewrite everything ready can keep some of any and save for these for this workflow and we have discussed in last so I think that when the the breaking point is when you're actually spend much much more time to customize something down western credits so when you see this happening over and over again thing is that tensor writers and the thing is on this 1 actually you're right that within the spot maybe it's have that probably and good to kind of learning how did that I mean works inside and actually have very for this class and they get on numbers and then you'll have like an easy understanding of where to go and were not to go up before you actually have this anything that might useful thing to do but and yet the directing prize kind depends on on your part the ground that land for that so it's hard to tell what kind of value what you should do it your decision but it's worth getting now I'm in the order of 1 of we have this the at some so it really do that this question when you decide that the end then is not the adequate for the task you like their go something from scratch because I had to do dashboards and stuff like that for or not and then uses that logging use then control some kind of current and past and we want to have them filters we want to have to give them my search results and we want to hear it forms automatically you know in which is something that the and and makes very easy mid then having to write at a bunch of use just to get search queries working more of a random filters working these kind of people you museum in the he's who knew completion so I actually done anything they're doing this style of tolerance now we are adding another on the rest of his in that means so we can have have is that that we don't try to customized those existing views that then go you but we are adding new used to it so for example there's an eye on the world by the open source of error by a friend is all gender and views much of the the quite easily other view to make another of thing new tango you to you're adding think space will do that instead of trying to customize and extend existing so if I have and the way we do this the for example we need to much work this and but it that we are having some custom an island they're Argentina organizes statements that do something but it my outside of my soul heir instead of and going around fucking dead creating user for her to study another view that handles that and I think that best because will because that's the using that I mean and got all the benefits of that but you don't you take this you don't have to places to go to the left are 1 more question but you should example we get past whaling still used 100 you can have fields linked to adapt the model Is it possible if you will feel that's a foreign key for at different model to link directly into the interview them yet or no I think it would you have to do is figure out the pattern day oral and then and and was the name of that matter in the world and then you can easily do that this story that's not without those created the new kind of you so I get that bridging feeling or something and described that whole field and as that use this 1 of all field and that it would you use like additional let's get that out note that thank you so much again all of all if this
is thank you so this is
the this is this