Hi! It's my first time trying to achieve the ''file upload functionality' and I need your help. I'm working on a legacy db and I'm supposed to do the file upload in a table that gets created this way:
CREATE TABLE "LICENCE" ( "ID" NUMBER NOT NULL ENABLE, "VEH_ID" NUMBER NOT NULL ENABLE, "DTP_ID" NUMBER NOT NULL ENABLE, "LICENCENO" VARCHAR2(50 CHAR) NOT NULL ENABLE, "ISSUEDATE" DATE, "STARTDATE" DATE, "EXPIREDATE" DATE, "DOCPATH" VARCHAR2(500 CHAR), "CHECKFLAG" NUMBER(1,0) NOT NULL ENABLE, CONSTRAINT "LIC_PK" PRIMARY KEY ("ID") ENABLE, CONSTRAINT "LIC_DTP_FK" FOREIGN KEY ("DTP_ID") REFERENCES "DOCTYPES" ("ID") ENABLE, CONSTRAINT "LIC_VEH_FK" FOREIGN KEY ("VEH_ID") REFERENCES "VEHICLES" ("ID") ENABLE ) / With inspectdb, I got this table: class Licence(models.Model): id = models.DecimalField(unique=True, primary_key=True, max_digits=127, decimal_places=0) veh_id = models.ForeignKey(Vehicles, db_column='veh_id') dtp_id = models.ForeignKey(Doctypes, db_column='dtp_id') licenceno = models.CharField(max_length=200) issuedate = models.DateField(null=True, blank=True) startdate = models.DateField(null=True, blank=True) expiredate = models.DateField(max_length=2000, blank=True) docpath = models.CharField(max_length=200) checkflag = models.IntegerField() def __unicode__(self): return self.licenceno How should I handle the upload?My thought after reading the file upload documentation was to modify the docpath to filefield. Is that the right practice?Because I tried it, and the form doesn't validate, I get the error "No file chosen". Can anyone guide me through this?Thank you.. -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/eo_e4m3hye8J. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.