django.db.utils.OperationalError: (1045, "Access denied for user 'django'@'localhost' (using password: YES)")
var text = $('#form-new-task-z-r-text').val();
var my_file = $('#file_record').prop('files');
$.ajax({
type: 'POST',
url: 'add_new_rec/'+prot_id+'/'+id_q+'/',
async: true,
cache: false,
processData: false,
contentType: false,
enctype: 'multipart/form-data',
data: {csrfmiddlewaretoken: getCookie('csrftoken'), 'r_text':text, 'file':my_file},
success: function(data) {
//...
def add_new_rec(request,id_prot,id_q):
text = request.POST.get('r_text')
return HttpResponse(str(text))
url(r'^ myview /([\d]+)/([\d]+)/([\d]+)/$', views. myview, name=' myview '),
def myview(request, param1, param2, param3):
…
class Meeting(models.Model):
year = models.IntegerField('Год')
number = models.IntegerField('Номер в году')
data = models.DateField('Дата проведения')
persons = models.ManyToManyField('mainapp.User', blank=True)
documents = models.ManyToManyField('mainapp.Document', blank=True)
questions = models.ManyToManyField('mainapp.Question', blank=True)
count_persons = models.IntegerField('Количество человек', blank=True, null=True)
…
class User(models.Model):
fio = models.CharField('ФИО', max_length=256)
user_post = models.CharField('Должность', max_length=256)
…