let form = $('#ajax_form').
$.ajax({
url: form.attr('action'),
type: "POST",
data: form.serialize(),
async: false,
success: function (data) {
console.log(data);
}
});
import winsound
from random import randint
from time import sleep
MAX_FREQUENCY = 2500 # Максимальная частота звука 2500Гц
MAX_DURATION = 1000 # Максимальное время для озвучки одного сигнала 1000 ms
def generate_random_beeps(minutes):
for _ in range(minutes * 60):
frequency = randint(1, MAX_FREQUENCY)
duration = randint(1, MAX_FREQUENCY)
winsound.Beep(frequency, duration)
sleep(1)
pip install django-simplemde
INSTALLED_APPS = (
# ...
'simplemde',
# ...
)
from django.db import models
from simplemde.fields import SimpleMDEField
class Entry(models.Model):
title = models.CharField(max_length=250, verbose_name=u'Title')
content = SimpleMDEField(verbose_name=u'mardown content')