问题描述
这是用Django编写的代码。当我在链接的显示结果上单击链接时,应保存href的文本链接(例如,以下代码在{{post.0}}中呈现的Redmi Note 5)并传递该文本{{pass.0 }},并将{{pass.1}}链接到另一个页面以获取相同的文本,并将其用作标题。我该怎么办?
Page1.html
from cryptography.fernet import Fernet
key = Fernet.generate_key()
cipher_suite = Fernet(key)
string = input("string here")
string = bytes(string,'utf-8')
print(string)
cipher_text = cipher_suite.encrypt(string)
print(cipher_text)
plain_text = cipher_suite.decrypt(cipher_text)
plain_text = plain_text.decode()
print(plain_text)
Page2.html
{% for post in product_names %}
<a href="{{ post.1 }}" onclick="savefunc({{post.1}},{{post.0}})">{{ post.0 }}</p>
{% endfor %}
接受JS或Django中的建议。请帮助我。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)