You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Whenever I have a mixture of quotes, paratheses, and numbers in a string, django-unicorn fails to parse the string on the backend. An example string where this fails would be:
Based on the error traceback, it looks like the quote aren't wrapped properly via JSON serialization, which then cause the value
to be broken up / buggy in python:
(only the relevant code blocks are shown for simplicity)
python
classExampleView(UnicornView):
classMeta:
javascript_exclude= (
"catalyst_options",
# ... plus others
)
catalysts= []
new_catalyst=Nonenew_catalyst_equiv=None@propertydefcatalyst_options(self):
# This method normally pulls from a database model, but I just put a# list as an examplereturn [
"APhos Pd G3",
"Bis(1,5-cyclooctadiene)nickel(0)",
# SELECTING THIS STRING FAILS WITH ERROR SHOWN BELOW <------------------------- !!!!"Chloro(2-dicyclohexylphosphino-3,6-dimethoxy-2',4',6'-tri-i-propyl-1,1'-biphenyl)(2'-amino-1,1'-biphenyl-2-yl)palladium(II)",
]
defset_new_catalyst(self, new_catalyst):
self.new_catalyst=new_catalystdefadd_new_catalyst(self):
new_catalyst= [self.new_catalyst, self.new_catalyst_equiv]
self.catalysts.append(new_catalyst)
# reset for next additionself.new_catalyst=Noneself.new_catalyst_equiv=Nonedefremove_catalyst(self, remove_idx):
self.catalysts.pop(remove_idx)
summary
Whenever I have a mixture of quotes, paratheses, and numbers in a string, django-unicorn fails to parse the string on the backend. An example string where this fails would be:
"Chloro(2-dicyclohexylphosphino-3,6-dimethoxy-2',4',6'-tri-i-propyl-1,1'-biphenyl)(2'-amino-1,1'-biphenyl-2-yl)palladium(II)"
Based on the error traceback, it looks like the quote aren't wrapped properly via JSON serialization, which then cause the value
to be broken up / buggy in python:
code
(only the relevant code blocks are shown for simplicity)
python
django html template
The key line where the error happens:
The full section for this variable:
The error traceback
The text was updated successfully, but these errors were encountered: