change default path of django administration
Question: I am new to Django. I am using django administration for basic crud purpose. I
found that template for django admin resides at

    
    
    C:\Python27\Lib\site-packages\django\contrib\admin\templates\admin
    

I need to change it as my own location .. i created one folder "template" on
base dir of project and added following lines

    
    
    STATIC_URL =os.path.join(BASE_DIR, 'templates')+'/'
    
    TEMPLATE_DIRS = (
        os.path.join(BASE_DIR, 'templates'),
    )
    

i copied all files from `C:\Python27\Lib\site-
packages\django\contrib\admin\templates` to `basedir/templates`

but still it is referencing to `C:\Python27\Lib\site-
packages\django\contrib\admin\templates`

what is the best way?


Answer: try this,hope this helps you

    
    
    import os
    
    PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
    
    ...
    
    #MEDIA_ROOT = PROJECT_PATH + '/media/'
    
    TEMPLATE_DIRS = (
        PROJECT_PATH + '/templates/'
    )
    

