The upload_to
arg of the FileField
can be a callable. see the docs
If you really need to only store the file name, I think you can do something like this. I did'nt try myself but I think it works.
def only_filename(instance, filename):
return filename
class MyModel(models.Model):
file = models.FileField(upload_to=only_filename)