Advertisement
Guest User

Untitled

a guest
Jun 4th, 2013
47
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.60 KB | None | 0 0
  1. # С этими моделями всё нормально
  2. class Reaction(models.Model):
  3.     reaction = models.TextField(blank=True)
  4.  
  5.  
  6. class Catalyst(models.Model):
  7.     reaction = models.OneToOneField(Reaction)
  8.     name = models.TextField(blank=True)
  9.     composition = models.TextField(blank=True)
  10.     sketch = models.TextField(blank=True)
  11.  
  12.  
  13. class Characteristic(models.Model):
  14.     reaction = models.OneToOneField(Reaction)
  15.     activity_rate = models.FloatField(default=0)
  16.     life_time_min = models.FloatField(default=0)
  17.     life_time_max = models.FloatField(default=0)
  18.     surf_area = models.FloatField(default=0)
  19.  
  20.  
  21. class Comment(models.Model):
  22.     reaction = models.OneToOneField(Reaction)
  23.     comment = models.TextField(blank=True)
  24.  
  25.  
  26. class Condition(models.Model):
  27.     reaction = models.OneToOneField(Reaction)
  28.     temp_min = models.FloatField()
  29.     temp_max = models.FloatField()
  30.     pressure_min = models.FloatField()
  31.     pressure_max = models.FloatField()
  32.     space_velocity_min = models.FloatField()
  33.     space_velocity_max = models.FloatField()
  34.  
  35. # А вот с этими нет
  36. class Product:
  37.     reaction = models.ForeignKey(Reaction)
  38.     formula = models.TextField(blank=True)
  39.     product = models.TextField(blank=True)
  40.     product_upac = models.TextField(blank=True)
  41.     casn_r = models.CharField(max_length=30, blank=True)
  42.     sketch = models.TextField(blank=True)
  43.     selectivity_min = models.FloatField()
  44.     selectivity_max = models.FloatField()
  45.     yield_min = models.FloatField()
  46.     yield_max = models.FloatField()
  47.     ee_min = models.FloatField()
  48.     ee_max = models.FloatField()
  49.     dr_min = models.FloatField()
  50.     dr_max = models.FloatField()
  51.  
  52.  
  53. class Reactant:
  54.     reaction = models.ForeignKey(Reaction)
  55.     formula = models.TextField(blank=True)
  56.     reactant = models.TextField(blank=True)
  57.     reactant_upac = models.TextField(blank=True)
  58.     casn_r = models.CharField(max_length=30, blank=True)
  59.     sketch = models.TextField(blank=True)
  60.     activity_conversion_min = models.FloatField()
  61.     activity_conversion_max = models.FloatField()
  62.  
  63.  
  64. class Reference:
  65.     reaction = models.OneToOneField(Reaction)
  66.     authors = models.TextField(blank=True)
  67.     literature = models.TextField(blank=True)
  68.     title = models.TextField(blank=True)
  69.     year = models.IntegerField(max_length=4, blank=True)
  70.     volume = models.CharField(max_length=30, blank=True)
  71.     issn_isbn = models.CharField(max_length=100, blank=True)
  72.     publisher = models.TextField(blank=True)
  73.     no_issue = models.CharField(max_length=30, blank=True)
  74.     pages = models.CharField(max_length=30, blank=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement