Skip to content

Instantly share code, notes, and snippets.

@skolo-online
Created August 22, 2021 09:13
Show Gist options
  • Save skolo-online/1da438dc575559641e8e76945804d976 to your computer and use it in GitHub Desktop.
Save skolo-online/1da438dc575559641e8e76945804d976 to your computer and use it in GitHub Desktop.
create invoice part 1 view
@login_required
def createInvoice(request):
#create a blank invoice ....
number = 'INV-'+str(uuid4()).split('-')[1]
newInvoice = Invoice.objects.create(number=number)
newInvoice.save()
inv = Invoice.objects.get(number=number)
return redirect('create-build-invoice', slug=inv.slug)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment