mirror of
https://github.com/django/django.git
synced 2025-10-27 07:36:08 +00:00
Fixed #17920 -- Actually pass the full path of a newly created project or app in the template context as mentioned in the startproject docs. Many thanks to Preston Holmes for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
import os, sys
|
||||
import os
|
||||
import sys
|
||||
|
||||
if __name__ == "__main__":
|
||||
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "{{ project_name }}.settings")
|
||||
|
||||
@@ -89,8 +89,10 @@ class TemplateCommand(BaseCommand):
|
||||
message = e
|
||||
raise CommandError(message)
|
||||
else:
|
||||
top_dir = path.expanduser(target)
|
||||
|
||||
top_dir = os.path.abspath(path.expanduser(target))
|
||||
if not os.path.exists(top_dir):
|
||||
raise CommandError("Destination directory '%s' does not "
|
||||
"exist, please create it first." % top_dir)
|
||||
|
||||
extensions = tuple(
|
||||
handle_extensions(options.get('extensions'), ignored=()))
|
||||
|
||||
Reference in New Issue
Block a user