mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2026-02-08 09:57:46 +00:00
working, moved stuff around a bit, UUID
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import uuid
|
||||
import math
|
||||
import os
|
||||
import re
|
||||
@@ -218,6 +219,14 @@ class SurvexBlock(models.Model):
|
||||
Blocks can span several *included survexfile though.
|
||||
"""
|
||||
|
||||
# This ID is generated as soon as you call SurvexBlock((). So we can use it while assembling the data
|
||||
# into the survexblock without having to keep doing a database transaction
|
||||
_blockid = models.UUIDField(
|
||||
primary_key=False,
|
||||
default=uuid.uuid4,
|
||||
editable=False
|
||||
)
|
||||
|
||||
objects = SurvexBlockLookUpManager() # overwrites SurvexBlock.objects and enables lookup()
|
||||
name = models.CharField(blank=True, max_length=100)
|
||||
title = models.CharField(blank=True, max_length=200)
|
||||
|
||||
Reference in New Issue
Block a user