Re: Object Model

2013-07-24 Thread Ovnicraft
On Wed, Jul 24, 2013 at 6:32 AM, Sivaprakash Shanmugam < sivaprakashshanmu...@gmail.com> wrote: > Hi > > I'm new to DJango framework I fairly understand how the basics works. I > want to define an object (typically getter setter in Java) in which I want > to fill data to create my own response thr

Re: Object Model

2013-07-24 Thread Daniel Roseman
On Wednesday, 24 July 2013 04:32:51 UTC-7, Sivaprakash Shanmugam wrote: > Hi > > I'm new to DJango framework I fairly understand how the basics works. I > want to define an object (typically getter setter in Java) in which I want > to fill data to create my own response through web service. But

Object Model

2013-07-24 Thread Sivaprakash Shanmugam
Hi I'm new to DJango framework I fairly understand how the basics works. I want to define an object (typically getter setter in Java) in which I want to fill data to create my own response through web service. But I could only see the Model which are related to DB. How to do it? Thank you -

Re: Can't figure out this Object Model error...

2011-12-05 Thread Furbee
That is what I sort of assumed. You created the table with syncdb, changed the models.py for it and ran syncdb, which does nothing if the table already exists. On Mon, Dec 5, 2011 at 5:04 PM, Reinout van Rees wrote: > On 06-12-11 01:24, Marc Edwards wrote: > >> DatabaseError at/admin/bookmarks/e

Re: Can't figure out this Object Model error...

2011-12-05 Thread Reinout van Rees
On 06-12-11 01:24, Marc Edwards wrote: DatabaseError at/admin/bookmarks/eda_appcatalog/ no such column: bookmarks_eda_appcatalog.eda_app_id The "eda_app_id" colum is what Django uses to store the foreign key. You probably added the foreign key after creating the EDA_AppCatalog class. Your sy

Re: Can't figure out this Object Model error...

2011-12-05 Thread Marc Edwards
> > I know that the Object Model will be assigning an "ID" to the object > when it stores it in the database.  I am not assigning this ID field. > I also don't do this with the other object models that I have defined > and that seem to be working with no problem. >

Re: Can't figure out this Object Model error...

2011-12-05 Thread Marc Edwards
This is the confusing part. The EDA_AppCatalog imports from my bookmarks package with no problem. My class definition for this object has only 1 field, a ForeignKey to an EDA_App. I know that the Object Model will be assigning an "ID" to the object when it stores it in the database.

Re: Can't figure out this Object Model error...

2011-12-05 Thread Furbee
Don't mean to sound remedial, but have you verified that the table bookmarks_eda_appcatalog exists and that it has a column named eda_app_id? Did you use manage.py syncdb to create the tables? Furbee On Mon, Dec 5, 2011 at 4:24 PM, Marc Edwards wrote: > I am receiving the following error from t

Can't figure out this Object Model error...

2011-12-05 Thread Marc Edwards
I am receiving the following error from the Django debugger when trying to access my EDA_AppCatalog object. My class definition is listed below. I have similar defined objects that are working with no problem, but I can't seem to clear this error message up. Thanks, Marc DatabaseError at /admin

Re: Retrieve object model admin userid & password?

2011-11-30 Thread Ian Clelland
On Wed, Nov 30, 2011 at 10:22 AM, Tim Sawyer wrote: > You can't retrieve the password, as that would be a security flaw. The > security works by hashing the password entered into the login form, and > comparing the hashed version with the one stored on the database. Hash > functions are quick to

Re: Retrieve object model admin userid & password?

2011-11-30 Thread Tim Sawyer
ated my first database, I "recall" entering a username and password, but entering what I recall was the correct input is not authenticating. Is there an easy way to reset or retrieve the username and password that was used to create the object model? -- You received this message because you

Retrieve object model admin userid & password?

2011-11-30 Thread Marc Edwards
to create the object model? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For

Re: How to implement multi-level cascaded DISTINCT JOIN using django's object model?

2007-03-08 Thread Alex Dong
Thanks a lot, Atilla. `Question.objects.filter(answer__user=user).distinct()` returns exactly what I expect. This is wonderful, thanks a lot. I also recheck the django manual and found this solution has a name as "query over related objects" (http://www.djangoproject.com/documentation/ db_api/#q

Re: How to implement multi-level cascaded DISTINCT JOIN using django's object model?

2007-03-08 Thread Atilla
On 08/03/07, Alex Dong <[EMAIL PROTECTED]> wrote: > > Hi all, > > I have a data model like this: > * a `user` has multiple `questions` > * a `user` could give multiple `answer`s or `comment`s to any > `question`s. > So here, there are > * a one-to-many relationship from `user` to `question` > * a

How to implement multi-level cascaded DISTINCT JOIN using django's object model?

2007-03-08 Thread Alex Dong
Hi all, I have a data model like this: * a `user` has multiple `questions` * a `user` could give multiple `answer`s or `comment`s to any `question`s. So here, there are * a one-to-many relationship from `user` to `question` * a many-to-many relationship between `question` and `answer`, `question`

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-09 Thread James Bennett
On 2/8/07, Sergey Kirillov <[EMAIL PROTECTED]> wrote: > obj_list = klass._default_manager.in_bulk(oid_list) > > return [obj_list[oid] for oid in oid_list] Just a quick note for those playing along with custom ORDER BY stuff (e.g., ordering by a non-column value generated by another part o

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-08 Thread Russell Keith-Magee
On 2/8/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > Sergey Kirillov: > > I'm using this function to load Django objects using custom sql > > > > obj_list = klass._default_manager.in_bulk(oid_list) > > But that's two queries. I think that there should be a way to do it > with one query.

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-08 Thread Michael Radziej
Sergey Kirillov: > I'm using this function to load Django objects using custom sql > > obj_list = klass._default_manager.in_bulk(oid_list) But that's two queries. I think that there should be a way to do it with one query. Michael -- noris network AG - Deutschherrnstraße 15-19 - D-90429 N

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-08 Thread Sergey Kirillov
CTED]> wrote: > hey everyone, > > * is there a way to do custom queries, and tie the result back into the > object model or into the queryset interface? I have a query which > (really) returns 'django objects', which is impossible to write with the > ORM, but aft

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-06 Thread Russell Keith-Magee
On 2/6/07, Bram - Smartelectronix <[EMAIL PROTECTED]> wrote: > > > It doesn't... I need a "group by" which doesn't seem possible in any way > in django. It is possible, in a number of ways: 1) Get a connection.cursor(), and write the full SQL manually 2) Use the extra() clause on a queryset 3) Wr

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-06 Thread Bram - Smartelectronix
Lawrence Oluyede wrote: >> * is there a way to do custom queries, and tie the result back into the >> object model or into the queryset interface? I have a query which >> (really) returns 'django objects', which is impossible to write with the >> ORM, but after d

Re: tying custom queries back into the queryset / object model / paginator... ?

2007-02-05 Thread Lawrence Oluyede
> * is there a way to do custom queries, and tie the result back into the > object model or into the queryset interface? I have a query which > (really) returns 'django objects', which is impossible to write with the > ORM, but after doing the query I would like to ge

tying custom queries back into the queryset / object model / paginator... ?

2007-02-05 Thread Bram - Smartelectronix
hey everyone, * is there a way to do custom queries, and tie the result back into the object model or into the queryset interface? I have a query which (really) returns 'django objects', which is impossible to write with the ORM, but after doing the query I would like to get bac

Re: custom SQL within object model?

2006-03-22 Thread Adrian Holovaty
On 3/22/06, Alan Bailey <[EMAIL PROTECTED]> wrote: > Thanks! Silly me. But maybe a mention in the custom SQL section pointing > to the where / tables stuff would be good. Good idea! I've updated the docs to put in that pointer. Should be live on the site within 15 minutes. Adrian -- Adrian Ho

Re: custom SQL within object model?

2006-03-22 Thread Alan Bailey
Thanks! Silly me. But maybe a mention in the custom SQL section pointing to the where / tables stuff would be good. Alan On Wed, 22 Mar 2006, [EMAIL PROTECTED] wrote: > > Alan Bailey wrote: > > I know I can write custom SQL with the db cursor and it returns raw > > rows... but I would like (a

Re: custom SQL within object model?

2006-03-22 Thread [EMAIL PROTECTED]
Alan Bailey wrote: > I know I can write custom SQL with the db cursor and it returns raw > rows... but I would like (and it'd be easy to implement) a way to use > custom SQL (specifically only WHERE clauses) when doing a get_list or > get_object. > > For example: > > foo = users.get_list(status__e

custom SQL within object model?

2006-03-22 Thread Alan Bailey
Hello, I know I can write custom SQL with the db cursor and it returns raw rows... but I would like (and it'd be easy to implement) a way to use custom SQL (specifically only WHERE clauses) when doing a get_list or get_object. For example: foo = users.get_list(status__exact='active', custom_sql