Mirco
👍🏻😁
Jimmies San
Call the function into your Django view
without the help of js/html5 ?
Mirco
without the help of js/html5 ?
I don't know how he's written that function , but I agree with u I think he needs at least html5 mic APIs too
Anonymous
Is there a way to write code that runs every specific period of time out side of the views
Macurrent
Which text editor in the text field did the developers in stack overlow use? The one that looks like word
Macurrent
Which text editor in the text field did the developers in stack overlow use? The one that looks like word
I tried to use ckeditor but it was a bit complicated.. I did not reach my accomplishment with it
cj
I tried to use ckeditor but it was a bit complicated.. I did not reach my accomplishment with it
well... ckeditor is highly configurable, maybe you need to read its documentation a little bit more 🙂
Macurrent
How do you rate it compared to other editors
cj
How do you rate it compared to other editors
one of the bests, you can use others if you want too 🤷🏻‍♂️
Macurrent
Am getting error installing ckedito...No matching distribution found for ckeditor
Macurrent
https://stackoverflow.com/questions/28122166/adding-ckeditor-to-django-project
cj
i was following that tutorial
better use it as a standalone front-end library, as it's intended 🙂
Macurrent
So its not good to use it with django. Django is for backend...
🏳️‍🌈Robby [ Private Message = Spam]
https://t.me/pythonres/32
🏳️‍🌈Robby [ Private Message = Spam]
Django resources
Macurrent
So its not good to use it with django. Django is for backend...
I have seen people use it even in the admin page
🏳️‍🌈Robby [ Private Message = Spam]
🏳️‍🌈Robby [ Private Message = Spam]
I pwned one idiot who wrote a shitty blog article which fucking had a SQL Injection vuln...same db for his shitty blog — the schema was interesting, passwords for it stored in plain fucking text too
Macurrent
🙄 tell me you're joking...
for sure.. Is django not for backend development?
cj
for sure.. Is django not for backend development?
yes... but.... you can use whatever library you want in the front-end side 🙄
🏳️‍🌈Robby [ Private Message = Spam]
cj
lol
🏳️‍🌈Robby [ Private Message = Spam]
I lost the data :/
Jimmies San
Jimmies San
well "crime"... :D
🏳️‍🌈Robby [ Private Message = Spam]
Jimmies San
🏳️‍🌈Robby [ Private Message = Spam]
even I forgot the shit blog it was on
Jimmies San
btw: linode rulez! i love it :D
🏳️‍🌈Robby [ Private Message = Spam]
btw: linode rulez! i love it :D
Just a free t-shirt lol
cj
btw: linode rulez! i love it :D
too expensive compared to DO
🏳️‍🌈Robby [ Private Message = Spam]
I dont actually have a personal VPS — I have access to a ton of infra I _COULD_ use but don't
Macurrent
Actually am new in django and i finished a first tutorial in django girls. Am remaining with the extension part of it
cj
too expensive compared to DO
at least AFAIR, long time I don't use them both
Jimmies San
too expensive compared to DO
yes but the support is super, and the i/o it's better than DO
Jimmies San
and network too
Jimmies San
but few "cloud services" [volumes, elb, floating point ecc]
Macurrent
i have use ckeditor before but not with django. i followed https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/basic-api.html .And it worked for me. Applying that with django framework is a bit tricky. I dont see anything related to django in that doc
Macurrent
How do i get an id of an autogenerated form in django eg, in the doc, the #editor id is used down below
cj
How do i get an id of an autogenerated form in django eg, in the doc, the #editor id is used down below
id_name_of_field eg: if your form field is named editor, the id in the HTML form will be id_editor and you can use the jQuery (if you're using it) selector #id_editor
Macurrent
fields = ('title', 'text',)
Macurrent
fields = ('title', 'text',)
those are my fields, so the id will be id_title and id_text?
Macurrent
{% extends 'blog/base.html' %} {% block content %} <h2>New post</h2> <form method="POST" class="post-form"> {% csrf_token %} {{ form.as_p }} <button type="submit" class="save btn btn-default">Save</button> </form> <script> ClassicEditor .create( document.querySelector( '#id_text' ) ) .then( id_text => { console.log( id_text ); } ) .catch( error => { console.error( error ); } ); </script> {% endblock %}
Macurrent
🤔 are you sourcing the ckeditor js files before?
i have used it before. but not with django using the same procedure
Macurrent
Macurrent
That still does not work for me
{% extends 'blog/base.html' %} {% block content %} <h2>New post</h2> <form method="POST" class="post-form"> {% csrf_token %} {{ form.as_p }} <button type="submit" class="save btn btn-default">Save</button> </form> <script> ClassicEditor .create( document.getElementById('id_text') ) .then( id_text => { console.log( id_text ); } ) .catch( error => { console.error( error ); } ); </script> {% endblock %}
Macurrent
{% load static %} <html> <head> <title>Django Girls blog</title> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"> <link href='//fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext' rel='stylesheet' type='text/css'> <link rel="stylesheet" href="{% static 'css/blog.css' %}"> </head> <body> <div class="page-header"> {% if user.is_authenticated %} <a href="{% url 'post_new' %}" class="top-menu"><span class="glyphicon glyphicon-plus"></span></a> {% endif %} <h1><a href="/">Django Girls Blog</a></h1> </div> <div class="content container"> <div class="row"> <div class="col-md-8"> {% block content %} {% endblock %} </div> </div> </div> </body> </html>
cj
well... you're not sourcing the ckeditor js files
cj
that's why it's not working 🤷🏻‍♂️
🏳️‍🌈Robby [ Private Message = Spam]
My spambot-dar is going crazy
Macurrent
well... you're not sourcing the ckeditor js files
But it interfered with my save button. Save now does not work
cj
debug and fix 🙂
Macurrent
I got the Getting and saving data part. But here again they use php to explain that part...https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/saving-data.html
Sankhe
Hi..please tell me how to intetconnect front end with backend..
Le Createur
Hi..please tell me how to intetconnect front end with backend..
ohhh please read the django tutorial for newbies. it easy
🏳️‍🌈Robby [ Private Message = Spam]
Hi..please tell me how to intetconnect front end with backend..
https://t.me/pythonres/32 By reading. You basically make a REST API and it works like that.
🏳️‍🌈Robby [ Private Message = Spam]
https://github.com/pydanny/cookiecutter-django/blob/master/README.rst
Jatin
Need Help: i have 2 models one for product and other for storing image(this model connect to product through foreign key). i don't know how to display image in between product data.
Mirco
Need Help: i have 2 models one for product and other for storing image(this model connect to product through foreign key). i don't know how to display image in between product data.
Did u set related_name in your FK ? If yes u can use object.related_name.all() to get all image instances related to a specific product
Mirco
Where object is a Product instance
Mirco
If u didn't set any related_name , u can use the default image_set
Kev
hey guys, I need some help: I am passing a list of dictionaries to a request and after retrieving it via request.POST.getlist('my_list'), the elements in the list are of type str instead of dict, how do I retrieve the list with the correct content?