python - How to implement Dashboard in django admin? -


how implement dashboard in django admin?

if have following model in django. there way, instead of regular models list,i can have search box in admin page search student using name , display particular details...

class mstudent(models.model):     enroll_no = models.integerfield()     name = models.charfield(max_length=200)     photo = models.imagefield(upload_to="static",blank = true)     def __str__(self):        return self.fname+" "+ self.mname+" "+ self.lname class mstud_address_ph_no_email(models.model):     enroll_no = models.foreignkey(mstudent)     address = models.charfield(max_length=200)     personal_mobile= models.integerfield()     fathers_mobile = models.integerfield()      def __str__(self):          return str(self.enroll_no) 

from django admin documentation:

if wish change index, login or logout templates, better off creating own adminsite instance (see below), , changing adminsite.index_template , adminsite.login_template or adminsite.logout_template properties.

so should create own adminsite , set index_template attribute template of yours implements dashboard want.

to provide search , search results view, see adding views admin sites.


Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -