Skip to content

Instantly share code, notes, and snippets.

@axeliodiaz
axeliodiaz / messages_and_errors_django_template.html
Created April 15, 2017 18:16 — forked from adamghill/messages_and_errors_django_template.html
Show messages and errors in Django templates. Useful to just throw in a base template.
{% if messages %}
{% for message in messages %}
<div class="alert {% if message.tags %} alert-{{ message.tags }}{% endif %}">{{ message|safe }}</div>
{% endfor %}
{% endif %}
{% if form.errors %}
<div class="alert alert-error">
<h4>Please fix the following errors</h4>
<ul>
@axeliodiaz
axeliodiaz / howto_deb_repackage.txt
Last active January 10, 2023 08:36 — forked from shamil/howto_deb_repackage.txt
Howto repackage deb packages
Use folowing steps to repackage dep package:
1: Make dirs
# mkdir extract/DEBIAN build -p
2: Extract deb package
# dpkg-deb -x <package.deb> extract/
3: Extract control-information from a package
# dpkg-deb -e <package.deb> extract/DEBIAN
host=http://cdn.debian.net
host_multimedia=deb-multimedia.org
host_security=security.debian.org
root=debian
root_multimedia=/
root_security=/
dist=wheezy
dist_security=wheezy/updates
dist_backports=wheezy-backports
dist_updates=wheezy-updates