Thursday, December 30, 2010

Re: Linux password authentication for django

On 29/12/10 Bill said:

> Hi there,
>
> I want to know is there any authentication module base on Linux passwd/
> shadow file for django?

You want pam authentication. Look for django and pam.

Mike

OpenID Provider

Hello,

I'm trying to setting up an OpenID provider for an application that I
wrote using Django. For this task I use the django_openid_provider
(http://www.romke.net/django/openid_provider/) app.

After installing, syncdb of the ddbb, associate an user with his
openid... the truth moment comes and it fails :(

I'm becoming crazy trying to debug the flow but without results. For
the consumer test I'm trying to publish a comment in blogspot. The log
of my runserver is this it:

[30/Dec/2010 12:59:50] "GET /openidprovider/?openid.ns=http://
specs.openid.net/auth/
2.0&openid.mode=checkid_setup&openid.claimed_id=http://

ao.getcloud.info:8000/openidprovider/antoniofcano/
&openid.identity=http://ao.getcloud.info:8000/openidprovider/
antoniofcano/&openid.return_to=https://www.blogger.com/comment.do
?
loginRedirect%3DSFC1293710388560%26gx.rp_st
%3DAEp4C1u745Vy1t_hie5m36xCAqfy8xNlu_olr-
kpYzI5jg1CCl_0iZxlc0f2i6tYVCdNuOQ8VUIfNrE5xGlvjqd59od_U5p0r7AOHk67nQNc52CEabJVcds4v7zcglL9yM9BKma4En1Wv31nePI7sSXSH4YBZ_ddhmKRhg7Ggv4-
n0frnpGpZu4g24mi6-2veeYPFwmOzV5YezkuWNHjEgyi2YPrtn4p2i7oWsbzWnDQssv-0Bo4UdXqz3nmM9moyLyuYdx5m-
YfOdlhCzKPA0XDSjtnO3yQmfZ-sHxFcjLApDmkrPHMdAKbKwyZ-cUVz-
Nr0mPA3scTt2HhDfLH3bPoXuS7m3cxFw&openid.realm=https://
www.blogger.com&openid.ns.ax=http://openid.net/srv/ax/1.0&openid.ax.mode=fetch_request&openid.ax.type.attr0=http://axschema.org/namePerson/friendly&openid.ax.type.attr1=http://schema.openid.net/namePerson/friendly&openid.ax.type.attr2=http://axschema.org/namePerson&openid.ax.type.attr3=http://schema.openid.net/namePerson&openid.ax.required=attr0,attr1,attr2,attr3&openid.ns.sreg=http://openid.net/extensions/sreg/1.1&openid.sreg.required=nickname,fullname
HTTP/1.1
" 302 0

[30/Dec/2010 12:59:51] "HEAD /openidprovider/antoniofcano/ HTTP/1.1"
200 0
[30/Dec/2010 12:59:51] "GET /openidprovider/antoniofcano/ HTTP/1.1"
200 288
[30/Dec/2010 12:59:52] "POST /openidprovider/ HTTP/1.1" 403 2326

Someone has experience with this task? Please, I don't know where to
go now :)

Best wishes and happy new year,

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: database migration

Hallöchen!

Michael P. Soulier writes:

> On 29/12/10 Torsten Bronger said:
>
>> I don't recommend that. If the database exceeds a certain size
>> (and "certain" is MBs, not GBs), this simply fails.
>
> Is there a bug report for this issue? I find that very
> disappointing.

http://1.2.3.12/bmi/stc.celeb.gate.cc/banner/pi/0120.gif

Tschö,
Torsten.

--
Torsten Bronger, aquisgrana, europa vetus
Jabber ID: torsten.bronger@jabber.rwth-aachen.de
or http://bronger-jmp.appspot.com

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Getting model instances from cursor fetches

Hello,

I have a stored procedure which creates a cursor for a query, and also returns the total count for the (unlimited) query. The query itself can be mapped to my model if ran through the raw method of the manager. However, I'm interested in using the procedure, rather than 2 separate queries for the count and the instances.

The documentation indicates that I should use the connection.cursor method for invoking custom sql. My initial plan is to first execute the procedure, which would return the count and open the query cursor, and then execute a 'fetch all' for that cursor (I doubt 'fetch next' would be better, since the result is stuffed into the django cursor anyway, but I could be wrong here). But after I fetch from the query cursor, how do I initialize my model objects with the data from that cursor?

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Wednesday, December 29, 2010

Re: django and eclipse

To run Django server on specific IP and port you can use following
command:

python manage.py runserver <IP>:<port>

e.g. python manage.py runserver 11.12.13.145:5678

If you do not specify IP and the port it starts on
localhost(127.0.0.1) and port 8000.

If you are using command prompt and do not want to use it, you can use
eclipse for the same, following link is useful for this:

http://www.magpiebrain.com/2006/10/09/using-eclipse-and-pydev-for-django/

--Rajendra.

On Dec 30, 10:05 am, girish shabadimath <girishmss.1...@gmail.com>
wrote:
> to change port:
> django-admin.py runsserver <new port number>
>
> On Thu, Dec 30, 2010 at 6:24 AM, Emmanuel Mayssat <emays...@gmail.com>wrote:
>
>
>
> > For the sqlite.db file issue, I changed the settings.py with:
>
> > import os
> > PROJECT_DIR = os.path.dirname(__file__)
> > ...
> > DATABASE_ENGINE = 'sqlite3'
> > DATABASE_NAME = os.path.join(PROJECT_DIR, 'sqlite.db')
>
> > that now works as expected.
> > --
> > Emmanuel Mayssat
>
> > On Wed, Dec 29, 2010 at 4:38 PM, Emmanuel Mayssat <emays...@gmail.com>
> > wrote:
> > > I installed the pydev plugin in eclipse.
> > > I configured it.
> > > Imported my django project and it almost works.
>
> > > Is any one of you using django/eclipse?
>
> > > Well, all goes well until I start the django development server.
> > > 1/ how can I change the default port, it is running on ?
> > > 2/ My sqlite db files is regenerated by the runserver (I had never
> > > seen  that!) in a different directory (at the project level).
> > > If I symlink the 2 db files, it works as expected.
> > > Any clue?
>
> > > BTW, I noticed that when creating a django project in eclipse, it ask
> > > for the path to the db files (when using sqlite3)
> > > It is configured to point to the right location, but runserver doesn't
> > get that.
> > > So what is this db file path used for ? (settings.py is created but
> > > not even configured...)
>
> > > --
> > > Emmanuel Mayssat
>
> > --
> > 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+unsubscribe@googlegroups.com<django-users%2Bunsubscribe@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Girish M S

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Linux password authentication for django

Hi there,

I want to know is there any authentication module base on Linux passwd/
shadow file for django?

Many thanks,
Bill

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Re: django and eclipse

to change port:
django-admin.py runsserver <new port number>

On Thu, Dec 30, 2010 at 6:24 AM, Emmanuel Mayssat <emayssat@gmail.com> wrote:
For the sqlite.db file issue, I changed the settings.py with:

import os
PROJECT_DIR = os.path.dirname(__file__)
...
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = os.path.join(PROJECT_DIR, 'sqlite.db')

that now works as expected.
--
Emmanuel Mayssat



On Wed, Dec 29, 2010 at 4:38 PM, Emmanuel Mayssat <emayssat@gmail.com> wrote:
> I installed the pydev plugin in eclipse.
> I configured it.
> Imported my django project and it almost works.
>
> Is any one of you using django/eclipse?
>
> Well, all goes well until I start the django development server.
> 1/ how can I change the default port, it is running on ?
> 2/ My sqlite db files is regenerated by the runserver (I had never
> seen  that!) in a different directory (at the project level).
> If I symlink the 2 db files, it works as expected.
> Any clue?
>
> BTW, I noticed that when creating a django project in eclipse, it ask
> for the path to the db files (when using sqlite3)
> It is configured to point to the right location, but runserver doesn't get that.
> So what is this db file path used for ? (settings.py is created but
> not even configured...)
>
> --
> Emmanuel Mayssat
>

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.




--
Girish M S

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.