Changeset 803
- Timestamp:
- 10/08/05 09:37:05 (3 years ago)
- Files:
-
- django/branches/new-admin/django/bin/django-admin.py (modified) (2 diffs)
- django/branches/new-admin/django/core/meta/fields.py (modified) (1 diff)
- django/branches/new-admin/django/core/meta/__init__.py (modified) (1 diff)
- django/branches/new-admin/docs/django-admin.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/new-admin/django/bin/django-admin.py
r692 r803 54 54 parser.add_option('--settings', 55 55 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".') 56 58 options, args = parser.parse_args() 57 59 … … 59 61 if options.settings: 60 62 os.environ['DJANGO_SETTINGS_MODULE'] = options.settings 63 if options.pythonpath: 64 sys.path.insert(0, options.pythonpath) 61 65 62 66 # Run the appropriate action. Unfortunately, optparse can't handle django/branches/new-admin/django/core/meta/fields.py
r802 r803 637 637 638 638 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] 640 644 641 645 def get_db_prep_save(self,value): django/branches/new-admin/django/core/meta/__init__.py
r773 r803 1476 1476 else: 1477 1477 table_prefix = '' 1478 1479 1478 order_by.append('%s%s %s' % (table_prefix, orderfield2column(col_name, opts), order)) 1480 1481 1479 order_by = ", ".join(order_by) 1482 1480 django/branches/new-admin/docs/django-admin.txt
r692 r803 184 184 185 185 --settings 186 ========== 186 ---------- 187 187 188 188 Example usage:: … … 194 194 ``django-admin.py`` will use the DJANGO_SETTINGS_MODULE environment variable. 195 195 196 --pythonpath 197 ------------ 198 199 Example usage:: 200 201 django-admin.py init --pythonpath='/home/djangoprojects/myproject' 202 203 Adds the given filesystem path to the Python `import search path`_. If this 204 isn't provided, ``django-admin.py`` will use the ``PYTHONPATH`` environment 205 variable. 206 207 .. _import search path: http://diveintopython.org/getting_to_know_python/everything_is_an_object.html 208 196 209 --help 197 ====== 210 ------ 198 211 199 212 Displays a help message that includes a terse list of all available actions and
