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
🦠
You could use unique option into your email field definition
but need inheritance from default user model?
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
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 ?
Rajjix
Hi could anyone recommend technology like disqus for comments ?
disqus is really good, but if you want something simpler you can check facebook comments plugin at developers.facebook.com/docs/plugins/comments/
Sanjay Krishnan
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👆
gamer_boy
k
Rammanoj
https://www.codementor.io/jamesezechukwu/working-with-class-based-views-in-django-5zkjnrvwc
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
☺️😃😃😀
Dope
Hellow members Am new to django hoping to learn a lot from this group...
Rajjix
Thanx a lot
thank facebook developers 😁
⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠⁠
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
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
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
Its not a meaningful file so i may not store it
Yeah then you can keep it static
George
Yeah then you can keep it static
Static? Its just a temporary file that may get deleted. Mind that static files may not be what you mean
Rammanoj
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
I am not sure about it( i.e I haven't implemented) but found something here https://blog.heroku.com/push_and_pull_databases_to_and_from_heroku you can read the article once
Modou-dev
hi How to handle a document in python by using rest-framework mongoengine ?
Modou-dev
USE PANDAS
George
Csv it
Modou-dev
A document?
in my mongodb
George
in my mongodb
You mean a file? Of what type?
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
In mongodb, documents are some kind of tables
yes but I want to display it in my api view
Dasa
Hey. Any cookie cutter users here ?
cj
Hey. Any cookie cutter users here ?
probably yes, it's better that you ask directly your question
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? 🤷🏻‍♂️