9👍
✅
The single dot is a convention from command line applications. It means the current directory. In terms of Django it stands for the directory/module the current file is on.
4👍
As others explained .
refers to the current directory (or module / package) of the file that you are currently viewing.
The imports that use this syntax are called relative imports.
PEP 328 describes how relative imports came about and what specific syntax was chosen. The idea behind it was to use periods to determine how to relatively import other packages / modules. The reason was to prevent the accidental shadowing of standard library modules.
- Best Practices: How to best implement Rating-Stars in Django Templates
- Access from external to python development server
- Is it possible to force queryset evaluation while keeping it a queryset
- How do I delete a cached template fragment in Django?
- Save a field as JSON using factoryboy
- Collectstatic and S3: not finding updated files
- Django annotate whether field is null
1👍
while one dot means the current directory if you want upper dicrectory then use double dot just for your referencce
- Django authenticate using logged in windows domain user
- Filter queryset by reverse exists check in Django
- Xhtml2pdf ImportError – Django
- Django settings.cpython-36.pyc not ignored by gitignore
- Google App Engine and Cloud SQL: Lost connection to MySQL server at 'reading initial communication packet'
Source:stackexchange.com