Django 1.8.x DocumentationDo I have to use your model/database layer? How do I use image and file fields? How do I make a variable available to all my templates? FAQ: Getting Help How do I do X? Why doesn’t Y work? Where can “pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Bypassing manage.py0 码力 | 2454 页 | 2.85 MB | 1 年前3
Django 2.2.x DocumentationDo I have to use your model/database layer? How do I use image and file fields? How do I make a variable available to all my templates? FAQ: Getting Help How do I do X? Why doesn’t Y work? Where can “pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Once you’re in the0 码力 | 2915 页 | 2.83 MB | 1 年前3
Django 1.11.x DocumentationDo I have to use your model/database layer? How do I use image and file fields? How do I make a variable available to all my templates? FAQ: Getting Help How do I do X? Why doesn’t Y work? Where can “pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Bypassing manage.py0 码力 | 2747 页 | 2.67 MB | 1 年前3
Django 1.8.x Documentation“pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Bypassing manage.py If you’d rather not use manage.py, no problem. Just set the DJANGO_SETTINGS_MODULE environment variable to mysite.settings, start a plain Python shell, and set up Django: >>> import django >>> django0 码力 | 1685 页 | 6.01 MB | 1 年前3
Django 1.10.x DocumentationDo I have to use your model/database layer? How do I use image and file fields? How do I make a variable available to all my templates? FAQ: Getting Help How do I do X? Why doesn’t Y work? Where can “pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Bypassing manage.py0 码力 | 2538 页 | 2.59 MB | 1 年前3
Django 2.1.x DocumentationDo I have to use your model/database layer? How do I use image and file fields? How do I make a variable available to all my templates? FAQ: Getting Help How do I do X? Why doesn’t Y work? Where can “pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Once you’re in the0 码力 | 2790 页 | 2.71 MB | 1 年前3
Django 2.0.x DocumentationDo I have to use your model/database layer? How do I use image and file fields? How do I make a variable available to all my templates? FAQ: Getting Help How do I do X? Why doesn’t Y work? Where can “pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Once you’re in the0 码力 | 2746 页 | 2.67 MB | 1 年前3
Django 1.11.x Documentation“pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Bypassing manage.py If you’d rather not use manage.py, no problem. Just set the DJANGO_SETTINGS_MODULE environment variable to mysite.settings, start a plain Python shell, and set up Django: >>> import django >>> django0 码力 | 1878 页 | 6.40 MB | 1 年前3
Django 2.1.x Documentation“pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Once you’re in the # Find all Choices for any question whose pub_date is in this year # (reusing the 'current_year' variable we created above). >>> Choice.objects.filter(question__pub_date__year=current_year)0 码力 | 1910 页 | 6.49 MB | 1 年前3
Django 4.1.x DocumentationDo I have to use your model/database layer? How do I use image and file fields? How do I make a variable available to all my templates? FAQ: Getting Help How do I do X? Why doesn’t Y work? Where can “pipe” (the “|” character). This is called a template filter, and it’s a way to filter the value of a variable. In this case, the date filter formats a Python datetime object in the given format (as found in instead of simply typing “python”, because manage.py sets the DJANGO_SETTINGS_MODULE environment variable, which gives Django the Python import path to your mysite/settings.py file. Once you’re in the0 码力 | 3240 页 | 3.13 MB | 1 年前3
共 53 条
- 1
- 2
- 3
- 4
- 5
- 6













