Best Python code snippet using toolium_python
models.py
Source:models.py
...5## Possible field in db models6#owner = models.ForeignKey(User)7class Aspect(models.Model):8 #aspectkey = models.IntegerField(db_column='AspectKey', primary_key=True)9 def get_subclass_name(self):10 return self.__class__.__name__11 12 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)13 name = models.CharField(db_column='Name', max_length=100)14 description = models.CharField(db_column='Description', max_length=500, blank=True)15 class Meta:16 db_table = 'Aspect'17class Bodypart(models.Model):18 #bodypartkey = models.IntegerField(db_column='BodyPartKey', primary_key=True)19 def get_subclass_name(self):20 return self.__class__.__name__21 22 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)23 name = models.CharField(db_column='Name', max_length=100)24 description = models.CharField(db_column='Description', max_length=500, blank=True)25 startskeletonindex = models.FloatField(db_column='StartSkeletonIndex', blank=True, null=True)26 endskeletonindex = models.FloatField(db_column='EndSkeletonIndex', blank=True, null=True)27 startskeletonindexdeprecated = models.FloatField(db_column='StartSkeletonIndexDEPRECATED', blank=True, null=True)28 endskeletonindexdeprecated = models.FloatField(db_column='EndSkeletonIndexDEPRECATED', blank=True, null=True)29 class Meta:30 db_table = 'BodyPart'31class Category(models.Model):32 #categorykey = models.IntegerField(db_column='CategoryKey', primary_key=True)33 def get_subclass_name(self):34 return self.__class__.__name__35 36 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)37 name = models.CharField(db_column='Name', max_length=100)38 description = models.CharField(db_column='Description', max_length=500, blank=True)39 class Meta:40 db_table = 'Category'41class Computervisionalgorithm(models.Model):42 #cvalgorithmkey = models.IntegerField(db_column='CVAlgorithmKey', primary_key=True)43 def get_subclass_name(self):44 return self.__class__.__name__45 46 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)47 name = models.CharField(db_column='Name', max_length=100)48 description = models.CharField(db_column='Description', max_length=500, blank=True)49 framebyframe = models.CharField(db_column='FrameByFrame', max_length=1)50 author = models.CharField(db_column='Author', max_length=20, blank=True)51 academicpaper = models.CharField(db_column='AcademicPaper', max_length=20, blank=True)52 code = models.CharField(db_column='Code', max_length=100)53 class Meta:54 db_table = 'ComputerVisionAlgorithm'55class Direction(models.Model):56 # directionkey = models.IntegerField(db_column='DirectionKey', primary_key=True)57 def get_subclass_name(self):58 return self.__class__.__name__59 60 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)61 name = models.CharField(db_column='Name', max_length=20, blank=True)62 description = models.CharField(db_column='Description', max_length=500, blank=True)63 class Meta:64 db_table = 'Direction'65class Experimenter(models.Model):66 #experimenterkey = models.IntegerField(db_column='ExperimenterKey', primary_key=True)67 labkey = models.ForeignKey('Lab', db_column='LabKey')68 def get_subclass_name(self):69 return self.__class__.__name__70 71 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)72 name = models.CharField(db_column='Name', max_length=100)73 description = models.CharField(db_column='Description', max_length=500, blank=True)74 class Meta:75 db_table = 'Experimenter'76class Featuresperplatewireframe(models.Model):77 #featuresperplatewireframe = models.IntegerField(db_column='FeaturesPerPlateWireframe', primary_key=True)78 platefeaturekey = models.ForeignKey('Platefeature', db_column='PlateFeatureKey')79 def get_subclass_name(self):80 return self.__class__.__name__81 82 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)83 value = models.TextField(db_column='Value', blank=True)84 platewireframevideokey = models.ForeignKey('Platewireframevideo', db_column='PlateWireframeVideoKey')85 class Meta:86 db_table = 'FeaturesPerPlateWireframe'87class Featuresperwormwireframe(models.Model):88 #featuresperwormwireframekey = models.IntegerField(db_column='FeaturesPerWormWireframeKey', primary_key=True)89 wormfeaturekey = models.ForeignKey('Wormfeature', db_column='WormFeatureKey')90 wormwireframekey = models.ForeignKey('Wormwireframevideo', db_column='WormWireframeKey')91 def get_subclass_name(self):92 return self.__class__.__name__93 94 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)95 value = models.TextField(db_column='Value', blank=True)96 class Meta:97 db_table = 'FeaturesPerWormWireframe'98class Histogramsperplatewireframe(models.Model):99 #histogramsperplatewireframekey = models.IntegerField(db_column='HistogramsPerPlateWireframeKey', primary_key=True)100 platewireframevideokey = models.ForeignKey('Platewireframevideo', db_column='PlateWireframeVideoKey')101 def get_subclass_name(self):102 return self.__class__.__name__103 104 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)105 bins = models.TextField(db_column='Bins', blank=True)106 counts = models.TextField(db_column='Counts', blank=True)107 class Meta:108 db_table = 'HistogramsPerPlateWireframe'109class Histogramsperwormwireframe(models.Model):110 #histogramsperwormwireframekey = models.IntegerField(db_column='HistogramsPerWormWireframeKey', primary_key=True)111 eventdirectionkey = models.ForeignKey('Direction', db_column='EventDirectionKey')112 wormfeaturekey = models.ForeignKey('Wormfeature', db_column='WormFeatureKey')113 wormwireframekey = models.ForeignKey('Wormwireframevideo', db_column='WormWireframeKey')114 signkey = models.ForeignKey('Sign', db_column='SignKey')115 def get_subclass_name(self):116 return self.__class__.__name__117 118 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)119 bins = models.TextField(db_column='Bins', blank=True)120 counts = models.TextField(db_column='Counts', blank=True)121 class Meta:122 db_table = 'HistogramsPerWormWireframe'123class Lab(models.Model):124 #labkey = models.IntegerField(db_column='LabKey', primary_key=True)125 def get_subclass_name(self):126 return self.__class__.__name__127 128 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)129 name = models.CharField(db_column='Name', max_length=100)130 description = models.CharField(db_column='Description', max_length=500, blank=True)131 address = models.CharField(db_column='Address', max_length=20, blank=True)132 class Meta:133 db_table = 'Lab'134class Measurementsperwormwireframe(models.Model):135 #measurementsperwormwireframe = models.IntegerField(db_column='MeasurementsPerWormWireframe', primary_key=True)136 wormmeasurementkey = models.ForeignKey('Wormmeasurement', db_column='WormMeasurementKey')137 wormwireframekey = models.ForeignKey('Wormwireframevideo', db_column='WormWireframeKey')138 def get_subclass_name(self):139 return self.__class__.__name__140 141 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)142 value = models.TextField(db_column='Value', blank=True)143 class Meta:144 db_table = 'MeasurementsPerWormWireframe'145class Plate(models.Model):146 #platekey = models.IntegerField(db_column='PlateKey', primary_key=True)147 experimenterkey = models.ForeignKey(Experimenter, db_column='ExperimenterKey')148 wormlistkey = models.ForeignKey('Wormlist', db_column='WormListKey')149 def get_subclass_name(self):150 return self.__class__.__name__151 name = models.CharField(db_column='Name', max_length=100)152 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)153 sampletype = models.CharField(db_column='SampleType', max_length=18, blank=True)154 startdatetime = models.DateTimeField(db_column='StartDateTime', blank=True, null=True)155 copyright = models.CharField(db_column='Copyright', max_length=20, blank=True)156 vulvaorientation = models.CharField(db_column='VulvaOrientation', max_length=20, blank=True)157 annotation = models.CharField(db_column='Annotation', max_length=20, blank=True)158 chemicals = models.CharField(db_column='Chemicals', max_length=20, blank=True)159 food = models.CharField(db_column='Food', max_length=20, blank=True)160 illumination = models.CharField(db_column='Illumination', max_length=20, blank=True)161 temperature = models.IntegerField(db_column='Temperature', blank=True, null=True)162 tracker = models.CharField(db_column='Tracker', max_length=20, blank=True)163 agarside = models.CharField(db_column='AgarSide', max_length=20, blank=True)164 gasconcentration = models.TextField(db_column='GasConcentration', blank=True)165 class Meta:166 db_table = 'Plate'167class Platefeature(models.Model):168 #platefeaturekey = models.IntegerField(db_column='PlateFeatureKey', primary_key=True)169 def get_subclass_name(self):170 return self.__class__.__name__171 172 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)173 name = models.CharField(db_column='Name', max_length=100)174 description = models.CharField(db_column='Description', max_length=500, blank=True)175 title = models.CharField(db_column='Title', max_length=20, blank=True)176 shorttitle = models.CharField(db_column='ShortTitle', max_length=20, blank=True)177 class Meta:178 db_table = 'PlateFeature'179class Platerawvideo(models.Model):180 #platerawvideokey = models.IntegerField(db_column='PlateRawVideoKey', primary_key=True)181 platekey = models.ForeignKey(Plate, db_column='PlateKey')182 def get_subclass_name(self):183 return self.__class__.__name__184 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)185 name = models.CharField(db_column='Name', max_length=100)186 description = models.CharField(db_column='Description', max_length=500, blank=True)187 title = models.CharField(db_column='Title', max_length=20, blank=True)188 shorttitle = models.CharField(db_column='ShortTitle', max_length=20, blank=True)189 videofileurl = models.URLField(db_column='VideoFileURL', max_length=200)190 fps = models.IntegerField(db_column='FPS', blank=True, null=True)191 numframes = models.FloatField(db_column='NumFrames', blank=True, null=True)192 width = models.IntegerField(db_column='Width', blank=True, null=True)193 height = models.IntegerField(db_column='Height', blank=True, null=True)194 micronsperpixel = models.IntegerField(db_column='MicronsPerPixel', blank=True, null=True)195 class Meta:196 db_table = 'PlateRawVideo'197class Platewireframevideo(models.Model):198 #platewireframevideokey = models.IntegerField(db_column='PlateWireframeVideoKey', primary_key=True)199 platerawvideokey = models.ForeignKey(Platerawvideo, db_column='PlateRawVideoKey')200 cvalgorithmkey = models.ForeignKey(Computervisionalgorithm, db_column='CVAlgorithmKey')201 def get_subclass_name(self):202 return self.__class__.__name__203 204 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)205 name = models.CharField(db_column='Name', max_length=100)206 wireframevideo = models.TextField(db_column='WireframeVideo', blank=True)207 droppedframeinfo = models.TextField(db_column='DroppedFrameInfo', blank=True)208 class Meta:209 db_table = 'PlateWireframeVideo'210class Sign(models.Model):211 #signkey = models.IntegerField(db_column='SignKey', primary_key=True)212 def get_subclass_name(self):213 return self.__class__.__name__214 215 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)216 name = models.CharField(db_column='Name', max_length=100)217 description = models.CharField(db_column='Description', max_length=500, blank=True)218 class Meta:219 db_table = 'Sign'220class Strain(models.Model):221 #strainkey = models.IntegerField(db_column='StrainKey', primary_key=True)222 def get_subclass_name(self):223 return self.__class__.__name__224 225 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)226 name = models.CharField(db_column='Name', max_length=100)227 gene = models.CharField(db_column='Gene', max_length=20, blank=True)228 genotype = models.TextField(db_column='Genotype', blank=True)229 allele = models.CharField(db_column='Allele', max_length=20, blank=True)230 chromosome = models.CharField(db_column='Chromosome', max_length=20, blank=True)231 simulated = models.CharField(db_column='Simulated', max_length=1)232 class Meta:233 db_table = 'Strain'234class Type(models.Model):235 #typekey = models.IntegerField(db_column='TypeKey', primary_key=True)236 def get_subclass_name(self):237 return self.__class__.__name__238 239 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)240 name = models.CharField(db_column='Name', max_length=100)241 description = models.CharField(db_column='Description', max_length=500, blank=True)242 class Meta:243 db_table = 'Type'244"""245class User(models.Model):246 #userid = models.IntegerField(db_column='UserID', primary_key=True)247 name = models.CharField(db_column='Name', max_length=20, blank=True)248 accesslevel = models.FloatField(db_column='AccessLevel', blank=True, null=True)249 labkey = models.ForeignKey(Lab, db_column='LabKey')250 class Meta:251 db_table = 'User'252"""253"""254class Videoattributes(models.Model):255 #videometadatakey = models.CharField(db_column='VideoMetadataKey', primary_key=True, max_length=18)256 def get_subclass_name(self):257 return self.__class__.__name__258 259 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)260 fps = models.IntegerField(db_column='FPS', blank=True, null=True)261 numframes = models.FloatField(db_column='NumFrames', blank=True, null=True)262 width = models.IntegerField(db_column='Width', blank=True, null=True)263 height = models.IntegerField(db_column='Height', blank=True, null=True)264 micronsperpixel = models.IntegerField(db_column='MicronsPerPixel', blank=True, null=True)265 class Meta:266 db_table = 'VideoAttributes'267"""268class Worm(models.Model):269 #wormkey = models.IntegerField(db_column='WormKey', primary_key=True)270 strainkey = models.ForeignKey(Strain, db_column='StrainKey')271 def get_subclass_name(self):272 return self.__class__.__name__273 274 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)275 name = models.CharField(db_column='Name', max_length=100)276 sex = models.CharField(db_column='Sex', max_length=20, blank=True)277 thaweddate = models.DateTimeField(db_column='ThawedDate', blank=True, null=True)278 generationssincethawing = models.FloatField(db_column='GenerationsSinceThawing', blank=True, null=True)279 habituation = models.CharField(db_column='Habituation', max_length=20, blank=True)280 class Meta:281 db_table = 'Worm'282class Wormfeature(models.Model):283 #wormfeaturekey = models.IntegerField(db_column='WormFeatureKey', primary_key=True)284 typekey = models.ForeignKey(Type, db_column='TypeKey')285 categorykey = models.ForeignKey(Category, db_column='CategoryKey')286 directionkey = models.ForeignKey(Direction, db_column='DirectionKey')287 aspectkey = models.ForeignKey(Aspect, db_column='AspectKey')288 bodypartkey = models.ForeignKey(Bodypart, db_column='BodyPartKey')289 featureindex = models.FloatField(db_column='FeatureIndex', blank=True, null=True)290 def get_subclass_name(self):291 return self.__class__.__name__292 293 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)294 name = models.CharField(db_column='Name', max_length=100)295 title = models.CharField(db_column='Title', max_length=20, blank=True)296 shorttitle = models.CharField(db_column='ShortTitle', max_length=20, blank=True)297 description = models.CharField(db_column='Description', max_length=500, blank=True)298 bin_width = models.IntegerField(blank=True, null=True)299 is_signed = models.CharField(max_length=1)300 is_time_series = models.CharField(max_length=1)301 is_zero_bin = models.IntegerField()302 units = models.CharField(max_length=20, blank=True)303 signed_field = models.CharField(max_length=20, blank=True)304 remove_partial_events = models.CharField(max_length=1)305 make_zero_if_empty = models.CharField(max_length=1)306 name = models.CharField(db_column='Name', max_length=100)307 class Meta:308 db_table = 'WormFeature'309class Worminteraction(models.Model):310 #worminteractionkey = models.CharField(db_column='WormInteractionKey', primary_key=True, max_length=18)311 platewireframevideokey = models.ForeignKey(Platewireframevideo, db_column='PlateWireframeVideoKey')312 wormlistkey = models.ForeignKey('Wormlist', db_column='WormListKey')313 def get_subclass_name(self):314 return self.__class__.__name__315 316 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)317 framebyframewormparticipation = models.TextField(db_column='FrameByFrameWormParticipation', blank=True)318 area = models.TextField(db_column='Area', blank=True)319 interactiontype = models.CharField(db_column='InteractionType', max_length=20, blank=True)320 startframe = models.FloatField(db_column='StartFrame', blank=True, null=True)321 endframe = models.FloatField(db_column='EndFrame', blank=True, null=True)322 class Meta:323 db_table = 'WormInteraction'324class Wormlist(models.Model):325 #wormlistkey = models.IntegerField(db_column='WormListKey', primary_key=True)326 wormkey = models.ForeignKey(Worm, db_column='WormKey')327 def get_subclass_name(self):328 return self.__class__.__name__329 330 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)331 name = models.CharField(db_column='Name', max_length=100)332 class Meta:333 db_table = 'WormList'334class Wormmeasurement(models.Model):335 #wormmeasurementskey = models.IntegerField(db_column='WormMeasurementsKey', primary_key=True)336 def get_subclass_name(self):337 return self.__class__.__name__338 339 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)340 name = models.CharField(db_column='Name', max_length=100)341 description = models.CharField(db_column='Description', max_length=500, blank=True)342 class Meta:343 db_table = 'WormMeasurement'344class Wormwireframevideo(models.Model):345 #wormwireframekey = models.IntegerField(db_column='WormWireframeKey', primary_key=True)346 platewireframevideokey = models.ForeignKey(Platewireframevideo, db_column='PlateWireframeVideoKey')347 def get_subclass_name(self):348 return self.__class__.__name__349 350 timestamp = models.DateTimeField(db_column="Timestamp", auto_now_add=True)351 name = models.CharField(db_column='Name', max_length=100)352 wireframevideo = models.TextField(db_column='WireframeVideo', blank=True)353 droppedframeinfo = models.TextField(db_column='DroppedFrameInfo', blank=True)354 class Meta:...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!