Re: My tool to generate django code

2011-05-21 Thread sushanth Reddy
This is awesome Brice,

Nice Work

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



My tool to generate django code

2011-05-21 Thread Brice Leroy
Hello guys,

I posted a while ago about my project on this forum. Some liked it some kind
of hated it (weird)... I though I would post here for updates.

Django Generator is a tool to build django skeleton of your app (model,
form, view, templates...). I tried to make sure it covers enough surface but
doesn't go too deep so you just have to focus on specific tuning and coding.

The new features:

- There is a first shot of public project. Not sure where this option will
go (fork, clone, collaborative work...)
- Fields can now be collapsed (wow... this took a while I know) and displays
their python transcription.
- Help got included per field option
... and some code fixes and improvements.

I also added a screenshot as people where complaining to have to register to
use/see the tool. I'm not yet sure about the benefit of using the tool
without registration.

As every creator/coder I'd like to get a peer review :-)

Good night folks.

Brice

-- 
blog: http://www.debrice.com
Time tracking tool: http://alpha.kaaloo.com
Django site generator: http://alpha.djangogenerator.com
linkedin: http://www.linkedin.com/in/bricepleroy

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



django-linkedin & oauth2

2011-05-21 Thread CrabbyPete
I took the code below from django-linked in which is code from
oauth2.  It works but does not do the callback.
How do you set the call back from oauth2

# from settings.py
consumer = oauth.Consumer(settings.LINKEDIN_TOKEN,
settings.LINKEDIN_SECRET)
client = oauth.Client(consumer)

request_token_url = 'https://api.linkedin.com/uas/oauth/requestToken'
access_token_url = 'https://api.linkedin.com/uas/oauth/accessToken'
authenticate_url = 'https://www.linkedin.com/uas/oauth/authenticate'

def oauth_login(request):
# Step 1. Get a request token from Provider.
resp, content = client.request(request_token_url, "GET")
if resp['status'] != '200':
raise Exception("Invalid response from Provider.")

# Step 2. Store the request token in a session for later use.
request.session['request_token'] = dict(cgi.parse_qsl(content))

# Step 3. Redirect the user to the authentication URL.
url = "%s?oauth_token=%s" % (authenticate_url,
request.session['request_token']['oauth_token'])

return HttpResponseRedirect(url)

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



Re: help

2011-05-21 Thread Gabriel Gunderson
On Sat, May 21, 2011 at 8:34 PM, Ram  wrote:
> hello everyone i want to learn how to insert text and image uri
> filename in single table of postgreSQL it will be very helpful if i
> will get to learn from code snippets as i am new to django pythan its
> very difficult to learn from djangoproject.com

You can't learn how to run before you learn how to walk.  I'd do the
tutorial again and again until it was perfectly clear in my mind.  It
might be hard, but it will be worth it.

BTW, those are some of the best docs any project has available.

Good luck!

Gabe

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



help

2011-05-21 Thread Ram
hello everyone i want to learn how to insert text and image uri
filename in single table of postgreSQL it will be very helpful if i
will get to learn from code snippets as i am new to django pythan its
very difficult to learn from djangoproject.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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: modwsgi Configuration

2011-05-21 Thread podio
Sorry, sorry I hurry in posting I change the path in the django.wsgi
for /home/mariano and it's working, now I have to see how to install 2
django version :S

SOLVE

On 21 mayo, 23:18, podio  wrote:
> apache log
>
> [Sat May 21 23:14:54 2011] [error] [client ::1] mod_wsgi (pid=14558):
> Exception occurred processing WSGI script '/home/mariano/mysite/apache/
> django.wsgi'.
> [Sat May 21 23:14:54 2011] [error] [client ::1] Traceback (most recent
> call last):
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/core/handlers/wsgi.py", line 250, in
> __call__
> [Sat May 21 23:14:54 2011] [error] [client ::1]
> self.load_middleware()
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/core/handlers/base.py", line 39, in
> load_middleware
> [Sat May 21 23:14:54 2011] [error] [client ::1]     for
> middleware_path in settings.MIDDLEWARE_CLASSES:
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/utils/functional.py", line 276, in
> __getattr__
> [Sat May 21 23:14:54 2011] [error] [client ::1]     self._setup()
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/conf/__init__.py", line 42, in _setup
> [Sat May 21 23:14:54 2011] [error] [client ::1]     self._wrapped =
> Settings(settings_module)
> [Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
> python2.6/dist-packages/django/conf/__init__.py", line 89, in __init__
> [Sat May 21 23:14:54 2011] [error] [client ::1]     raise
> ImportError("Could not import settings '%s' (Is it on sys.path?): %s"
> % (self.SETTINGS_MODULE, e))
> [Sat May 21 23:14:54 2011] [error] [client ::1] ImportError: Could not
> import settings 'mysite.settings' (Is it on sys.path?): No module
> named mysite.settings
> [Sat May 21 23:14:54 2011] [error] [client ::1] File does not exist: /
> var/www/favicon.ico
>
> It say that the settings file is not in sys path but in the
> django.wsgi file it's add it.
>
> On 21 mayo, 23:12, podio  wrote:
>
>
>
>
>
>
>
> > I'm trying to configure django with mod wsgi.
>
> > I put mysite in /home/mariano/mysite create with django 1.3, running
> > the development server works ok.
> > When I try it to configure with apache2 with mod_wsgi I get 500 error:
> > Internal Server Error
> > The server encountered an internal error or misconfiguration and was
> > unable to complete your request.
>
> > --- 
> > 
> > the httpd.conf:
> > --- 
> > 
> > WSGIScriptAlias /mysite /home/mariano/mysite/apache/django.wsgi
>
> > --- 
> > 
> > the /home/mariano/mysite/apache/django.wsgi file:
> > --- 
> > 
> > import os
> > import sys
>
> > path = '/home/mariano/mysite'
> > if path not in sys.path:
> >     sys.path.append(path)
>
> > os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
>
> > import django.core.handlers.wsgi
> > application = django.core.handlers.wsgi.WSGIHandler()
>
> > when i change the httpd.conf with another wsgi in the same folderfile
> > it load ok!
>
> > --- 
> > 
> > /home/mariano/mysite/apache/django2.wsgi
> > --- 
> > 
> > def application(environ, start_response):
> >     status = '200 OK'
> >     output = 'Hello World!'
>
> >     response_headers = [('Content-type', 'text/plain'),
> >                         ('Content-Length', str(len(output)))]
> >     start_response(status, response_headers)
>
> >     return [output]
>
> > Due that I think the problem is in the wsgi file that call the
> > django.core.handlers.wsgi.WSGIHandler()
> > I very new in Django, I'm trying to make this work to then configure
> > django 1.1.4 in the same machine, to use it with lfs shop.
>
> > I have my web in joomla and it's too slow I try lfs and it's great but
> > I can only use it with django server
>
> > Thanks

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



Re: modwsgi Configuration

2011-05-21 Thread podio
apache log

[Sat May 21 23:14:54 2011] [error] [client ::1] mod_wsgi (pid=14558):
Exception occurred processing WSGI script '/home/mariano/mysite/apache/
django.wsgi'.
[Sat May 21 23:14:54 2011] [error] [client ::1] Traceback (most recent
call last):
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/core/handlers/wsgi.py", line 250, in
__call__
[Sat May 21 23:14:54 2011] [error] [client ::1]
self.load_middleware()
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/core/handlers/base.py", line 39, in
load_middleware
[Sat May 21 23:14:54 2011] [error] [client ::1] for
middleware_path in settings.MIDDLEWARE_CLASSES:
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/utils/functional.py", line 276, in
__getattr__
[Sat May 21 23:14:54 2011] [error] [client ::1] self._setup()
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/conf/__init__.py", line 42, in _setup
[Sat May 21 23:14:54 2011] [error] [client ::1] self._wrapped =
Settings(settings_module)
[Sat May 21 23:14:54 2011] [error] [client ::1]   File "/usr/local/lib/
python2.6/dist-packages/django/conf/__init__.py", line 89, in __init__
[Sat May 21 23:14:54 2011] [error] [client ::1] raise
ImportError("Could not import settings '%s' (Is it on sys.path?): %s"
% (self.SETTINGS_MODULE, e))
[Sat May 21 23:14:54 2011] [error] [client ::1] ImportError: Could not
import settings 'mysite.settings' (Is it on sys.path?): No module
named mysite.settings
[Sat May 21 23:14:54 2011] [error] [client ::1] File does not exist: /
var/www/favicon.ico

It say that the settings file is not in sys path but in the
django.wsgi file it's add it.




On 21 mayo, 23:12, podio  wrote:
> I'm trying to configure django with mod wsgi.
>
> I put mysite in /home/mariano/mysite create with django 1.3, running
> the development server works ok.
> When I try it to configure with apache2 with mod_wsgi I get 500 error:
> Internal Server Error
> The server encountered an internal error or misconfiguration and was
> unable to complete your request.
>
> --- 
> 
> the httpd.conf:
> --- 
> 
> WSGIScriptAlias /mysite /home/mariano/mysite/apache/django.wsgi
>
> --- 
> 
> the /home/mariano/mysite/apache/django.wsgi file:
> --- 
> 
> import os
> import sys
>
> path = '/home/mariano/mysite'
> if path not in sys.path:
>     sys.path.append(path)
>
> os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'
>
> import django.core.handlers.wsgi
> application = django.core.handlers.wsgi.WSGIHandler()
>
> when i change the httpd.conf with another wsgi in the same folderfile
> it load ok!
>
> --- 
> 
> /home/mariano/mysite/apache/django2.wsgi
> --- 
> 
> def application(environ, start_response):
>     status = '200 OK'
>     output = 'Hello World!'
>
>     response_headers = [('Content-type', 'text/plain'),
>                         ('Content-Length', str(len(output)))]
>     start_response(status, response_headers)
>
>     return [output]
>
> Due that I think the problem is in the wsgi file that call the
> django.core.handlers.wsgi.WSGIHandler()
> I very new in Django, I'm trying to make this work to then configure
> django 1.1.4 in the same machine, to use it with lfs shop.
>
> I have my web in joomla and it's too slow I try lfs and it's great but
> I can only use it with django server
>
> Thanks

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



modwsgi Configuration

2011-05-21 Thread podio
I'm trying to configure django with mod wsgi.

I put mysite in /home/mariano/mysite create with django 1.3, running
the development server works ok.
When I try it to configure with apache2 with mod_wsgi I get 500 error:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.

---
the httpd.conf:
---
WSGIScriptAlias /mysite /home/mariano/mysite/apache/django.wsgi



---
the /home/mariano/mysite/apache/django.wsgi file:
---
import os
import sys

path = '/home/mariano/mysite'
if path not in sys.path:
sys.path.append(path)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

import django.core.handlers.wsgi
application = django.core.handlers.wsgi.WSGIHandler()



when i change the httpd.conf with another wsgi in the same folderfile
it load ok!

---
/home/mariano/mysite/apache/django2.wsgi
---
def application(environ, start_response):
status = '200 OK'
output = 'Hello World!'

response_headers = [('Content-type', 'text/plain'),
('Content-Length', str(len(output)))]
start_response(status, response_headers)

return [output]


Due that I think the problem is in the wsgi file that call the
django.core.handlers.wsgi.WSGIHandler()
I very new in Django, I'm trying to make this work to then configure
django 1.1.4 in the same machine, to use it with lfs shop.

I have my web in joomla and it's too slow I try lfs and it's great but
I can only use it with django server

Thanks

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



Re: forum and blog for developers

2011-05-21 Thread Casey Greene
I also feel that something of the sort would be helpful if someone else 
started it.  djangoweek.ly had its inaugural issue fairly recently and I 
enjoy reading it each week, but it relies on other people to generate 
interesting blog posts, apps, etc:


http://djangoweek.ly/

Casey

On 05/21/2011 08:57 PM, AJ wrote:

Excellent suggestion Russ!

On Sat, May 21, 2011 at 8:17 PM, Russell Keith-Magee
> wrote:

On Sunday, May 22, 2011, fei > wrote:
 > I have been using Django for a while. The documentation for the
Django
 > official web page is great, plus the free online django book. There
 > are enough documentations to get started using Django. However, I
feel
 > there is a missing blog for Django developers.

Django has a blog - it's linked from the homepage.

http://djangoproject.com/weblog

However, it's only used for large project announcements (releases,
conferences, and so on).

 > Having a blog for developers is very useful. The blog can publish
 > articles regarding the latest features, design decisions behind the
 > scene and useful tricks. For example, Django introduced class base
 > generic view from version 1.3. An blog article can talk about why to
 > move from function based generic view to class based.
 >
 > As Django developers, it's better not just to know how to use Django,
 > but also to understand why Django is doing this way. Learning it this
 > way can help developers write better code. Having a official blog is
 > also a form of advertising for Django, so more people will start to
 > use Django. The Android blog is a very good example (http://android-
 > developers.blogspot.com/ ). I
found out the Android blog is very
 > useful.

Is a developer blog, in principle, a good idea? Sure. however, we
simply don't have the power or resources to compel anyone to write
entries.

There's a significant difference between Android and Django - Django
is an open source project maintained by volunteers, whereas Android is
funded and is being actively promoted by Google. Google pays for
people specifically to write this sort of blog content; Django doesn't
have those resources. If we want a blog entry, someone has to
volunteer the time to write it. And that means that writing blog
entries is competing for attention with fixing bugs, answering
questions on mailing lists, and so on.

The good news is that because we are a volunteer organization,
*anyone* can help out. If you think a developer blog would be
worthwhile, start writing! You don't need to be officially blessed to
start a blog. Once you've got the blog, you can add it to the
community aggregator, so everyone knows about it. If you make a habit
of writing good blog entries, you will become known as a valuable
community resource, and the entire community will benefit.

Yours,
Russ Magee %-)

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




--
AJ

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


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



Re: forum and blog for developers

2011-05-21 Thread AJ
Excellent suggestion Russ!

On Sat, May 21, 2011 at 8:17 PM, Russell Keith-Magee <
russ...@keith-magee.com> wrote:

> On Sunday, May 22, 2011, fei  wrote:
> > I have been using Django for a while. The documentation for the Django
> > official web page is great, plus the free online django book. There
> > are enough documentations to get started using Django. However, I feel
> > there is a missing blog for Django developers.
>
> Django has a blog - it's linked from the homepage.
>
> http://djangoproject.com/weblog
>
> However, it's only used for large project announcements (releases,
> conferences, and so on).
>
> > Having a blog for developers is very useful. The blog can publish
> > articles regarding the latest features, design decisions behind the
> > scene and useful tricks. For example, Django introduced class base
> > generic view from version 1.3. An blog article can talk about why to
> > move from function based generic view to class based.
> >
> > As Django developers, it's better not just to know how to use Django,
> > but also to understand why Django is doing this way. Learning it this
> > way can help developers write better code. Having a official blog is
> > also a form of advertising for Django, so more people will start to
> > use Django. The Android blog is a very good example (http://android-
> > developers.blogspot.com/). I found out the Android blog is very
> > useful.
>
> Is a developer blog, in principle, a good idea? Sure. however, we
> simply don't have the power or resources to compel anyone to write
> entries.
>
> There's a significant difference between Android and Django - Django
> is an open source project maintained by volunteers, whereas Android is
> funded and is being actively promoted by Google. Google pays for
> people specifically to write this sort of blog content; Django doesn't
> have those resources. If we want a blog entry, someone has to
> volunteer the time to write it. And that means that writing blog
> entries is competing for attention with fixing bugs, answering
> questions on mailing lists, and so on.
>
> The good news is that because we are a volunteer organization,
> *anyone* can help out. If you think a developer blog would be
> worthwhile, start writing! You don't need to be officially blessed to
> start a blog. Once you've got the blog, you can add it to the
> community aggregator, so everyone knows about it. If you make a habit
> of writing good blog entries, you will become known as a valuable
> community resource, and the entire community will benefit.
>
> Yours,
> Russ Magee %-)
>
> --
> 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 more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
AJ

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



Re: forum and blog for developers

2011-05-21 Thread Russell Keith-Magee
On Sunday, May 22, 2011, fei  wrote:
> I have been using Django for a while. The documentation for the Django
> official web page is great, plus the free online django book. There
> are enough documentations to get started using Django. However, I feel
> there is a missing blog for Django developers.

Django has a blog - it's linked from the homepage.

http://djangoproject.com/weblog

However, it's only used for large project announcements (releases,
conferences, and so on).

> Having a blog for developers is very useful. The blog can publish
> articles regarding the latest features, design decisions behind the
> scene and useful tricks. For example, Django introduced class base
> generic view from version 1.3. An blog article can talk about why to
> move from function based generic view to class based.
>
> As Django developers, it's better not just to know how to use Django,
> but also to understand why Django is doing this way. Learning it this
> way can help developers write better code. Having a official blog is
> also a form of advertising for Django, so more people will start to
> use Django. The Android blog is a very good example (http://android-
> developers.blogspot.com/). I found out the Android blog is very
> useful.

Is a developer blog, in principle, a good idea? Sure. however, we
simply don't have the power or resources to compel anyone to write
entries.

There's a significant difference between Android and Django - Django
is an open source project maintained by volunteers, whereas Android is
funded and is being actively promoted by Google. Google pays for
people specifically to write this sort of blog content; Django doesn't
have those resources. If we want a blog entry, someone has to
volunteer the time to write it. And that means that writing blog
entries is competing for attention with fixing bugs, answering
questions on mailing lists, and so on.

The good news is that because we are a volunteer organization,
*anyone* can help out. If you think a developer blog would be
worthwhile, start writing! You don't need to be officially blessed to
start a blog. Once you've got the blog, you can add it to the
community aggregator, so everyone knows about it. If you make a habit
of writing good blog entries, you will become known as a valuable
community resource, and the entire community will benefit.

Yours,
Russ Magee %-)

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



forum and blog for developers

2011-05-21 Thread fei
I have been using Django for a while. The documentation for the Django
official web page is great, plus the free online django book. There
are enough documentations to get started using Django. However, I feel
there is a missing blog for Django developers.

Having a blog for developers is very useful. The blog can publish
articles regarding the latest features, design decisions behind the
scene and useful tricks. For example, Django introduced class base
generic view from version 1.3. An blog article can talk about why to
move from function based generic view to class based.

As Django developers, it's better not just to know how to use Django,
but also to understand why Django is doing this way. Learning it this
way can help developers write better code. Having a official blog is
also a form of advertising for Django, so more people will start to
use Django. The Android blog is a very good example (http://android-
developers.blogspot.com/). I found out the Android blog is very
useful.

Not sure if it is the right place to discuss this kind of question.
Please point me to proper place if there is one.

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



Re: Why errors when restart but goes away after reload again! How fix?

2011-05-21 Thread Mateusz Marzantowicz
On Sat, May 21, 2011 at 7:49 PM, Chris Seberino  wrote:

> When I restart my server, I get an error on the first page reload and
> then all is fine on the second page reload!
>
> The error is this...
>
> --
> ViewDoesNotExist at /blog
>
> Tried blog in module mvc.controllers.controllers. Error was: 'module'
> object has no attribute 'models'
> 
>
> I get a similar error not matter what page I try to view first after a
> restart.
> It goes away on the second reload always.
>
> chris


What server are you using? What is your configuration? Do you have mod_wsgi,
mod_python or something else? What is your browser, OS, etc. Please do not
let us guess.

Mateusz

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



Re: urlpatterns

2011-05-21 Thread Daniel Roseman
Op zaterdag 21 mei 2011 03:50:40 UTC+1 schreef Dagon het volgende:
>
> I am a newbie to both Python and Django. 
> Why does urlpatterns = patterns('', (r'^People/$', 
> 'iFriends.People.views.index') get me the following error message: 
>
>  Using the URLconf defined in iFriends.urls, Django tried these URL 
> patterns, in this order: 
>  ^People/$ 
>
> The current URL, , didn't match any of these. 
>
> If I use the pattern (r'^$', 'iFriends.People.views.index') I get the 
> desired results. 
>
> Charles


I can't quite see what you're confused about here. If you only specify a 
urlpattern of '^People/$', then Django is only going to match against that 
regex - so only the URL '/People/' will match, and the base URL of '/' will 
not. Your other pattern matches the base URL, so it works.
--
DR. 

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



Why errors when restart but goes away after reload again! How fix?

2011-05-21 Thread Chris Seberino
When I restart my server, I get an error on the first page reload and
then all is fine on the second page reload!

The error is this...

--
ViewDoesNotExist at /blog

Tried blog in module mvc.controllers.controllers. Error was: 'module'
object has no attribute 'models'


I get a similar error not matter what page I try to view first after a
restart.
It goes away on the second reload always.

chris

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



Re: failing to pass model objects to template for some reason....

2011-05-21 Thread Chris Seberino

On May 21, 5:22 am, Duane Griffin  wrote:
> Is the messaging framework configured (note that it is by default)?

Wow.  I thanks so much!  I never would have caught this!
I renamed Message to Annoucement and now it works!

cs

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



Re: [ask for help] how to solve this issue: "DatabaseError at /admin/myapp, no such column: myapp.myvar"

2011-05-21 Thread brad
It sounds like you may have created your Models, run "mange.py syncdb", then 
added another field to your Model.

Remember, syncdb doesn't add new columns in your table when you add a new 
field to an existing model.  If this app is still in development, you can 
drop the whole table corresponding to that model and run syncdb again.

You should also consider looking at south (http://south.aeracode.org/). It 
provides migration tools that let you add columns to existing models via a 
managment command.

- Brad

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



Re: [ask for help] how to solve this issue: "DatabaseError at /admin/myapp, no such column: myapp.myvar"

2011-05-21 Thread Gabriel Gunderson
On Fri, May 20, 2011 at 8:36 PM, enqing  wrote:
>  This weird issue hanpped when I used the django admin site. I have
> set the database with sqlite3,  and creat a number of my classes in
> app model.py, all others classes  can work as expectation. only a
> class have this  "DatabaseError at /admin/myapp, no such column:
> myapp.myvar" error apper in web browser.
>
> but  the class's everything is the same with others, the only
> different place is the class‘s name. I also use "python manage.py
> syncdb" to refresh my database, but nothing change.
>
> who can help me? I have been agonized by this issue for tow weeks.

I think you're going to have to post (or pastebin) some models and
whatever else you think might help us figure it out.

Gabe

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



Re: urlpatterns

2011-05-21 Thread Mateusz Marzantowicz
On Sat, May 21, 2011 at 2:14 PM, Mateusz Marzantowicz <
mmarzantow...@gmail.com> wrote:

> On Sat, May 21, 2011 at 4:50 AM, Dagon  wrote:
>
>> I am a newbie to both Python and Django.
>> Why does urlpatterns = patterns('', (r'^People/$',
>> 'iFriends.People.views.index') get me the following error message:
>>
>>  Using the URLconf defined in iFriends.urls, Django tried these URL
>> patterns, in this order:
>>  ^People/$
>>
>> The current URL, , didn't match any of these.
>>
>> If I use the pattern (r'^$', 'iFriends.People.views.index') I get the
>> desired results.
>>
>> Charles
>>
>>
> Please provide some more information about the layout of your
> project/application.
> As far as I can see from your mail you have project named iFriends and
> People application inside.
> For that assumption
>

Sorry for that incomplete mail. Below goes the rest of it:

In your project settings.py file inside urlpatterns() place the line that
looks similar to this one below:

(r'^People/', include('iFriends.People.urls')),

Than create file urls.py inside your People application that do the magic.
It might look something like:

(r'^$', 'some.view.function'),

Of course that are only snippets of code and you must place them in the
right place.

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



Re: urlpatterns

2011-05-21 Thread Mateusz Marzantowicz
On Sat, May 21, 2011 at 4:50 AM, Dagon  wrote:

> I am a newbie to both Python and Django.
> Why does urlpatterns = patterns('', (r'^People/$',
> 'iFriends.People.views.index') get me the following error message:
>
>  Using the URLconf defined in iFriends.urls, Django tried these URL
> patterns, in this order:
>  ^People/$
>
> The current URL, , didn't match any of these.
>
> If I use the pattern (r'^$', 'iFriends.People.views.index') I get the
> desired results.
>
> Charles
>
>
Please provide some more information about the layout of your
project/application.
As far as I can see from your mail you have project named iFriends and
People application inside.
For that assumption

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



Re: uber weird access problem from windows

2011-05-21 Thread AJ
Just out of curiosity, is it firefox 4? Is it seen with some of the other
web forms too?

I have been having *same* trouble with various web forms while using FF4,
and I use Mac.


On Sat, May 21, 2011 at 1:07 AM, Kenneth Gonsalves
wrote:

> hi,
>
> I have a django app running on a lan. The server is linux and setup is
> apache/mod_wsgi. There are windows and linux clients that access the app
> and also the app is accessible from the server itself. Everything works
> fine from the client machines and from the server, except one form. In
> this form, from the windows machine, on clicking submit nothing happens.
> Apache logs show no click. When the same person logs in to the server
> machine, that form works. The windows machine has firefox on it.
>
> The form is no different from any other form - in fact it is cut and
> pasted from another form which works perfectly. Has anyone faced a
> problem like this? Any clues on how to diagnose?
> --
> regards
> KG
> http://lawgon.livejournal.com
> Coimbatore LUG rox
> http://ilugcbe.techstud.org/
>
> --
> 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 more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
AJ

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



urlpatterns

2011-05-21 Thread Dagon
I am a newbie to both Python and Django.
Why does urlpatterns = patterns('', (r'^People/$',
'iFriends.People.views.index') get me the following error message:

 Using the URLconf defined in iFriends.urls, Django tried these URL
patterns, in this order:
 ^People/$

The current URL, , didn't match any of these.

If I use the pattern (r'^$', 'iFriends.People.views.index') I get the
desired results.

Charles

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



[ask for help] how to solve this issue: "DatabaseError at /admin/myapp, no such column: myapp.myvar"

2011-05-21 Thread enqing
 This weird issue hanpped when I used the django admin site. I have
set the database with sqlite3,  and creat a number of my classes in
app model.py, all others classes  can work as expectation. only a
class have this  "DatabaseError at /admin/myapp, no such column:
myapp.myvar" error apper in web browser.

but  the class's everything is the same with others, the only
different place is the class‘s name. I also use "python manage.py
syncdb" to refresh my database, but nothing change.

who can help me? I have been agonized by this issue for tow weeks.

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



Re: XUL template

2011-05-21 Thread Alagu Madhu
Firefox 4 - Remote XUL support removed



On May 21, 12:09 pm, Alagu Madhu  wrote:
> Hi,
>
> from django.shortcuts import render_to_response
>
> def login(request):
>     return render_to_response('login.xul', mimetype="application/
> vnd.mozilla.xul+xml")
>
> and
>
> def login(request):
>     response = render_to_response('login.xul')
>     response['Content-Type'] = "application/vnd.mozilla.xul+xml"
>     return response
>
> I would like to use XUL template.It is not works.
>
> Thanks
>
> Madhu Alagu

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



XUL template

2011-05-21 Thread Alagu Madhu
Hi,

from django.shortcuts import render_to_response

def login(request):
return render_to_response('login.xul', mimetype="application/
vnd.mozilla.xul+xml")

and

def login(request):
response = render_to_response('login.xul')
response['Content-Type'] = "application/vnd.mozilla.xul+xml"
return response


I would like to use XUL template.It is not works.


Thanks

Madhu Alagu

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



Re: Update a user profile after LInkedin Oauth

2011-05-21 Thread Mike Ryan
Are you able to specify a dynamic return URL with LinkedIn's API? If
so, you can:

Generate a unique ID for each user (maybe even user.pk)
Use this data in the return URL (e.g. example.com/oauth_return/
/)
Attach that URL to a view which looks up the unique ID - you can now
associate the user with the data returned by LinkedIn

I do something similar with a different oAuth provider, and it works
quite nicely.



On May 21, 2:45 am, CrabbyPete  wrote:
> I am trying to update a user profile of an existing user with a
> LinkedIn profile. My problem is I need an email address, but LinkedIn
> does not give you that information. So I have a user create an account
> with their email address and ask if they want to link their profile to
> their LinkedIn profile. The problem is that the way Oauth works is
> that it uses a call back and there is no way to link the user who
> initiated the Oauth call to the call back coming from LinkedIn. If you
> look at the request.user its Anonymous.
>
> Does anyone have an idea how to get around this?

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



Re: failing to pass model objects to template for some reason....

2011-05-21 Thread Gath
Chris,

Try to print out the entire list object in the template, see if it has
anything i.e.

{{ messages }}

This should tell you if data is been transfered from your view to the
template.

Gath

On May 21, 7:51 am, Chris Seberino  wrote:
> I have a model class called Message with an attribute called text.
>
> ** When I pass a list of these objects called messages to my template,
> it doesn't show up.
>
> ** When I instead create this derivative called fred, that *does*
> work...
>          fred = [e.text for e in messages]
>
> Why would fred work fine in template but not messages?
>
> Here is my template code for messages that doesn't show anything on
> page..
>
>         {% for e in messages %}
>                 {{e.date}}: {{e.text}}
>         {% endfor %}
>
> Here is the fred code that does work..
>         {% for e in fred %}
>                 {{e}}
>         {% endfor %}
>
> cs

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