I have a phone unit unit that contains many properties for many unit entity classes I An exception is given during the rendering of a template ("You must define a associated_property option or Create a \ __counter __ \ Examens \ ExamensBundle \ unit \ Grade Proxy :: __ toString service examens.examens.admin.fonctionnaire from the field option idGrade to the method is in SonataDoctrineORMAdminBundle "): CRUD: Line_ on line_list_orm_many_to_one.html.tw Fontionnaire.php class: & lt ;? Php namespace exams \ ExamensBundle \ Entity; Use the theory / ORM \ mapping as an ORM; / ** * PhoneNationLayer * / Class Fictionalair {//...//// ** * @VARAEfimens \ Examinations Bundle \ Unit \ Grade * / Private $ IDGed; //...//} FonctionnaireAdmin.php: & lt ;? Php namespace exams ExamensBundle \ Admin; Use Sonata \ AdminBundle \ Admin \ Admin; Sonata \ AdminBundle \ Datagrid \ ListMapper; Sonata \ AdminBundle \ Datagrid \ DatagridMapper; Sonata \ AdminBundle \ Validat...
I have a little code here. Could you please tell me what this code really does? please. Here in the AJAX call: $ .ajax ({url: "{% url} upload_document '%}", type: "POST", data : {Csrfmiddletoken: document.getElementsByName ('csrfmiddletoken') [0] Price, Title: document.getElementById ('title'). Value, // document: document: document.getElementById ('document'),}, datatype: "Jason", success: function (feedback) {if (feedback == "true") {// success} other {// attachment errors}}}); How AJAX works in the Django and how we can see the AJAX request. Here is the idea of my thoughts def upload_document (requested): Print request. POTT print request FILES if request.is_ajax (): If request.method == 'POST': form = UploadForm (request.POST, request.FILES, user = request.user) if form.is_valid (): Form.save () return HTTPPCS (SimpleJason Dumps ('True'), Mime Type = 'App / Jason') Other:...
Comments
Post a Comment