dodati payment kodovi, generisanje kodova, pdf view,promena payment page
This commit is contained in:
@@ -12,7 +12,7 @@ import matplotlib.pyplot as plt
|
||||
from django.contrib.staticfiles.finders import find
|
||||
import matplotlib.image as mpimg
|
||||
site_domain = settings.SITE_DOMAIN
|
||||
|
||||
import random
|
||||
|
||||
|
||||
|
||||
@@ -342,3 +342,7 @@ def generate_residual_risk_graph(risks_with_controls):
|
||||
plt.close()
|
||||
|
||||
return base64.b64encode(image_png).decode("utf-8")
|
||||
|
||||
def generate_payment_code(length=6):
|
||||
chars = 'ABCDEFGHJKLMNPQRSTUVWXYZ23456789'
|
||||
return ''.join(random.choices(chars, k=length))
|
||||
Reference in New Issue
Block a user