Re: Method must be called with Class instance

2016-10-24 Thread Carlos García
Thank you and sorry. El lunes, 24 de octubre de 2016, 20:40:43 (UTC+2), Tim Graham escribió: > > Hi, > > This question has nothing to do with django-cms, so in the future please > use the https://groups.google.com/forum/#!forum/django-users mailing > list, although it's more of a Python questi

Re: Method must be called with Class instance

2016-10-24 Thread Tim Graham
Hi, This question has nothing to do with django-cms, so in the future please use the https://groups.google.com/forum/#!forum/django-users mailing list, although it's more of a Python question than a Django one. Anyway, for the solution, please read about @classmethod here: https://docs.python.

Method must be called with Class instance

2016-10-24 Thread Carlos García
Hi, I'm creating a app which do a request to a API and the result is showing on a web page. My code is this: Models.py from django.db import models from django.template import Template, Context from django.http import HttpResponse import requests, json class HotelService(models.Model): def getA

Re: Activity Reports

2016-10-24 Thread Angelo Dini
Activity Report 24th of October 2016 - *News* - Maintenance versions 3.4.1 and 3.3.3 released https://www.django-cms.org/en/blog/2016/10/05/maintenance-versions-3-4-1-and-3-3-3-released/ - The very first django CMS Day in review https://www.django-cms.org/en/blog/2016/10/04/d

Re: Integrate a python function in a django-cms project

2016-10-24 Thread Carlos García
Thank you so much!! El lunes, 24 de octubre de 2016, 14:29:16 (UTC+2), Thomas Rega escribió: > > Hi, > > if you use a custom plugin, wich could be inserted into a page, you > could call your method within the render method of your custom plugin > and extend the context with your data. You will

Re: Integrate a python function in a django-cms project

2016-10-24 Thread Thomas Rega
Hi, if you use a custom plugin, wich could be inserted into a page, you could call your method within the render method of your custom plugin and extend the context with your data. You will have it then available in the template http://docs.django-cms.org/en/release-3.3.x/how_to/custom_plugins.ht

Re: Integrate a python function in a django-cms project

2016-10-24 Thread Carlos García
I have a function recives data form a API: from django.template import Template, Context from django.http import HttpResponse import requests, json def get_datos(requests): datos = { "Credentials": { 'UserName': '', 'Languaje': 'es', 'Password': '' }, 'GetAvailAndRatesRQ': { 'Not

Re: Integrate a python function in a django-cms project

2016-10-24 Thread czpython
Hello Carlos, I'm not sure I understand your question. What are you trying to do? On Monday, October 24, 2016 at 6:47:07 AM UTC-4, Carlos García wrote: > > Hi, > > How can I integrate a python function in a django-cms project? > -- Message URL: https://groups.google.com/d/msg/django-cms-develo

Integrate a python function in a django-cms project

2016-10-24 Thread Carlos García
Hi, How can I integrate a python function in a django-cms project? -- Message URL: https://groups.google.com/d/msg/django-cms-developers/topic-id/message-id Unsubscribe: send a message to django-cms-developers+unsubscr...@googlegroups.com --- You received this message because you are subscrib