| | 270 | How can I customize the functionality of the admin interface? |
|---|
| | 271 | ------------------------------------------------------------- |
|---|
| | 272 | |
|---|
| | 273 | You've got several options. If you want to piggyback on top of an add/change |
|---|
| | 274 | form that Django automatically generates, you can attach arbitrary JavaScript |
|---|
| | 275 | modules to the page via the model's ``admin.js`` parameter. That parameter is |
|---|
| | 276 | a list of URLs, as strings, pointing to JavaScript modules that will be |
|---|
| | 277 | included within the admin form via a <script> tag. |
|---|
| | 278 | |
|---|
| | 279 | If you want more flexibility than simply tweaking the auto-generated forms, |
|---|
| | 280 | feel free to write custom views for the admin. The admin is powered by Django |
|---|
| | 281 | itself, and you can write custom views that hook into the authentication |
|---|
| | 282 | system, check permissions and do whatever else they need to do. |
|---|
| | 283 | |
|---|
| | 284 | If you want to customize the look-and-feel of the admin interface, read the |
|---|
| | 285 | next question. |
|---|
| | 286 | |
|---|