Hi everyone, I'd really appreciate your help here!
I have just designed a model for my data that I want to publish as a webform, that people fill in, however there are only certain bits I want them to fill in as i'll be filling the rest in later as the work progresses. is the model here correct (i'm not sure if i've imported all the correct modules). I have put an asterisk next to the ones i don't want them to be able to fill in (i'd ideally like to have them have to input a user name and password)... but i don't know how to do that... i'm only at the model stage at the moment. i have changed the names to protect the guilty! My questions are i suppose: 1). is the model correct? 2). do i need to change something in the asterisked code (this is not actually asterisked in my model.py code) so that only the person who is requested to do the work can add these details 3). have i imported all the necessary modules 4). at the is the commented (hashed) bit a good idea - should I do what i'm thinking of doing in the commented field. 5). do you have any suggestions?? here is the code: from django.db import models, datetime # Models for Resource Request Form. CHK_APP_CHOICES = ( ('STA', 'Simon Abbey''), ('JK', 'James Kong'), ('SF', 'Stavros Flatley'), ) class RrsForm(models.Model) date_created = models.DateTimeField(auto_now_add=True) last_modified = models.DateTimeField(auto_now=True) project_and_task = models.CharField(max_length=200) project_number = models.IntegerField() requested_by = models.CharField(max_length=128) email_address = models.EmailField(max_length=75) resource_person = models.CharField("name of person to request resource from", max_length = 128) location = models.CharField("location of requester", max_length= 64) details = models.TextField("detailed description of task") to_check_by = models.CharField(max_length=3, choices=CHK_APP_CHOICES) to_approve_by = models.CharField(max_length=3, choices=CHK_APP_CHOICES) internal_contacts = models.CharField(max_length=200) external_contacts = models.CharField(max_length=200) exp_hours = models.IntegerField("expected hours", max_length=4) * act_hours = models.IntegerField("actual hours", max_length=4) * hours_dev = models.CharField("reason for any deviationin hours", max_length=200) exp_date_checking = models.DateField("expected release date for checking") * act_date_checking = models.DateField("actual release date for checking") * chk_date_dev = models.CharField("reason for any deviation check date", max_length=200) des_output = models.CharField("desired format of output: eg formal/ informal document, email, verbal, meeting, other (specify)", max_length=200) exp_date_final = models.DateField("expected release date for final document") * act_date_final = models.DateField("actual release date for final document") * fin_date_dev = models.CharField("reason for any deviation for final document", max_length=200) * document_num_loc = models.CharField("path of file on work server", max_length=200) # document saved to area on webserver as well * upload_doc = models.FileField(upload_to'documents') * comments = models.TextField() * rel_prev_work = models.TextField("related to previous work") * keywords = models.TextField() def __unicode__(self): return (self.project_and_task, self.project_number, self.date_created, self.requested_by) # may change requested_by to: # requested_by = models.ForeignKey(Person) # ## and then add a Person class after the RrsForm class? # #class Person(models.Model) # first_name = models.CharField(max_length=50) # last_name = models.CharField(max_length=50) # # END OF CODE Thanks! Krondaj -- You received this message because you are subscribed to the Google Groups "Django users" group. 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.