Alternative Admin in Django - python

Hello guys I would like to know if there's a way NOT to override Django Admin, but to build your own, with a custom template. I have searched on the internet but there seems to be no answer. I hope there is a person who knows the answer to my question.

Please refer to documentation:
https://docs.djangoproject.com/en/dev/ref/contrib/admin/#customizing-adminsite
As far as I understood you are trying to have nicer view for admin site. If that is the case I suggest to take a look to Mezzanine, it provides nice features:
http://mezzanine.jupo.org/docs/admin-customization.html

Related

Using Django admin as a base for backend

First sorry for my poor English.
I came from asp.net mvc. Now I use django with nanoboxio
In asp, I can create sections like below.
Create model and add it to dbcontext
Right click controller folder and create new controller with views.
Modify as you wish
For now, I know Django can create admin interface for your model. I try and happy with it. but i want to develop it.
I want to for example;
Create a post model.
Create a admin interface for it.
Copy generated admin interface controller and views to another app
Modify it
How can I do that?
Django's MVC is quite different to ASP.
Django's MVC pattern is less strict so you sort of combine the view and the controller in the views.py. However, if you want to change the Admin, the Django docs are quite nice here: docs.djangoproject.com
If you want to create a custom admin functionality the docs should give you a first idea and if you're planning to create a blog, I would advice you to use an existing plugin such as Zinnia. There, you can find the desired functionalities and modify them instead of building them from scratch.
Also, there are a couple of tutorials on how to build reusable apps and they usually include a detailed guideline how to implement admin functionalities there. Just look it up on google.
I hope that helps you!

How to make drag drop tree in django admin?

I need some drap&drop tree plugin like this for Django Admin.
Anybody knows about such plugins for Django?
Googling for it I found this one (never used though). It's not very clear what you need, maybe if you explain it a little better people could give you the right path to follow.
Besides that, it is always possible to customize Django Admin (override or extend) templates as documented here. By using this approach you could implement everything by yourself (using jQuery UI or Bootstrap for example).
Good luck!

how to use django-registeration in django framework?

I know my question my be simple or basic. But i am asking this because i searched a good article or tutorial so much and didn't find any good detailed article related to django-registration. can any one help me to explain or to give example that how to use this.
Note: Please don't mark negatively if you don't like my question.
If you haven't already, you should read the django-registration docs. The quick start guide looks particularly useful.
A quick google also returned a few blog post including django registration for newbies and setting up django registration.
If you get stuck further down the line, I suggest you check through some of the more popular django-registration questions already anwsered on SO, or even the source code if you are feeling adventurous.

Understanding how Django Apps system works

After some months of using Django, I feel the need to create the first my Django application. In this way I can really take the advantages of the Django's power.
Someone can give me hints and directions for learning well about it?
How Django's apps system works? And how can I create my first reusable app?
I think Django's is one of the best framework ever created and I want to learn it very well for using it in various contexts.
And now I would to take my Django's experience and skills to the next level.
In addition to the official Django documentation and tutorial, which are excellent, I would recommend two books you should check out:
Ayman Hourieh's Django Web Development 1.0:
http://www.amazon.com/gp/aw/d/1847196780/ref=redir_mdp_mobile/191-3941588-1909500
An awesome book that will take you step by step through creating your first Django app, and that touches on several of Django's features and functionality.
The Definitive Guide to Django:
http://www.amazon.com/gp/aw/d/1847196780/ref=redir_mdp_mobile/191-3941588-1909500
The title says it all, written by Django's creator and lead developer.
Don't miss a great talk about reusable apps by James Bennet: http://www.youtube.com/watch?v=A-S0tqpPga4 .
Try here for starters:
https://docs.djangoproject.com/en/1.3/intro/tutorial01/
This document describes Django 1.3.
Writing your first Django app, part 1...
And I suggest you go to Amazon.com, look through Django books and read a lot of the reviews until you find something that sounds appropriate for you.
HTH

Is Django admin difficult to customize?

I have been playing for a couple of days with Django Admin to explore it, but I am still clueless of how it can be customized in the way we need.
Every time I look for any help for the customization in the admin panel, what I find is, a bunch of articles on various communities and forums, explaining how to customize the template, the lists items, the the column views etc. But that should not be called Django Customization.
If I need to make even a small change in the User functionality or any modification to the auth module. It takes a lots of efforts even in figuring out how that can be done.
Is Django that difficult to customize or its just lack of the help available over internet for this or its me who is moving in the wrong direction ?
You are not providing enough details on what you want to achieve, so it's difficult to say how complex the task is. You might also want to consider not modifying the admin site at all and building your own views where appropriate.
However, here are some good links to get you started:
Customizing the Django Admin
Doing more with the Django admin
Extending Django's User Admin
Personally, if you want a site to look like the admin, why not pull the templates and styles and use them, build your own views for what you need. Gobs of documentation and forum help is there for that. I like the idea of customizing the admin, but honestly, I have been doing it for awhile on a project and time and time again I think to myself, if this was built in the standard MVC (or MTV) manner with free templates online, copied admin ones, or some professionally made ones, and built with the plethora of addons and my code, it would be much easier!!! And, when you decide that request/response isn't cutting it, and you want to add lots of JavaScript, you'll be glad. I know. I have had to put all sorts of JavaScript on our Admin project. Mostly because it's impossible to make the admin do what we want, so we fix it with JavaScript once it is on screen. When you find yourself writing an Ajax based system, you'll wonder why you have the admin at all.
If I could start this project over, I might not even use Django, but I probably would. I most certainly won't used the Admin.
Now, if you are building an basic CRUD type site that doesn't have style-eyed users, then Django with grappelli, and some elbow grease will get the job done. Remember, Django is a collection of Python scripts. Just override everything you can, and you'll get there, if you aren't too ambitious.
Django Admin is easy to customize if your requirements match what is customizable in Django. If you need fancy features that are not out-of-the-box functionality you either need to find a plugin that does it, or implement it yourself by subclassing the appropriate classes. Which can be difficult, and requires good understanding of the internals of Django.
So in summary: it makes it easier to setup an admin, but if you need anything special that's not out of the box: you got a steep learning curve.
Depending on your requirements you can choose to use django or not. Anything that requires a lot of functional speccing is better of implemented manually.
It's very easy . Just copy default template to project and change HTML and some variable location
Just see in this vedio
https://youtu.be/NTZfjwf4F8A

Categories

Resources