Django

Code

root/django/tags/releases/0.95/docs/faq.txt

Revision 3476, 28.7 kB (checked in by adrian, 2 years ago)

Added 'Where can I find Django developers for hire?' to the FAQ

Line 
1 ==========
2 Django FAQ
3 ==========
4
5 General questions
6 =================
7
8 Why does this project exist?
9 ----------------------------
10
11 Django grew from a very practical need: World Online, a newspaper Web
12 operation, is responsible for building intensive Web applications on journalism
13 deadlines. In the fast-paced newsroom, World Online often has only a matter of
14 hours to take a complicated Web application from concept to public launch.
15
16 At the same time, the World Online Web developers have consistently been
17 perfectionists when it comes to following best practices of Web development.
18
19 Thus, Django was designed not only to allow fast Web development, but
20 *best-practice* Web development.
21
22 Django would not be possible without a whole host of open-source projects --
23 `Apache`_, `Python`_, and `PostgreSQL`_ to name a few -- and we're thrilled to
24 be able to give something back to the open-source community.
25
26 .. _Apache: http://httpd.apache.org/
27 .. _Python: http://www.python.org/
28 .. _PostgreSQL: http://www.postgresql.org/
29
30 What does "Django" mean, and how do you pronounce it?
31 -----------------------------------------------------
32
33 Django is named after `Django Reinhardt`_, a gypsy jazz guitarist from the 1930s
34 to early 1950s. To this day, he's considered one of the best guitarists of all time.
35
36 Listen to his music. You'll like it.
37
38 Django is pronounced **JANG**-oh. Rhymes with FANG-oh. The "D" is silent.
39
40 .. _Django Reinhardt: http://en.wikipedia.org/wiki/Django_Reinhardt
41
42 Is Django stable?
43 -----------------
44
45 Yes. World Online has been using Django for more than two years. Sites built on
46 Django have weathered traffic spikes of over one million hits an hour and a
47 number of Slashdottings. Yes, it's quite stable.
48
49 Does Django scale?
50 ------------------
51
52 Yes. Compared to development time, hardware is cheap, and so Django is
53 designed to take advantage of as much hardware as you can throw at it.
54
55 Django uses a "shared-nothing" architecture, which means you can add hardware
56 at any level -- database servers, caching servers or Web/application servers.
57
58 The framework cleanly separates components such as its database layer and
59 application layer. And it ships with a simple-yet-powerful `cache framework`_.
60
61 .. _`cache framework`: http://www.djangoproject.com/documentation/cache/
62
63 Who's behind this?
64 ------------------
65
66 Django was developed at `World Online`_, the Web department of a newspaper in
67 Lawrence, Kansas, USA.
68
69 `Adrian Holovaty`_
70     Adrian is a Web developer with a background in journalism. He was lead
71     developer at World Online for 2.5 years, during which time Django was
72     developed and implemented on World Online's sites. Now he works for
73     washingtonpost.com building rich, database-backed information sites, and
74     continues to oversee Django development. He likes playing guitar (Django
75     Reinhardt style) and hacking on side projects such as `chicagocrime.org`_.
76     He lives in Chicago.
77
78     On IRC, Adrian goes by ``adrian_h``.
79
80 `Jacob Kaplan-Moss`_
81     Jacob is a whipper-snapper from California who spends equal time coding and
82     cooking. He's lead developer at World Online and actively hacks on various
83     cool side projects. He's contributed to the Python-ObjC bindings and was
84     the first guy to figure out how to write Tivo apps in Python. Lately he's
85     been messing with Python on the PSP. He lives in Lawrence, Kansas.
86
87     On IRC, Jacob goes by ``jacobkm``.
88
89 `Simon Willison`_
90     Simon is a well-respected Web developer from England. He had a one-year
91     internship at World Online, during which time he and Adrian developed
92     Django from scratch. The most enthusiastic Brit you'll ever meet, he's
93     passionate about best practices in Web development and has maintained a
94     well-read Web-development blog for years at http://simon.incutio.com.
95     He works for Yahoo UK, where he managed to score the title "Hacker Liason."
96     He lives in London.
97
98     On IRC, Simon goes by ``SimonW``.
99
100 `Wilson Miner`_
101     Wilson's design-fu makes us all look like rock stars. When not sneaking
102     into apartment complex swimming pools, he's the Commercial Development
103     Director for World Online, which means he makes the money that pays all our
104     paychecks. He lives in Lawrence, Kansas.
105
106     On IRC, Wilson goes by ``wilsonian``.
107
108 .. _`World Online`: http://code.djangoproject.com/wiki/WorldOnline
109 .. _`Adrian Holovaty`: http://www.holovaty.com/
110 .. _`washingtonpost.com`: http://www.washingtonpost.com/
111 .. _`chicagocrime.org`: http://www.chicagocrime.org/
112 .. _`Simon Willison`: http://simon.incutio.com/
113 .. _`simon.incutio.com`: http://simon.incutio.com/
114 .. _`Jacob Kaplan-Moss`: http://www.jacobian.org/
115 .. _`Wilson Miner`: http://www.wilsonminer.com/
116
117 Which sites use Django?
118 -----------------------
119
120 The Django wiki features a consistently growing `list of Django-powered sites`_.
121 Feel free to add your Django-powered site to the list.
122
123 .. _list of Django-powered sites: http://code.djangoproject.com/wiki/DjangoPoweredSites
124
125 Django appears to be a MVC framework, but you call the Controller the "view", and the View the "template". How come you don't use the standard names?
126 -----------------------------------------------------------------------------------------------------------------------------------------------------
127
128 Well, the standard names are debatable.
129
130 In our interpretation of MVC, the "view" describes the data that gets presented
131 to the user. It's not necessarily *how* the data *looks*, but *which* data is
132 presented. The view describes *which data you see*, not *how you see it.* It's
133 a subtle distinction.
134
135 So, in our case, a "view" is the Python callback function for a particular URL,
136 because that callback function describes which data is presented.
137
138 Furthermore, it's sensible to separate content from presentation -- which is
139 where templates come in. In Django, a "view" describes which data is presented,
140 but a view normally delegates to a template, which describes *how* the data is
141 presented.
142
143 Where does the "controller" fit in, then? In Django's case, it's probably the
144 framework itself: the machinery that sends a request to the appropriate view,
145 according to the Django URL configuration.
146
147 If you're hungry for acronyms, you might say that Django is a "MTV" framework
148 -- that is, "model", "template", and "view." That breakdown makes much more
149 sense.
150
151 At the end of the day, of course, it comes down to getting stuff done. And,
152 regardless of how things are named, Django gets stuff done in a way that's most
153 logical to us.
154
155 <Framework X> does <feature Y> -- why doesn't Django?
156 -----------------------------------------------------
157
158 We're well aware that there are other awesome Web frameworks out there, and
159 we're not averse to borrowing ideas where appropriate. However, Django was
160 developed precisely because we were unhappy with the status quo, so please be
161 aware that "because <Framework X>" does it is not going to be sufficient reason
162 to add a given feature to Django.
163
164 Why did you write all of Django from scratch, instead of using other Python libraries?
165 --------------------------------------------------------------------------------------
166
167 When Django was originally written a couple of years ago, Adrian and Simon
168 spent quite a bit of time exploring the various Python Web frameworks
169 available.
170
171 In our opinion, none of them were completely up to snuff.
172
173 We're picky. You might even call us perfectionists. (With deadlines.)
174
175 Over time, we stumbled across open-source libraries that did things we'd
176 already implemented. It was reassuring to see other people solving similar
177 problems in similar ways, but it was too late to integrate outside code: We'd
178 already written, tested and implemented our own framework bits in several
179 production settings -- and our own code met our needs delightfully.
180
181 In most cases, however, we found that existing frameworks/tools inevitably had
182 some sort of fundamental, fatal flaw that made us squeamish. No tool fit our
183 philosophies 100%.
184
185 Like we said: We're picky.
186
187 We've documented our philosophies on the `design philosophies page`_.
188
189 .. _design philosophies page: http://www.djangoproject.com/documentation/design_philosophies/
190
191 Do you have any of those nifty "screencast" things?
192 ---------------------------------------------------
193
194 You can bet your bottom they're on the way. But, since we're still hammering
195 out a few points, we want to make sure they reflect the final state of things
196 at Django 1.0, not some intermediary step. In other words, we don't want to
197 spend a lot of energy creating screencasts yet, because Django APIs will shift.
198
199 In the meantime, though, check out this `unofficial Django screencast`_.
200
201 .. _unofficial Django screencast: http://www.throwingbeans.org/django_screencasts.html
202
203 Is Django a content-management-system (CMS)?
204 --------------------------------------------
205
206 No, Django is not a CMS, or any sort of "turnkey product" in and of itself.
207 It's a Web framework; it's a programming tool that lets you build Web sites.
208
209 For example, it doesn't make much sense to compare Django to something like
210 Drupal_, because Django is something you use to *create* things like Drupal.
211
212 Of course, Django's automatic admin site is fantastic and timesaving -- but
213 the admin site is one module of Django the framework. Furthermore, although
214 Django has special conveniences for building "CMS-y" apps, that doesn't mean
215 it's not just as appropriate for building "non-CMS-y" apps (whatever that
216 means!).
217
218 .. _Drupal: http://drupal.org/
219
220 When will you release Django 1.0?
221 ---------------------------------
222
223 Short answer: When we're comfortable with Django's APIs, have added all
224 features that we feel are necessary to earn a "1.0" status, and are ready to
225 begin maintaining backwards compatibility. This should happen in a couple of
226 months or so, although it's entirely possible that it could happen earlier.
227 That translates into summer 2006.
228
229 The merging of Django's `magic-removal branch`_ went a long way toward Django
230 1.0.
231
232 Of course, you should note that `quite a few production sites`_ use Django in
233 its current status. Don't let the lack of a 1.0 turn you off.
234
235 .. _magic-removal branch: http://code.djangoproject.com/wiki/RemovingTheMagic
236 .. _quite a few production sites: http://code.djangoproject.com/wiki/DjangoPoweredSites
237
238 How can I download the Django documentation to read it offline?
239 ---------------------------------------------------------------
240
241 The Django docs are available in the ``docs`` directory of each Django tarball
242 release. These docs are in ReST (ReStructured Text) format, and each text file
243 corresponds to a Web page on the official Django site.
244
245 Because the documentation is `stored in revision control`_, you can browse
246 documentation changes just like you can browse code changes.
247
248 Technically, the docs on Django's site are generated from the latest development
249 versions of those ReST documents, so the docs on the Django site may offer more
250 information than the docs that come with the latest Django release.
251
252 .. _stored in revision control: http://code.djangoproject.com/browser/django/trunk/docs
253
254 Where can I find Django developers for hire?
255 --------------------------------------------
256
257 Consult our `developers for hire page`_ for a list of Django developers who
258 would be happy to help you.
259
260 You might also be interested in posting a job to http://www.gypsyjobs.com/ .
261
262 .. _developers for hire page: http://code.djangoproject.com/wiki/DevelopersForHire
263
264 Installation questions
265 ======================
266
267 How do I get started?
268 ---------------------
269
270     #. `Download the code`_.
271     #. Install Django (read the `installation guide`_).
272     #. Walk through the tutorial_.
273     #. Check out the rest of the documentation_, and `ask questions`_ if you
274        run into trouble.
275
276 .. _`Download the code`: http://www.djangoproject.com/download/
277 .. _`installation guide`: http://www.djangoproject.com/documentation/install/
278 .. _tutorial:  http://www.djangoproject.com/documentation/tutorial1/
279 .. _documentation: http://www.djangoproject.com/documentation/
280 .. _ask questions: http://www.djangoproject.com/community/
281
282 How do I fix the "install a later version of setuptools" error?
283 ---------------------------------------------------------------
284
285 Just run the ``ez_setup.py`` script in the Django distribution.
286
287 What are Django's prerequisites?
288 --------------------------------
289
290 Django requires Python_ 2.3 or later. No other Python libraries are required
291 for basic Django usage.
292
293 For a development environment -- if you just want to experiment with Django --
294 you don't need to have a separate Web server installed; Django comes with its
295 own lightweight development server. For a production environment, we recommend
296 `Apache 2`_ and mod_python_, although Django follows the WSGI_ spec, which
297 means it can run on a variety of server platforms.
298
299 If you want to use Django with a database, which is probably the case, you'll
300 also need a database engine. PostgreSQL_ is recommended, because we're
301 PostgreSQL fans, and MySQL_ and `SQLite 3`_ are also supported.
302
303 .. _Python: http://www.python.org/
304 .. _Apache 2: http://httpd.apache.org/
305 .. _mod_python: http://www.modpython.org/
306 .. _WSGI: http://www.python.org/peps/pep-0333.html
307 .. _PostgreSQL: http://www.postgresql.org/
308 .. _MySQL: http://www.mysql.com/
309 .. _`SQLite 3`: http://www.sqlite.org/
310
311 Do I have to use mod_python?
312 ----------------------------
313
314 Although we recommend mod_python for production use, you don't have to use it,
315 thanks to the fact that Django uses an arrangement called WSGI_. Django can
316 talk to any WSGI-enabled server. The most common non-mod_python deployment
317 setup is FastCGI. See `How to use Django with FastCGI`_ for full information.
318
319 Also, see the `server arrangements wiki page`_ for other deployment strategies.
320
321 If you just want to play around and develop things on your local computer, use
322 the development Web server that comes with Django. Things should Just Work.
323
324 .. _WSGI: http://www.python.org/peps/pep-0333.html
325 .. _How to use Django with FastCGI: http://www.djangoproject.com/documentation/fastcgi/
326 .. _server arrangements wiki page: http://code.djangoproject.com/wiki/ServerArrangements
327
328 How do I install mod_python on Windows?
329 ---------------------------------------
330
331     * For Python 2.4, grab mod_python from `win32 build of mod_python for
332       Python 2.4`_.
333     * For Python 2.4, check out this `Django on Windows howto`_.
334     * For Python 2.3, grab mod_python from http://www.modpython.org/ and read
335       `Running mod_python on Apache on Windows2000`_.
336     * Also, try this (not Windows-specific) `guide to getting mod_python
337       working`_.
338
339 .. _`win32 build of mod_python for Python 2.4`: http://www.lehuen.com/nicolas/index.php/2005/02/21/39-win32-build-of-mod_python-314-for-python-24
340 .. _`Django on Windows howto`: http://thinkhole.org/wp/2006/04/03/django-on-windows-howto/
341 .. _`Running mod_python on Apache on Windows2000`: http://groups-beta.google.com/group/comp.lang.python/msg/139af8c83a5a9d4f
342 .. _`guide to getting mod_python working`: http://www.dscpl.com.au/articles/modpython-001.html
343
344 Will Django run under shared hosting (like TextDrive or Dreamhost)?
345 -------------------------------------------------------------------
346
347 See our `Django-friendly Web hosts`_ page.
348
349 .. _`Django-friendly Web hosts`: http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts
350
351 Should I use the official version or development version?
352 ---------------------------------------------------------
353
354 The Django developers improve Django every day and are pretty good about not
355 checking in broken code. We use the development code (from the Subversion
356 repository) directly on our servers, so we consider it stable. With that in
357 mind, we recommend that you use the latest development code, because it
358 generally contains more features and fewer bugs than the "official" releases.
359
360 Using Django
361 ============
362
363 Why do I get an error about importing DJANGO_SETTINGS_MODULE?
364 -------------------------------------------------------------
365
366 Make sure that:
367
368     * The environment variable DJANGO_SETTINGS_MODULE is set to a fully-qualified
369       Python module (i.e. "mysite.settings.main").
370
371     * Said module is on ``sys.path`` (``import mysite.settings.main`` should work).
372
373     * The module doesn't contain syntax errors (of course).
374
375     * If you're using mod_python but *not* using Django's request handler,
376       you'll need to work around a mod_python bug related to the use of
377       ``SetEnv``; before you import anything from Django you'll need to do
378       the following::
379
380             os.environ.update(req.subprocess_env)
381
382       (where ``req`` is the mod_python request object).
383
384 I can't stand your template language. Do I have to use it?
385 ----------------------------------------------------------
386
387 We happen to think our template engine is the best thing since chunky bacon,
388 but we recognize that choosing a template language runs close to religion.
389 There's nothing about Django that requires using the template language, so
390 if you're attached to ZPT, Cheetah, or whatever, feel free to use those.
391
392 Do I have to use your model/database layer?
393 -------------------------------------------
394
395 Nope. Just like the template system, the model/database layer is decoupled from
396 the rest of the framework.
397
398 The one exception is: If you use a different database library, you won't get to
399 use Django's automatically-generated admin site. That app is coupled to the
400 Django database layer.
401
402 How do I use image and file fields?
403 -----------------------------------
404
405 Using a ``FileField`` or an ``ImageField`` in a model takes a few steps:
406
407     #. In your settings file, define ``MEDIA_ROOT`` as the full path to
408        a directory where you'd like Django to store uploaded files. (For
409        performance, these files are not stored in the database.) Define
410        ``MEDIA_URL`` as the base public URL of that directory. Make sure that
411        this directory is writable by the Web server's user account.
412
413     #. Add the ``FileField`` or ``ImageField`` to your model, making sure
414        to define the ``upload_to`` option to tell Django to which subdirectory
415        of ``MEDIA_ROOT`` it should upload files.
416
417     #. All that will be stored in your database is a path to the file
418        (relative to ``MEDIA_ROOT``). You'll must likely want to use the
419        convenience ``get_<fieldname>_url`` function provided by Django. For
420        example, if your ``ImageField`` is called ``mug_shot``, you can get the
421        absolute URL to your image in a template with
422        ``{{ object.get_mug_shot_url }}``.
423
424 Databases and models
425 ====================
426
427 How can I see the raw SQL queries Django is running?
428 ----------------------------------------------------
429
430 Make sure your Django ``DEBUG`` setting is set to ``True``. Then, just do
431 this::
432
433     >>> from django.db import connection
434     >>> connection.queries
435     [{'sql': 'SELECT polls_polls.id,polls_polls.question,polls_polls.pub_date FROM polls_polls',
436     'time': '0.002'}]
437
438 ``connection.queries`` is only available if ``DEBUG`` is ``True``. It's a list
439 of dictionaries in order of query execution. Each dictionary has the following::
440
441     ``sql`` -- The raw SQL statement
442     ``time`` -- How long the statement took to execute, in seconds.
443
444 ``connection.queries`` includes all SQL statements -- INSERTs, UPDATES,
445 SELECTs, etc. Each time your app hits the database, the query will be recorded.
446
447 Can I use Django with a pre-existing database?
448 ----------------------------------------------
449
450 Yes. See `Integrating with a legacy database`_.
451
452 .. _`Integrating with a legacy database`: http://www.djangoproject.com/documentation/legacy_databases/
453
454 If I make changes to a model, how do I update the database?
455 -----------------------------------------------------------
456
457 If you don't mind clearing data, your project's ``manage.py`` utility has an
458 option to reset the SQL for a particular application::
459
460     manage.py reset appname
461
462 This drops any tables associated with ``appname`` and recreates them.
463
464 If you do care about deleting data, you'll have to execute the ``ALTER TABLE``
465 statements manually in your database. That's the way we've always done it,
466 because dealing with data is a very sensitive operation that we've wanted to
467 avoid automating. That said, there's some work being done to add partially
468 automated database-upgrade functionality.
469
470 Do Django models support multiple-column primary keys?
471 ------------------------------------------------------
472
473 No. Only single-column primary keys are supported.
474
475 But this isn't an issue in practice, because there's nothing stopping you from
476 adding other constraints (using the ``unique_together`` model option or
477 creating the constraint directly in your database), and enforcing the
478 uniqueness at that level. Single-column primary keys are needed for things such
479 as the admin interface to work; e.g., you need a simple way of being able to
480 specify an object to edit or delete.
481
482 How do I add database-specific options to my CREATE TABLE statements, such as specifying MyISAM as the table type?
483 ------------------------------------------------------------------------------------------------------------------
484
485 We try to avoid adding special cases in the Django code to accomodate all the
486 database-specific options such as table type, etc. If you'd like to use any of
487 these options, create an `SQL initial data file`_ that contains ``ALTER TABLE``
488 statements that do what you want to do. The initial data files are executed in
489 your database after the ``CREATE TABLE`` statements.
490
491 For example, if you're using MySQL and want your tables to use the MyISAM table
492 type, create an initial data file and put something like this in it::
493
494     ALTER TABLE myapp_mytable ENGINE=MyISAM;
495
496 As explained in the `SQL initial data file`_ documentation, this SQL file can
497 contain arbitrary SQL, so you can make any sorts of changes you need to make.
498
499 .. _SQL initial data file: http://www.djangoproject.com/documentation/model_api/#providing-initial-sql-data
500
501 Why is Django leaking memory?
502 -----------------------------
503
504 Django isn't known to leak memory. If you find your Django processes are
505 allocating more and more memory, with no sign of releasing it, check to make
506 sure your ``DEBUG`` setting is set to ``True``. If ``DEBUG`` is ``True``, then
507 Django saves a copy of every SQL statement it has executed.
508
509 (The queries are saved in ``django.db.connection.queries``. See
510 `How can I see the raw SQL queries Django is running?`_.)
511
512 To fix the problem, set ``DEBUG`` to ``False``.
513
514 If you need to clear the query list manually at any point in your functions,
515 just call ``reset_queries()``, like this::
516
517     from django import db
518     db.reset_queries()
519
520 The admin site
521 ==============
522
523 I can't log in. When I enter a valid username and password, it just brings up the login page again, with no error messages.
524 ---------------------------------------------------------------------------------------------------------------------------
525
526 The login cookie isn't being set correctly, because the domain of the cookie
527 sent out by Django doesn't match the domain in your browser. Try these two
528 things:
529
530     * Set the ``SESSION_COOKIE_DOMAIN`` setting in your admin config file
531       to match your domain. For example, if you're going to
532       "http://www.mysite.com/admin/" in your browser, in
533       "myproject.settings" you should set ``SESSION_COOKIE_DOMAIN = 'www.mysite.com'``.
534
535     * Some browsers (Firefox?) don't like to accept cookies from domains that
536       don't have dots in them. If you're running the admin site on "localhost"
537       or another domain that doesn't have a dot in it, try going to
538       "localhost.localdomain" or "127.0.0.1". And set
539       ``SESSION_COOKIE_DOMAIN`` accordingly.
540
541 I can't log in. When I enter a valid username and password, it brings up the login page again, with a "Please enter a correct username and password" error.
542 -----------------------------------------------------------------------------------------------------------------------------------------------------------
543
544 If you're sure your username and password are correct, make sure your user
545 account has ``is_active`` and ``is_staff`` set to True. The admin site only
546 allows access to users with those two fields both set to True.
547
548 How can I prevent the cache middleware from caching the admin site?
549 -------------------------------------------------------------------
550
551 Set the ``CACHE_MIDDLEWARE_ANONYMOUS_ONLY`` setting to ``True``. See the
552 `cache documentation`_ for more information.
553
554 .. _cache documentation: ../cache/#the-per-site-cache
555
556 How do I automatically set a field's value to the user who last edited the object in the admin?
557 -----------------------------------------------------------------------------------------------
558
559 At this point, Django doesn't have an official way to do this. But it's an oft-requested
560 feature, so we're discussing how it can be implemented. The problem is we don't want to couple
561 the model layer with the admin layer with the request layer (to get the current user). It's a
562 tricky problem.
563
564 One person hacked up a `solution that doesn't require patching Django`_, but note that it's an
565 unofficial solution, and there's no guarantee it won't break at some point.
566
567 .. _solution that doesn't require patching Django: http://lukeplant.me.uk/blog.php?id=1107301634
568
569 How do I limit admin access so that objects can only be edited by the users who created them?
570 ---------------------------------------------------------------------------------------------
571
572 See the answer to the previous question.
573
574 My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_python.
575 ---------------------------------------------------------------------------------------------------------------------------
576
577 See `serving the admin files`_ in the "How to use Django with mod_python"
578 documentation.
579
580 .. _serving the admin files: http://www.djangoproject.com/documentation/modpython/#serving-the-admin-files
581
582 My "list_filter" contains a ManyToManyField, but the filter doesn't display.
583 ----------------------------------------------------------------------------
584
585 Django won't bother displaying the filter for a ``ManyToManyField`` if there
586 are fewer than two related objects.
587
588 For example, if your ``list_filter`` includes ``sites``, and there's only one
589 site in your database, it won't display a "Site" filter. In that case,
590 filtering by site would be meaningless.
591
592 How can I customize the functionality of the admin interface?
593 -------------------------------------------------------------
594
595 You've got several options. If you want to piggyback on top of an add/change
596 form that Django automatically generates, you can attach arbitrary JavaScript
597 modules to the page via the model's ``class Admin`` ``js`` parameter. That
598 parameter is a list of URLs, as strings, pointing to JavaScript modules that
599 will be included within the admin form via a ``<script>`` tag.
600
601 If you want more flexibility than simply tweaking the auto-generated forms,
602 feel free to write custom views for the admin. The admin is powered by Django
603 itself, and you can write custom views that hook into the authentication
604 system, check permissions and do whatever else they need to do.
605
606 If you want to customize the look-and-feel of the admin interface, read the
607 next question.
608
609 The dynamically-generated admin site is ugly! How can I change it?
610 ------------------------------------------------------------------
611
612 We like it, but if you don't agree, you can modify the admin site's
613 presentation by editing the CSS stylesheet and/or associated image files. The
614 site is built using semantic HTML and plenty of CSS hooks, so any changes you'd
615 like to make should be possible by editing the stylesheet. We've got a
616 `guide to the CSS used in the admin`_ to get you started.
617
618 .. _`guide to the CSS used in the admin`: http://www.djangoproject.com/documentation/admin_css/
619
620 How do I create users without having to edit password hashes?
621 -------------------------------------------------------------
622
623 We don't recommend you create users via the admin interface, because at the
624 moment it requires you to edit password hashes manually. (Passwords are hashed
625 using one-way hash algorithms for security; there's currently no Web interface
626 for changing passwords by entering the actual password rather than the hash.)
627
628 To create a user, you'll have to use the Python API. See `creating users`_ for
629 full info.
630
631 .. _creating users: http://www.djangoproject.com/documentation/authentication/#creating-users
632
633 Contributing code
634 =================
635
636 I submitted a bug fix in the ticket system several weeks ago. Why are you ignoring my patch?
637 --------------------------------------------------------------------------------------------
638
639 Don't worry: We're not ignoring you!
640
641 It's important to understand there is a difference between "a ticket is being
642 ignored" and "a ticket has not been attended to yet." Django's ticket system
643 contains hundreds of open tickets, of various degrees of impact on end-user
644 functionality, and Django's developers have to review and prioritize.
645
646 Besides, if your feature request stands no chance of inclusion in Django, we
647 won't ignore it -- we'll just close the ticket. So if your ticket is still
648 open, it doesn't mean we're ignoring you; it just means we haven't had time to
649 look at it yet.
Note: See TracBrowser for help on using the browser.