Ticket #6825: model-windows-fix.diff
File model-windows-fix.diff, 1.9 KB (added by , 17 years ago) |
---|
-
tests/modeltests/model_forms/models.py
766 766 <class 'django.newforms.fields.UploadedFile'> 767 767 >>> instance = f.save() 768 768 >>> instance.file 769 u'... /test1.txt'769 u'...test1.txt' 770 770 771 771 # Edit an instance that already has the file defined in the model. This will not 772 772 # save the file again, but leave it exactly as it is. … … 775 775 >>> f.is_valid() 776 776 True 777 777 >>> f.cleaned_data['file'] 778 u'... /test1.txt'778 u'...test1.txt' 779 779 >>> instance = f.save() 780 780 >>> instance.file 781 u'... /test1.txt'781 u'...test1.txt' 782 782 783 783 # Delete the current file since this is not done by Django. 784 784 … … 791 791 True 792 792 >>> instance = f.save() 793 793 >>> instance.file 794 u'... /test2.txt'794 u'...test2.txt' 795 795 796 796 >>> instance.delete() 797 797 … … 810 810 True 811 811 >>> instance = f.save() 812 812 >>> instance.file 813 u'... /test3.txt'813 u'...test3.txt' 814 814 >>> instance.delete() 815 815 816 816 # ImageField ################################################################### … … 832 832 <class 'django.newforms.fields.UploadedFile'> 833 833 >>> instance = f.save() 834 834 >>> instance.image 835 u'... /test.png'835 u'...test.png' 836 836 837 837 # Edit an instance that already has the image defined in the model. This will not 838 838 # save the image again, but leave it exactly as it is. … … 841 841 >>> f.is_valid() 842 842 True 843 843 >>> f.cleaned_data['image'] 844 u'... /test.png'844 u'...test.png' 845 845 >>> instance = f.save() 846 846 >>> instance.image 847 u'... /test.png'847 u'...test.png' 848 848 849 849 # Delete the current image since this is not done by Django. 850 850 … … 857 857 True 858 858 >>> instance = f.save() 859 859 >>> instance.image 860 u'... /test2.png'860 u'...test2.png' 861 861 862 862 >>> instance.delete() 863 863 … … 876 876 True 877 877 >>> instance = f.save() 878 878 >>> instance.image 879 u'... /test3.png'879 u'...test3.png' 880 880 >>> instance.delete() 881 881 882 882 """}