2
0
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:
2026-01-29 11:35:54 +00:00
parent 3783b49162
commit 8455f39809
2 changed files with 208 additions and 113 deletions

View File

@@ -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)