Skip to content

Instantly share code, notes, and snippets.

View PanCakeConnaisseur's full-sized avatar
💭
It may take some time until I respond

Alexey Abel PanCakeConnaisseur

💭
It may take some time until I respond
  • Germany
View GitHub Profile
@jirutka
jirutka / rules-both.iptables
Created September 18, 2012 12:42
Basic iptables template for ordinary servers (both IPv4 and IPv6)
###############################################################################
# The MIT License
#
# Copyright 2012-2014 Jakub Jirutka <[email protected]>.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
@spookylukey
spookylukey / two_forms_one_view.txt
Created June 29, 2016 10:49
Two forms one view
# Views
def two_form_view(request):
context = {}
if request.method == "POST":
question_form = QuestionForm(request.POST)
answer_form = AnswerForm(request.POST)
success = False
if 'q_button' in request.POST and question_form.is_valid()
question_form.save()