mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Refs #27358 -- Removed invalid/unneeded FileField.upload_to in tests/docs.
This commit is contained in:
parent
ad8f6a45eb
commit
e6262aaaf8
3 changed files with 6 additions and 6 deletions
|
@ -330,7 +330,7 @@ your model explicitly. For example::
|
|||
from django.contrib.sites.managers import CurrentSiteManager
|
||||
|
||||
class Photo(models.Model):
|
||||
photo = models.FileField(upload_to='/home/photos')
|
||||
photo = models.FileField(upload_to='photos')
|
||||
photographer_name = models.CharField(max_length=100)
|
||||
pub_date = models.DateField()
|
||||
site = models.ForeignKey(Site, on_delete=models.CASCADE)
|
||||
|
@ -367,7 +367,7 @@ demonstrates this::
|
|||
from django.contrib.sites.managers import CurrentSiteManager
|
||||
|
||||
class Photo(models.Model):
|
||||
photo = models.FileField(upload_to='/home/photos')
|
||||
photo = models.FileField(upload_to='photos')
|
||||
photographer_name = models.CharField(max_length=100)
|
||||
pub_date = models.DateField()
|
||||
publish_on = models.ForeignKey(Site, on_delete=models.CASCADE)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue