﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
5029	newforms FileField special file naming requirements	Øyvind Saltvik <oyvind@…>	nobody	"Would be nice if the FileField allowed files to be saved based on other attributes on the model.

This requires setting those attributes before the save_form_data (new in #3297) is called by the form to save the file.

The best would be to make this a spechial case that handles those fields last, not only FileFields but any field that requires other model data.

If the saving needs a pk, so the filename/dir of the file is based on the model instance pk. save_form_data shold be called right after commit and save the model instance again. Preferably once and not one save per field. 

The problem with saving twice is if the field has null=False the insert would fail because of missing data on the instance, the solution would be to handle the field both before and after commit. Setting the attribute to '' before the insert, then saving the file on the update."		closed	Forms	dev		duplicate	file naming newforms filefield, fs-rf	jm.bugtracking@… ross@…	Design decision needed	0	0	0	0	0	0
