Django

Code

Changeset 803

Show
Ignore:
Timestamp:
10/08/05 09:37:05 (3 years ago)
Author:
rjwittams
Message:

Merged to r802

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/new-admin/django/bin/django-admin.py

    r692 r803  
    5454    parser.add_option('--settings', 
    5555        help='Python path to settings module, e.g. "myproject.settings.main". If this isn\'t provided, the DJANGO_SETTINGS_MODULE environment variable will be used.') 
     56    parser.add_option('--pythonpath', 
     57        help='Lets you manually add a directory the Python path, e.g. "/home/djangoprojects/myproject".') 
    5658    options, args = parser.parse_args() 
    5759 
     
    5961    if options.settings: 
    6062        os.environ['DJANGO_SETTINGS_MODULE'] = options.settings 
     63    if options.pythonpath: 
     64        sys.path.insert(0, options.pythonpath) 
    6165 
    6266    # Run the appropriate action. Unfortunately, optparse can't handle 
  • django/branches/new-admin/django/core/meta/fields.py

    r802 r803  
    637637 
    638638    def get_manipulator_field_objs(self): 
    639         return [formfields.IntegerField] 
     639        rel_field = self.rel.get_related_field() 
     640        if self.rel.raw_id_admin and not isinstance(rel_field, AutoField): 
     641            return rel_field.get_manipulator_field_objs() 
     642        else: 
     643            return [formfields.IntegerField] 
    640644 
    641645    def get_db_prep_save(self,value): 
  • django/branches/new-admin/django/core/meta/__init__.py

    r773 r803  
    14761476            else: 
    14771477                table_prefix = '' 
    1478              
    14791478            order_by.append('%s%s %s' % (table_prefix, orderfield2column(col_name, opts), order)) 
    1480      
    14811479    order_by = ", ".join(order_by) 
    14821480 
  • django/branches/new-admin/docs/django-admin.txt

    r692 r803  
    184184 
    185185--settings 
    186 ========== 
     186---------- 
    187187 
    188188Example usage:: 
     
    194194``django-admin.py`` will use the DJANGO_SETTINGS_MODULE environment variable. 
    195195 
     196--pythonpath 
     197------------ 
     198 
     199Example usage:: 
     200 
     201    django-admin.py init --pythonpath='/home/djangoprojects/myproject' 
     202 
     203Adds the given filesystem path to the Python `import search path`_. If this 
     204isn't provided, ``django-admin.py`` will use the ``PYTHONPATH`` environment 
     205variable. 
     206 
     207.. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html 
     208 
    196209--help 
    197 ====== 
     210------ 
    198211 
    199212Displays a help message that includes a terse list of all available actions and