Returning JSON object

2015-07-06 Thread ADEWALE ADISA
Hi guys, I have a model called Page: class Page(models.Model): category = models.ForeignKey(Category) title = models.CharField(max_length=128) url = models.URLField() views = models.IntegerField(default=0) I want to return all the Page record in my database at once to ajax

Re: Returning JSON object

2015-07-06 Thread Cal Leeming
Also, you need to try and use Google more to answer your own questions :) I googled for "django your object is not serializable" and that page I linked was the first result. Cal On Mon, Jul 6, 2015 at 10:28 AM, Cal Leeming wrote: > You need this; >

Re: Returning JSON object

2015-07-06 Thread Cal Leeming
You need this; https://docs.djangoproject.com/en/1.8/topics/serialization/ Cal On Mon, Jul 6, 2015 at 10:25 AM, ADEWALE ADISA wrote: > Hi guys, > I have a model called Page: > > class Page(models.Model): > category = models.ForeignKey(Category) > title =

Re: Returning JSON object

2015-07-06 Thread ADEWALE ADISA
Thanks for urgent feedback, I will check the link out now. On Jul 6, 2015 10:28 AM, "Cal Leeming" wrote: > You need this; > https://docs.djangoproject.com/en/1.8/topics/serialization/ > > Cal > > On Mon, Jul 6, 2015 at 10:25 AM, ADEWALE ADISA > wrote: > >

Re: Help me develop a Job Tracker (?)

2015-07-06 Thread Softeisbieger
Let's see if I understand your proposal correctly: Workflow and Step act as template and are used to define the structure of different workflows. Project and Task 'implement' the template and are used as for actual work flows. So I formulate things that are fixed using the template and for the

Models and relationships

2015-07-06 Thread Chris Strasser
Hi ,I am fairly new to Django and am struggling with models hope someone can sort me out. Models: class Organization(models.Model): #customer or vendor person or company orgid = models.AutoField(db_column='OrgID', primary_key=True) is_company =

Re: Models and relationships

2015-07-06 Thread Sadaf Noor
If you have at least one entry in contact with a valid location, then it should work: from app.models import Contact > contact = Contact.all()[0] > print contact.locationid.locationname 2015-07-06 18:04 GMT+06:00 Chris Strasser : > Hi ,I am fairly new to Django and am

Restful web service create

2015-07-06 Thread ywaghmare5203
Hello All, I am working on django 1.6.6 and I am to create a web services in the existing code. please tell me how to create a Restful web services using django. I am beginner in python. Thanks, Yogesh Waghmare -- You received this message because you are subscribed to the Google Groups

Help me for create restful web services

2015-07-06 Thread ywaghmare5203
Hello All, I am working on Django 1.6.6 and I am to create a web services in the existing code. please tell me how to create a Restful web services using Django. I am beginner in python. please help me for web services creation Thanks, Yogesh Waghmare -- You received this message because

Re: Models and relationships

2015-07-06 Thread Rafael E. Ferrero
For start you don't need to specify the primary key (orgid for example) [1] In foreingkeys you need to use related names [2] In views use select_related() [3] [1] https://docs.djangoproject.com/en/1.8/ref/models/fields/#primary-key [2]

Re: Restful web service create

2015-07-06 Thread Avraham Serour
take a look at DRF and tastypie On Mon, Jul 6, 2015 at 3:58 PM, ywaghmare5203 wrote: > Hello All, > > I am working on django 1.6.6 and I am to create a web services in the > existing code. please tell me how to create a Restful web services using > django. I am beginner

Search Engine using Django-Python

2015-07-06 Thread Manoj Bawane
Hi All, I am planning to create a search engine for my city. Can you please suggest me Which technology I should prefer? I am new with Django, before that I have work with some web application using Java Spring. But now, I recently working in one project where I found Django is also nice

Custom Users and ios django questions

2015-07-06 Thread Lee Kazushi
Hi everyone, I am newbie in django so i'm a bit confused on some features. I have to do a project for university. It consists in a desktop-web app where employees can do some staff like handle files, recording files, uploading files on a mysql database, and an ios native app (written in

Re: Models and relationships

2015-07-06 Thread Chris Strasser
I tried and this happens: from main.models import Contact >>> contact = Contact.all()[0] Traceback (most recent call last): File "", line 1, in AttributeError: type object 'Contact' has no attribute 'all' >>> ?? any ideas ? On Mon, Jul 6, 2015 at 8:43 AM, Sadaf Noor

Re: Search Engine using Django-Python

2015-07-06 Thread Daniel França
Hi Manoj, have you tried Haystack? http://haystacksearch.org/ It's a simple API to make a search engine using Django, and you can attach any of the available backends (Solr, Elasticsearch, Whoosh or Xapian). Best, Daniel Em seg, 6 de jul de 2015 às 18:01, Manoj Bawane

Re: Models and relationships

2015-07-06 Thread Vijay Khemlani
Try with Contact.objects.all()[0] On Mon, Jul 6, 2015 at 1:03 PM, Chris Strasser wrote: > I tried and this happens: > > from main.models import Contact > > >>> contact = Contact.all()[0] > > Traceback (most recent call last): > > File "", line 1, in > >

Búsquedas en una aplicacion

2015-07-06 Thread Mario R. Osorio
Carlos, este grupo es en inglés. Puedes buscar duda en español en: https://mail.python.org/mailman/listinfo/python-es Yo no te ayudo porque no tengo experiencia en el tema además, tu pregunta es un poco escueta. Falta mucha información -- You received this message because you are subscribed

Búsquedas en una aplicacion

2015-07-06 Thread Mario R. Osorio
Carlos, este grupo es en inglés. Puedes buscar duda en español en: https://mail.python.org/mailman/listinfo/python-es Yo no te ayudo porque no tengo experiencia en el tema además, tu pregunta es un poco escueta. Falta mucha información -- You received this message because you are subscribed

Búsquedas en una aplicacion

2015-07-06 Thread Mario R. Osorio
Carlos, este grupo es en inglés. Puedes buscar duda en español en: https://mail.python.org/mailman/listinfo/python-es Yo no te ayudo porque no tengo experiencia en el tema además, tu pregunta es un poco escueta. Falta mucha información -- You received this message because you are subscribed

Re: Models and relationships

2015-07-06 Thread Florian Schweikert
On 06/07/15 14:04, Chris Strasser wrote: > my problem is with reverse lookups (i think it is called) the docs say that i > can access entries through blog.entry,(by lowercaseing the class) > it appears to me that i have the same setup with contact and location but i > am getting errors ?? I

Re: Python & Django.

2015-07-06 Thread Steve Burrus
Well I want to sheeplishly say thwat I DID get Python 3.4.2 going with the Django server! I kind of feel like the late Gilda Radner saying "Never mind!" in her well-known Saturday Night Live sketch. But to answer your question andrew I am using the Windows 10 beta preview version of Windows.

Re: Help me for create restful web services

2015-07-06 Thread Sadaf Noor
You can try Tastypie (https://django-tastypie.readthedocs.org/en/latest/) 2015-07-06 19:00 GMT+06:00 ywaghmare5203 : > Hello All, > > I am working on Django 1.6.6 and I am to create a web services in the > existing code. please tell me how to create a Restful web

Re: Python & Django.

2015-07-06 Thread Aaron C. de Bruyn
Glad it's working. -A On Mon, Jul 6, 2015 at 10:02 AM, Steve Burrus wrote: > Well I want to sheeplishly say thwat I DID get Python 3.4.2 going with the > Django server! I kind of feel like the late Gilda Radner saying "Never > mind!" in her well-known Saturday Night

How to protect a view with client ID and client secret in REST / oauth toolkit?

2015-07-06 Thread Daniel Grace
Say I have a REST view: class CreateUserView(generics.CreateAPIView): serializer_class = CreateUserSerializer queryset = User.objects.all() ...how is it possible to protect the view with the client ID and client secret from the oauth toolkit? So that I can invoke the view via a special

Re: Models and relationships

2015-07-06 Thread Rafael E. Ferrero
contacts = Contacts.objects.select_related() -- Rafael E. Ferrero 2015-07-06 13:51 GMT-03:00 Florian Schweikert : > On 06/07/15 14:04, Chris Strasser wrote: > > my problem is with reverse lookups (i think it is called) the docs say > that i can access entries through

Re: Django formset hidden id field

2015-07-06 Thread Carl Meyer
Hi Peter, On 07/04/2015 12:42 AM, Peter of the Norse wrote: >> On Jul 2, 2015, at 7:46 PM, Carl Meyer wrote: >> >>> So what? It’s quite likely that whoever is editing this row of >>> the database, also has permissions to edit the other rows as >>> well. There’s no reason for

Re: Help me for create restful web services

2015-07-06 Thread José Javier Castro Matamoros
Also you can use Django REST framework www. *django-rest-framework*.org On Mon, Jul 6, 2015 at 11:12 AM, Sadaf Noor wrote: > You can try Tastypie (https://django-tastypie.readthedocs.org/en/latest/) > > 2015-07-06 19:00 GMT+06:00

Re: Returning JSON object

2015-07-06 Thread ADEWALE ADISA
Thanks a lot, the link solve my issue and add to my knowledge On Jul 6, 2015 10:29 AM, "Cal Leeming" wrote: > Also, you need to try and use Google more to answer your own questions :) > > I googled for "django your object is not serializable" and that page I > linked was the first

Re: Models and relationships

2015-07-06 Thread Chris Strasser
WOO HOO !.. success ... thanks everyone... just needed a nudge in the right direction I will tackle the templates tomorrow and see where that takes me. On Mon, Jul 6, 2015 at 2:24 PM, Rafael E. Ferrero wrote: > contacts = Contacts.objects.select_related() > > --

Values from class to class

2015-07-06 Thread Carlos Andre
Hello to all , I need to solve a problem. I have two classes of which have to use , in the second class, the first coming values. How to do this? Thanks for listening! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this