Discussion:
Fullcalendar and DRF
Elias Coutinho
2018-04-25 21:07:45 UTC
Permalink
Good afternoon my friends.

Anyway, I do not make a living, and someday some day maybe.
My knowledge of Django is intermediate so do not be surprised if I make a
mistake.

I have the FULLCALENDAR <https://github.com/CoutinhoElias/fullcalendar>
project.
It is using DRF and ajax for some actions like drag and drop, my problem is
that I can not do an insert in this CODE LINE
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/core/static/js/core/demo/DemoCalendar.js#L193-L242>
.

For me I would call a jquery dialog and send the data to the DRF via ajax,
but as I have no experience I am counting on your help in this endeavor.

I tried several ways and the closest I got was this BLOG
<https://simpleisbetterthancomplex.com/tutorial/2016/11/15/how-to-implement-a-crud-using-ajax-and-json.html>,
downloaded and tested, the example works but when I step into my reality it
saves (POST) but returns a whole messy template with information about tags
sent.

1 - I would like to know if anyone knows a better way to perform CRUD using
Django, DRF and FullCalendar.
2 - Casoo example of the blog in your eyes is a good way would like someone
help me to discover this mystery.

Below I will post all the way of the codes related to the problem.

A) views.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/views.py>
B) forms.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/forms.py>
C) models.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/models.py>
D) [1] urls.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/urls.py#L12>
and [2] urls.py from API
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/api/urls.py#L21>
and [3] urls.py that I was testing on the above mentioned blog
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/urls.py#L11>
E) ajax code
F) Template index.html
G) Template Forms

Thank you.
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Elias Coutinho
2018-04-25 21:13:38 UTC
Permalink
Fixing the links:

A) views.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/views.py>
B) forms.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/forms.py>
C) models.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/models.py>
D) [1] urls.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/urls.py#L12>
and [2] urls.py from API
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/api/urls.py#L21>
and [3] urls.py that I was testing on the above mentioned blog
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/urls.py#L11>
E) ajax code
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/core/static/js/core/demo/DemoCalendar.js>
F) Template index.html
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/core/templates/index.html>
G) Template Forms
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/templates/bookings_create_form.html>

Em quarta-feira, 25 de abril de 2018 18:07:45 UTC-3, Elias Coutinho
Post by Elias Coutinho
Good afternoon my friends.
Anyway, I do not make a living, and someday some day maybe.
My knowledge of Django is intermediate so do not be surprised if I make a
mistake.
I have the FULLCALENDAR <https://github.com/CoutinhoElias/fullcalendar>
project.
It is using DRF and ajax for some actions like drag and drop, my problem
is that I can not do an insert in this CODE LINE
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/core/static/js/core/demo/DemoCalendar.js#L193-L242>
.
For me I would call a jquery dialog and send the data to the DRF via ajax,
but as I have no experience I am counting on your help in this endeavor.
I tried several ways and the closest I got was this BLOG
<https://simpleisbetterthancomplex.com/tutorial/2016/11/15/how-to-implement-a-crud-using-ajax-and-json.html>,
downloaded and tested, the example works but when I step into my reality it
saves (POST) but returns a whole messy template with information about tags
sent.
1 - I would like to know if anyone knows a better way to perform CRUD
using Django, DRF and FullCalendar.
2 - Casoo example of the blog in your eyes is a good way would like
someone help me to discover this mystery.
Below I will post all the way of the codes related to the problem.
A) views.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/views.py>
B) forms.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/forms.py>
C) models.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/models.py>
D) [1] urls.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/urls.py#L12>
and [2] urls.py from API
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/api/urls.py#L21>
and [3] urls.py that I was testing on the above mentioned blog
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/urls.py#L11>
E) ajax code
F) Template index.html
G) Template Forms
Thank you.
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sidney Soares Marcelino
2018-04-26 11:57:16 UTC
Permalink
Hi Elias, I think the best way to perform CRUD in DRF is by using generics
API Views. Try follow this section in official docs Generics Views
Documentation
<http://www.django-rest-framework.org/api-guide/generic-views/>.
Post by Elias Coutinho
A) views.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/views.py>
B) forms.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/forms.py>
C) models.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/models.py>
D) [1] urls.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/urls.py#L12>
and [2] urls.py from API
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/api/urls.py#L21>
and [3] urls.py that I was testing on the above mentioned blog
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/urls.py#L11>
E) ajax code
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/core/static/js/core/demo/DemoCalendar.js>
F) Template index.html
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/core/templates/index.html>
G) Template Forms
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/templates/bookings_create_form.html>
Em quarta-feira, 25 de abril de 2018 18:07:45 UTC-3, Elias Coutinho
Post by Elias Coutinho
Good afternoon my friends.
Anyway, I do not make a living, and someday some day maybe.
My knowledge of Django is intermediate so do not be surprised if I make a
mistake.
I have the FULLCALENDAR <https://github.com/CoutinhoElias/fullcalendar>
project.
It is using DRF and ajax for some actions like drag and drop, my problem
is that I can not do an insert in this CODE LINE
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/core/static/js/core/demo/DemoCalendar.js#L193-L242>
.
For me I would call a jquery dialog and send the data to the DRF via
ajax, but as I have no experience I am counting on your help in this
endeavor.
I tried several ways and the closest I got was this BLOG
<https://simpleisbetterthancomplex.com/tutorial/2016/11/15/how-to-implement-a-crud-using-ajax-and-json.html>,
downloaded and tested, the example works but when I step into my reality it
saves (POST) but returns a whole messy template with information about tags
sent.
1 - I would like to know if anyone knows a better way to perform CRUD
using Django, DRF and FullCalendar.
2 - Casoo example of the blog in your eyes is a good way would like
someone help me to discover this mystery.
Below I will post all the way of the codes related to the problem.
A) views.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/views.py>
B) forms.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/forms.py>
C) models.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/models.py>
D) [1] urls.py
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/urls.py#L12>
and [2] urls.py from API
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/api/urls.py#L21>
and [3] urls.py that I was testing on the above mentioned blog
<https://github.com/CoutinhoElias/fullcalendar/blob/master/modelo/bookings/urls.py#L11>
E) ajax code
F) Template index.html
G) Template Forms
Thank you.
--
You received this message because you are subscribed to the Google Groups
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an
For more options, visit https://groups.google.com/d/optout.
--
*SIDNEY SOARES MARCELINO**BACK-END DEVELOPER **– DIGITAL 3S*

Rua Dr. Costa Júnior, 458 - Água Branca
<https://maps.google.com/?q=Rua+Dr.+Costa+J%C3%BAnior,+458+-+%C3%81gua+Branca+%C2%A0+S%C3%A3o+Paulo+-+SP%C2%A0-+05002-000%C2%A0+-+Brazil&entry=gmail&source=g>
São Paulo - SP - 05002-000 - Brazil
<https://maps.google.com/?q=Rua+Dr.+Costa+J%C3%BAnior,+458+-+%C3%81gua+Branca+%C2%A0+S%C3%A3o+Paulo+-+SP%C2%A0-+05002-000%C2%A0+-+Brazil&entry=gmail&source=g>

*PHONE* +55 11 2532-4526
*MOBILE *+55 84 99966-4472
*SKYPE* sidneyddd
*WEB *www.solidaridadnetwork.org
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+***@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Loading...