From 65411d01d448ff0cd4abd14eee14cf60b5f8fc20 Mon Sep 17 00:00:00 2001 From: Nishanth Amuluru Date: Sat, 8 Jan 2011 11:20:57 +0530 Subject: Added buildout stuff and made changes accordingly --HG-- rename : profile/management/__init__.py => eggs/djangorecipe-0.20-py2.6.egg/EGG-INFO/dependency_links.txt rename : profile/management/__init__.py => eggs/djangorecipe-0.20-py2.6.egg/EGG-INFO/not-zip-safe rename : profile/management/__init__.py => eggs/infrae.subversion-1.4.5-py2.6.egg/EGG-INFO/dependency_links.txt rename : profile/management/__init__.py => eggs/infrae.subversion-1.4.5-py2.6.egg/EGG-INFO/not-zip-safe rename : profile/management/__init__.py => eggs/mercurial-1.7.3-py2.6-linux-x86_64.egg/EGG-INFO/dependency_links.txt rename : profile/management/__init__.py => eggs/mercurial-1.7.3-py2.6-linux-x86_64.egg/EGG-INFO/not-zip-safe rename : profile/management/__init__.py => eggs/py-1.4.0-py2.6.egg/EGG-INFO/dependency_links.txt rename : profile/management/__init__.py => eggs/py-1.4.0-py2.6.egg/EGG-INFO/not-zip-safe rename : profile/management/__init__.py => eggs/zc.buildout-1.5.2-py2.6.egg/EGG-INFO/dependency_links.txt rename : profile/management/__init__.py => eggs/zc.buildout-1.5.2-py2.6.egg/EGG-INFO/not-zip-safe rename : profile/management/__init__.py => eggs/zc.recipe.egg-1.3.2-py2.6.egg/EGG-INFO/dependency_links.txt rename : profile/management/__init__.py => eggs/zc.recipe.egg-1.3.2-py2.6.egg/EGG-INFO/not-zip-safe rename : profile/management/__init__.py => parts/django/Django.egg-info/dependency_links.txt rename : taskapp/models.py => parts/django/django/conf/app_template/models.py rename : taskapp/tests.py => parts/django/django/conf/app_template/tests.py rename : taskapp/views.py => parts/django/django/conf/app_template/views.py rename : taskapp/views.py => parts/django/django/contrib/gis/tests/geo3d/views.py rename : profile/management/__init__.py => parts/django/tests/modeltests/delete/__init__.py rename : profile/management/__init__.py => parts/django/tests/modeltests/files/__init__.py rename : profile/management/__init__.py => parts/django/tests/modeltests/invalid_models/__init__.py rename : profile/management/__init__.py => parts/django/tests/modeltests/m2m_signals/__init__.py rename : profile/management/__init__.py => parts/django/tests/modeltests/model_package/__init__.py rename : profile/management/__init__.py => parts/django/tests/regressiontests/bash_completion/__init__.py rename : profile/management/__init__.py => parts/django/tests/regressiontests/bash_completion/management/__init__.py rename : profile/management/__init__.py => parts/django/tests/regressiontests/bash_completion/management/commands/__init__.py rename : profile/management/__init__.py => parts/django/tests/regressiontests/bash_completion/models.py rename : profile/management/__init__.py => parts/django/tests/regressiontests/delete_regress/__init__.py rename : profile/management/__init__.py => parts/django/tests/regressiontests/file_storage/__init__.py rename : profile/management/__init__.py => parts/django/tests/regressiontests/max_lengths/__init__.py rename : profile/forms.py => pytask/profile/forms.py rename : profile/management/__init__.py => pytask/profile/management/__init__.py rename : profile/management/commands/seed_db.py => pytask/profile/management/commands/seed_db.py rename : profile/models.py => pytask/profile/models.py rename : profile/templatetags/user_tags.py => pytask/profile/templatetags/user_tags.py rename : taskapp/tests.py => pytask/profile/tests.py rename : profile/urls.py => pytask/profile/urls.py rename : profile/utils.py => pytask/profile/utils.py rename : profile/views.py => pytask/profile/views.py rename : static/css/base.css => pytask/static/css/base.css rename : taskapp/tests.py => pytask/taskapp/tests.py rename : taskapp/views.py => pytask/taskapp/views.py rename : templates/base.html => pytask/templates/base.html rename : templates/profile/browse_notifications.html => pytask/templates/profile/browse_notifications.html rename : templates/profile/edit.html => pytask/templates/profile/edit.html rename : templates/profile/view.html => pytask/templates/profile/view.html rename : templates/profile/view_notification.html => pytask/templates/profile/view_notification.html rename : templates/registration/activate.html => pytask/templates/registration/activate.html rename : templates/registration/activation_email.txt => pytask/templates/registration/activation_email.txt rename : templates/registration/activation_email_subject.txt => pytask/templates/registration/activation_email_subject.txt rename : templates/registration/logged_out.html => pytask/templates/registration/logged_out.html rename : templates/registration/login.html => pytask/templates/registration/login.html rename : templates/registration/logout.html => pytask/templates/registration/logout.html rename : templates/registration/password_change_done.html => pytask/templates/registration/password_change_done.html rename : templates/registration/password_change_form.html => pytask/templates/registration/password_change_form.html rename : templates/registration/password_reset_complete.html => pytask/templates/registration/password_reset_complete.html rename : templates/registration/password_reset_confirm.html => pytask/templates/registration/password_reset_confirm.html rename : templates/registration/password_reset_done.html => pytask/templates/registration/password_reset_done.html rename : templates/registration/password_reset_email.html => pytask/templates/registration/password_reset_email.html rename : templates/registration/password_reset_form.html => pytask/templates/registration/password_reset_form.html rename : templates/registration/registration_complete.html => pytask/templates/registration/registration_complete.html rename : templates/registration/registration_form.html => pytask/templates/registration/registration_form.html rename : utils.py => pytask/utils.py --- parts/django/docs/faq/admin.txt | 96 +++++++++++++++++ parts/django/docs/faq/contributing.txt | 102 ++++++++++++++++++ parts/django/docs/faq/general.txt | 192 +++++++++++++++++++++++++++++++++ parts/django/docs/faq/help.txt | 73 +++++++++++++ parts/django/docs/faq/index.txt | 14 +++ parts/django/docs/faq/install.txt | 102 ++++++++++++++++++ parts/django/docs/faq/models.txt | 105 ++++++++++++++++++ parts/django/docs/faq/usage.txt | 77 +++++++++++++ 8 files changed, 761 insertions(+) create mode 100644 parts/django/docs/faq/admin.txt create mode 100644 parts/django/docs/faq/contributing.txt create mode 100644 parts/django/docs/faq/general.txt create mode 100644 parts/django/docs/faq/help.txt create mode 100644 parts/django/docs/faq/index.txt create mode 100644 parts/django/docs/faq/install.txt create mode 100644 parts/django/docs/faq/models.txt create mode 100644 parts/django/docs/faq/usage.txt (limited to 'parts/django/docs/faq') diff --git a/parts/django/docs/faq/admin.txt b/parts/django/docs/faq/admin.txt new file mode 100644 index 0000000..1512675 --- /dev/null +++ b/parts/django/docs/faq/admin.txt @@ -0,0 +1,96 @@ +FAQ: The admin +============== + +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. +--------------------------------------------------------------------------------------------------------------------------- + +The login cookie isn't being set correctly, because the domain of the cookie +sent out by Django doesn't match the domain in your browser. Try these two +things: + + * Set the ``SESSION_COOKIE_DOMAIN`` setting in your admin config file + to match your domain. For example, if you're going to + "http://www.example.com/admin/" in your browser, in + "myproject.settings" you should set ``SESSION_COOKIE_DOMAIN = 'www.example.com'``. + + * Some browsers (Firefox?) don't like to accept cookies from domains that + don't have dots in them. If you're running the admin site on "localhost" + or another domain that doesn't have a dot in it, try going to + "localhost.localdomain" or "127.0.0.1". And set + ``SESSION_COOKIE_DOMAIN`` accordingly. + +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. +----------------------------------------------------------------------------------------------------------------------------------------------------------- + +If you're sure your username and password are correct, make sure your user +account has ``is_active`` and ``is_staff`` set to True. The admin site only +allows access to users with those two fields both set to True. + +How can I prevent the cache middleware from caching the admin site? +------------------------------------------------------------------- + +Set the :setting:`CACHE_MIDDLEWARE_ANONYMOUS_ONLY` setting to ``True``. See the +:doc:`cache documentation ` for more information. + +How do I automatically set a field's value to the user who last edited the object in the admin? +----------------------------------------------------------------------------------------------- + +The :class:`~django.contrib.admin.ModelAdmin` class provides customization hooks +that allow you to transform an object as it saved, using details from the +request. By extracting the current user from the request, and customizing the +:meth:`~django.contrib.admin.ModelAdmin.save_model` hook, you can update an +object to reflect the user that edited it. See :ref:`the documentation on +ModelAdmin methods ` for an example. + +How do I limit admin access so that objects can only be edited by the users who created them? +--------------------------------------------------------------------------------------------- + +The :class:`~django.contrib.admin.ModelAdmin` class also provides customization +hooks that allow you to control the visibility and editability of objects in the +admin. Using the same trick of extracting the user from the request, the +:meth:`~django.contrib.admin.ModelAdmin.queryset` and +:meth:`~django.contrib.admin.ModelAdmin.has_change_permission` can be used to +control the visibility and editability of objects in the admin. + +My admin-site CSS and images showed up fine using the development server, but they're not displaying when using mod_python. +--------------------------------------------------------------------------------------------------------------------------- + +See :ref:`serving the admin files ` +in the "How to use Django with mod_python" documentation. + +My "list_filter" contains a ManyToManyField, but the filter doesn't display. +---------------------------------------------------------------------------- + +Django won't bother displaying the filter for a ``ManyToManyField`` if there +are fewer than two related objects. + +For example, if your ``list_filter`` includes ``sites``, and there's only one +site in your database, it won't display a "Site" filter. In that case, +filtering by site would be meaningless. + +How can I customize the functionality of the admin interface? +------------------------------------------------------------- + +You've got several options. If you want to piggyback on top of an add/change +form that Django automatically generates, you can attach arbitrary JavaScript +modules to the page via the model's ``class Admin`` ``js`` parameter. That +parameter is a list of URLs, as strings, pointing to JavaScript modules that +will be included within the admin form via a ``