Ronald
and
Ronald
don’t use {% url stuff %} inside of javascript
Ronald
that’s for html
Ronald
rather make a seperate script in your view.py with a unique url to do whatever you want it to do
Arshatik
???
Mohit
Don't give localhost 8000 in the url
Sanjay Krishnan
$('#consultation-form').on('submit', function(event){
event.preventDefault();
var form = $('#consultation-form');
var formData= new FormData($('#consultation-form')[0]);
$.ajax({
url : form.attr('action'), // the endpoint
type : form.attr('method'), // http method
data : formData,
success : function(data) {
//Whatever you want
},
// handle a non-successful response
error : function(xhr,errmsg,err) {
// add the error to the console
console.log(xhr.status + ": " + xhr.responseText);
}
});
});
Sanjay Krishnan
may be this can help
Sanjay Krishnan
Specify your url in the action of the form
🦠
how to make email from user model unique?
Mirco
You could use unique option into your email field definition
🦠
George
I repost it here because i do it with django
George
hey, how would you transfer a 5MB csv file to a web without having issues. i got a response time of 1720 ms
when should i try to chunk the data or handle it in any way
Mirco
George
Mirco
Yw 😀
George
Yw 😀
i need download, not upload
George
from django server to DOM
Mirco
Oh sorry didn't get it
George
i looked for django-downloadview but it seems not updated for django 2.1
Mirco
Read this
Mirco
Maybe it's more useful
Sergei
Hi could anyone recommend technology like disqus for comments ?
Sanjay Krishnan
George
Abdulaziz
Belmo NaTazu
Abdulaziz
Do listen to syntax.fm?
gamer_boy
plz help me to solve this error
Rammanoj
can you also paste urls.py
gamer_boy
k
Rammanoj
the error comes because you forgot to call your view with .as_view()
Rammanoj
you might have calledd it just with it's name, as it is a class based view you need to call the method .as_view()
gamer_boy
http://dpaste.com/0QS16HF
gamer_boy
urls.py👆
Rammanoj
gamer_boy
k
Rammanoj
https://www.codementor.io/jamesezechukwu/working-with-class-based-views-in-django-5zkjnrvwc
Rammanoj
Rammanoj
to be simple in urls.py replae all the urls from views.Classname to views.Classname.as_view()
gamer_boy
thank you sir
gamer_boy
it workes
gamer_boy
☺️😃😃😀
Sergei
Dope
Hellow members Am new to django hoping to learn a lot from this group...
Mirco
Sanjay Krishnan
Wtf xd
Store your file in db, pass the path of the file to the template..when they click the link it will be downloaded.
George
George
I dont need to store the object, but dont worry ive already done the server work
George
Its not a meaningful file so i may not store it
Anonymous
Received unregistered task of type??? Why??
Anonymous
Can't take celery task
Anonymous
Anonymous
Has anyone used Heroku to host before
I want to get my db file from the server...how can I
Anonymous
Anonymous
If i clone from my heroku.... I wont be able to access data in the data base... It only pulls the codes...
But i need data in the data base
Anonymous
Especially if i want to perform some actions with the data in the database
Sanjay Krishnan
Modou-dev
hi How to handle a document in python by using rest-framework mongoengine ?
George
Modou-dev
USE PANDAS
George
Csv it
Modou-dev
I want to say the collections
Sanjay Krishnan
openpyxl package
cj
A document?
In mongodb, documents are some kind of tables
Modou-dev
Dasa
Hey. Any cookie cutter users here ?
Dasa
I'm doing things around in cookie cutter. I need to re style the entire sign-up screen without altering the fields or core functionality. I couldn't find it in account/signup.html. How do I edit it ?
cj
cookiecutter is a «template» tool, so if you don't scpecify what template you're using, nobody will guess it 🤷🏻♂️ (probably you're using one of the many django templates)
Dasa
Yes I am using cookiecutter template. I am done with everything. I am stuck with front end for now. I need to restyle one of the .html files. In the default sign-up screen when I visit the URL there are multiple fields like username password mail id etc. But there ain't any when I open the html template
cj
but which template? 🤷🏻♂️