Re: CSRF token not adding hidden form field

2010-06-10 Thread Joel Klabo
yeah, still 403. CSRF token missing or incorrect.

On Jun 10, 7:20 pm, Lee Hinde  wrote:
> Is the error the same?
>
>
>
> On Thu, Jun 10, 2010 at 5:41 PM, joelklabo  wrote:
> > Still won't work. Here is my views.py:
>
> > def login(request):
> >        c = {}
> >        c.update(csrf(request))
> >        if request.POST:
> >                username = request.POST['username']
> >                password = request.POST['password']
> >        else:
> >                request = 'it is not there.'
> >        return render_to_response('feed.html', c)
>
> > On Jun 10, 2:22 pm, Lee Hinde  wrote:
> >> You need to add:
>
> >> from django.core.context_processors import csrf
> >> at the top of Views.py
>
> >> and
>
> >>    c = {}
> >>    c.update(csrf(request))
>
> >> to each response/view
>
> >>  since you're using render_to_response
>
> >> On Thu, Jun 10, 2010 at 8:10 AM, joelklabo  wrote:
> >> > This is my source on GitHub if anyone is 
> >> > interested:http://github.com/joelklabo/Brooski
>
> >> > On Jun 10, 8:00 am, joelklabo  wrote:
> >> >> This is my urls.py:
>
> >> >>         (r'^site_media/(?P.*)$', 'django.views.static.serve',
> >> >> {'document_root': settings.MEDIA_ROOT}),
> >> >>     (r'^$', feed),
> >> >>     (r'^admin/', include(admin.site.urls)),
> >> >>         (r'^accounts/login/$', '.contrib.auth.views.login', 
> >> >> {'template_name':
> >> >> 'base.html'}),
> >> >>         (r'^accounts/logout/$', logout),
> >> >>     (r'^profile/(\w+)', profile),
> >> >>         (r'^brew/(\d+)', brewDetail),
> >> >>         (r'^brewery/(.+)', breweryDetail),
> >> >>         (r'^style/(.+)', styleDetail),
>
> >> >> I'm not sure how I would turn off CSRF. My form is in base.html as a
> >> >> login form with some logic like {% if not logged in %} display form.
>
> >> >> On Jun 9, 11:43 pm, Roshan Mathews  wrote:
>
> >> >> > On Thu, Jun 10, 2010 at 11:45,joelklabo wrote:
> >> >> > > Looks like it did something, I didn't get a 403 but I got this 
> >> >> > > error:
>
> >> >> > Okay, so it seems, 'django.middleware.csrf.CsrfResponseMiddleware' is
> >> >> > not required.  Please remove that.
>
> >> >> > Are your forms working without csrf protection turned on?  That stack
> >> >> > trace looks like it couldn't resolve some url, and given that your
> >> >> > form is not posting to the same view it came from, that might be a
> >> >> > source of the problem.  Check your urls.py ...
>
> >> >> > --http://roshan.mathews.in/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: CSRF token not adding hidden form field

2010-06-12 Thread Joel Klabo
I finally got it to work by adding the RequestContext to my
render_to_response. I think the issue was that it was redirecting and
the csrf_token wasn't getting sent to the new page by the
requestcontext, here is what it looks like now: (csrf_token is also in
the form)

return render_to_response('profile.html', {'drinks' : drinks,
'followers' : followers},

context_instance=RequestContext(request))

Thanks for all the help!

On Jun 11, 9:32 pm, Ali Kusnadi  wrote:
> On 6/11/10, Joel Klabo  wrote:
>
> > yeah, still 403. CSRF token missing or incorrect.
>
> try add the  'django.core.context_processors.csrf' in your settings.py
>
> TEMPLATE_CONTEXT_PROCESSORS = (
>
>         'django.core.context_processors.csrf',
>
> )
>
>
>
>
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@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-us...@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 architecture question

2010-06-14 Thread Joel Klabo
I am working on a simple site right now and the views are pretty easy.
Usually just iterate a loop of objects. But, I am trying to figure out
how a website with all different kinds of data, including a sign in
form, is setup in django. Is that all in one big view? Or, is there
some way to combine them?

Any insight would be helpful, thank you.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Django architecture question

2010-06-15 Thread Joel Klabo
Thanks, good info. So the template tag can do the DB query and all
that without going through a view function?

On Jun 15, 8:09 am, Paul  wrote:
> On 15 Jun., 06:55, Joel Klabo  wrote:
>
> > I am working on a simple site right now and the views are pretty easy.
> > Usually just iterate a loop of objects. But, I am trying to figure out
> > how a website with all different kinds of data, including a sign in
> > form, is setup in django. Is that all in one big view? Or, is there
> > some way to combine them?
>
> > Any insight would be helpful, thank you.
>
> Hi Joel,
>
> very good question, I take it you want to know how "composition" is
> done at the "page level" without dragging all the logic into one view.
> In django you can generate recurring elements with template tags, for
> adding variables to the request or generate markup directly.
>
> say you want a list of users that joined your site recently:
>
> class RecentUsersNode(template.Node):
>     def __init__(self, limit):
>         try: self.limit = int(limit)
>         except ValueError: self.limit = 10
>
>     def render(self, context):
>         profiles = UserProfile.objects.order_by('user__date_joined')
> [:self.limit]
>         context['recent_users'] = profiles
>         return ''
>
> @register.tag
> def recent_users(parser, token):
>     args = token.split_contents()
>     if len(args) <= 1:
>         return RecentUsersNode(10)
>
>     num = args[1]
>     if(num[0] == num[-1] and num[0] in ('"', "'")):
>         num = num[1:-1] # strip quotes
>     return RecentUsersNode(num)
>
> {% recent_users %} will add a list of UserProfile objects to your
> request and you can use it like:
>
> {% for profile in recent_users %}
>   
> {% endfor %}
>
> In the old days of web 1.0 there was a natural 1:1 mapping from the
> page to a script/function which generates the content. With ajax it's
> becoming more like a desktop app where you have many parts/widgets
> with callbacks or events. If you want the page to display without JS,
> you still have to generate the page with one request though...
>
> cheers
>  Paul

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Django architecture question

2010-06-15 Thread Joel Klabo
I guess what I'm am trying say is that I was under the impression that
when you go to a URL, a view is called. And only one view can be
called per URL. And that view needs to serve all of the data for that
page. It seems like there is a way to have multiple views being
rendered simultaneously. Is it all javascript or just a huge view
with: user login, feeds of current data, etc...

On Jun 15, 8:09 am, Paul  wrote:
> On 15 Jun., 06:55, Joel Klabo  wrote:
>
> > I am working on a simple site right now and the views are pretty easy.
> > Usually just iterate a loop of objects. But, I am trying to figure out
> > how a website with all different kinds of data, including a sign in
> > form, is setup in django. Is that all in one big view? Or, is there
> > some way to combine them?
>
> > Any insight would be helpful, thank you.
>
> Hi Joel,
>
> very good question, I take it you want to know how "composition" is
> done at the "page level" without dragging all the logic into one view.
> In django you can generate recurring elements with template tags, for
> adding variables to the request or generate markup directly.
>
> say you want a list of users that joined your site recently:
>
> class RecentUsersNode(template.Node):
>     def __init__(self, limit):
>         try: self.limit = int(limit)
>         except ValueError: self.limit = 10
>
>     def render(self, context):
>         profiles = UserProfile.objects.order_by('user__date_joined')
> [:self.limit]
>         context['recent_users'] = profiles
>         return ''
>
> @register.tag
> def recent_users(parser, token):
>     args = token.split_contents()
>     if len(args) <= 1:
>         return RecentUsersNode(10)
>
>     num = args[1]
>     if(num[0] == num[-1] and num[0] in ('"', "'")):
>         num = num[1:-1] # strip quotes
>     return RecentUsersNode(num)
>
> {% recent_users %} will add a list of UserProfile objects to your
> request and you can use it like:
>
> {% for profile in recent_users %}
>   
> {% endfor %}
>
> In the old days of web 1.0 there was a natural 1:1 mapping from the
> page to a script/function which generates the content. With ajax it's
> becoming more like a desktop app where you have many parts/widgets
> with callbacks or events. If you want the page to display without JS,
> you still have to generate the page with one request though...
>
> cheers
>  Paul

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: CSRF verification failed - 403 error

2010-07-16 Thread Joel Klabo
I had this same problem. Try this for your return statements, if
you're using render_to_response:

return render_to_response("a_template.html", c,
context_instance=RequestContext(request))

The context_instance was the key in my case. You'll need to add it to
all your views though.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



ModelForm and a new model instance

2010-07-16 Thread Joel Klabo
I am using modelForm to make a form for my Brew model. The form shows
up and works fine. And saves it when I call save. But it does not
catch the errors correctly. I set it up mostly based on this example:

from django.core.validators import ValidationError, NON_FIELD_ERRORS
try:
article.full_clean()
except ValidationError, e:
non_field_errors = e.message_dict[NON_FIELD_ERRORS]


First of all, NON_FIELD_ERRORS was unknown to django and caused an
error.

What I really want is to see a full code example of how to do this
seemingly simple thing. Just a form from a model that allows users to
create a new instance of the model and save it to the database. And
how the errors are dealt with. Please help, I swear I have looked all
through the docs.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: ModelForm and a new model instance

2010-07-17 Thread Joel Klabo
That did it! That example was what I was looking for. The error
handling led me astray, it's all taken care of. Thanks a lot.

On Jul 17, 2:42 am, Karen Tracey  wrote:
> On Fri, Jul 16, 2010 at 6:27 PM, Joel Klabo  wrote:
> > I am using modelForm to make a form for my Brew model. The form shows
> > up and works fine. And saves it when I call save. But it does not
> > catch the errors correctly. I set it up mostly based on this example:
>
> > from django.core.validators import ValidationError, NON_FIELD_ERRORS
> > try:
> >    article.full_clean()
> > except ValidationError, e:
> >    non_field_errors = e.message_dict[NON_FIELD_ERRORS]
>
> > First of all, NON_FIELD_ERRORS was unknown to django and caused an
> > error.
>
> That was an error in the doc. The import should be:
>
> from django.core.exceptions import ValidationError, NON_FIELD_ERRORS
>
> > What I really want is to see a full code example of how to do this
> > seemingly simple thing. Just a form from a model that allows users to
> > create a new instance of the model and save it to the database. And
> > how the errors are dealt with. Please help, I swear I have looked all
> > through the docs.
>
> The simplest thing is the regular Django form idiom of calling is_valid() on
> the form and re-displaying the form (now annotated with error information)
> in the case where is_valid() returns False, 
> see:http://docs.djangoproject.com/en/1.2/topics/forms/#using-a-form-in-a-...
>
> The fragment of code you posted is from the documentation for the new model
> validation feature, but it is not clear from what you have written that you
> actually want/need to use that feature? For the simplest case, it isn't
> needed.
>
> Karen
>  --http://tracey.org/kmt/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



comment template tag not working

2010-07-17 Thread Joel Klabo
I am trying to use the get_comment_list template tag and I keep
getting errors. Any ideas? http://dpaste.org/nCx0/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: comment template tag not working

2010-07-17 Thread Joel Klabo
I got it to work by adding: {% load comments %}. I had put the load
comments tag in my base.html but didn't work there for some reason.

On Jul 17, 1:00 pm, Joel Klabo  wrote:
> I am trying to use the get_comment_list template tag and I keep
> getting errors. Any ideas?http://dpaste.org/nCx0/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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 autocomplete search with jQuery

2010-07-29 Thread Joel Klabo
I have been looking around for some examples but I can't find anything
recent. This is my first AJAX experience so I would love to just see
an example because it's not quite making sense to me. Does anyone know
of a tutorial? Or have some code samples I could check out? I have
checked google btw.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Custom clean() method

2010-08-24 Thread Joel Klabo
When you write a custom clean method for a form, does is get called by
is_valid? Or does it call the standard version? Do I need to
explicitly call it?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Custom clean() method

2010-08-24 Thread Joel Klabo
Thank you, question answered.

On Aug 24, 11:45 am, Shawn Milochik  wrote:
> Your version automatically gets called during the cleaning process
> (assuming it's named properly). You don't need to call it explicitly.
> The default cleaning of the field will happen automatically. All you
> have to do is get the value from cleaned_data and make sure you return
> the value in your function.
>
> http://docs.djangoproject.com/en/dev/ref/forms/validation/#cleaning-a...
>
> Shawn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



method on the User model?

2010-08-24 Thread Joel Klabo
I am trying to find a way to get a list of users ranked by the most
"drinks". The drink model has a User field so I am doing this to get
the info, based on the Drink model:

http://dpaste.com/hold/233600/

But, this seems like craziness. Can't I just search the
User.objects.all().order_by('drinks') or something? Can i make a User
method? I'm confused, obviously.

Here is my Drink model so you have the whole picture:

http://dpaste.com/hold/233601/

Any help on this would be great, I know there is something to be
learned from 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-us...@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.



apache won't start now for some reason....

2010-08-26 Thread Joel Klabo
Apache was running fine, as far as I know I didn't change anything.
This is the error log:
http://dpaste.com/234582/

SIGTERM?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: apache won't start now for some reason....

2010-08-26 Thread Joel Klabo
Got it, I had accidentally deleted my error.log file and when it
couldn't find it it borked itself.

On Aug 26, 3:36 pm, Joel Klabo  wrote:
> Apache was running fine, as far as I know I didn't change anything.
> This is the error log:http://dpaste.com/234582/
>
> SIGTERM?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



question on directory structure for deploying project

2010-08-26 Thread Joel Klabo
on my VPS i have my project at: /srv/www/brooski.net/brooski/(all my
files, settings.py, url.py are here)

and my VirtualHost is setup like this:


ServerAdmin r...@brooski.net
ServerName brooski.net
ServerAlias www.brooski.net
DocumentRoot /srv/www/brooski.net/public_html/
PythonPath "['/srv/www/brooski.net/brooski', '/usr/lib/
pymodules/python2.6/'] + sys.path"

SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE settings
PythonDebug Off


ErrorLog /srv/www/brooski.net/logs/error.log
CustomLog /srv/www/brooski.net/logs/access.log combined


And when i goto brooski.net i get the django error page saying:

ImportError at /
No module named brooski.urls

So, I tried going and removing the 'brooski.' everywhere in my project
and that got me through a bunch of similar errors but I eventually got
one where it was using 'brooski.net' as my module name and it was
causing a problem.

Basically I don't know how to set up this structure, am I doing
something wrong? Thanks for any advice, and please don't use my
sensitive information against me...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: question on directory structure for deploying project

2010-08-26 Thread Joel Klabo
also, when I change the virtual host path to: /srv/www/brooski.net
(instead of /srv/www/brooski.net/brooski/) I get an internal server
error. Whereas with '/srv/www/brooski.net/brooski/' I get the actual
django error page

On Aug 26, 4:20 pm, Joel Klabo  wrote:
> on my VPS i have my project at: /srv/www/brooski.net/brooski/(all my
> files, settings.py, url.py are here)
>
> and my VirtualHost is setup like this:
>
> 
>         ServerAdmin r...@brooski.net
>         ServerName brooski.net
>         ServerAliaswww.brooski.net
>         DocumentRoot /srv/www/brooski.net/public_html/
>         PythonPath "['/srv/www/brooski.net/brooski', '/usr/lib/
> pymodules/python2.6/'] + sys.path"
>         
>                 SetHandler python-program
>                 PythonHandler django.core.handlers.modpython
>                 SetEnv DJANGO_SETTINGS_MODULE settings
>                 PythonDebug Off
>         
>
>         ErrorLog /srv/www/brooski.net/logs/error.log
>         CustomLog /srv/www/brooski.net/logs/access.log combined
> 
>
> And when i goto brooski.net i get the django error page saying:
>
> ImportError at /
> No module named brooski.urls
>
> So, I tried going and removing the 'brooski.' everywhere in my project
> and that got me through a bunch of similar errors but I eventually got
> one where it was using 'brooski.net' as my module name and it was
> causing a problem.
>
> Basically I don't know how to set up this structure, am I doing
> something wrong? Thanks for any advice, and please don't use my
> sensitive information against me...

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: question on directory structure for deploying project

2010-08-26 Thread Joel Klabo
It does have __init__.py, but not the server isn't seeing it... '500
internal server error'

On Aug 26, 4:48 pm, Kenneth Gonsalves  wrote:
> On Thu, 2010-08-26 at 16:44 -0700, Joel Klabo wrote:
> > also, when I change the virtual host path to: /srv/www/brooski.net
> > (instead of /srv/www/brooski.net/brooski/) I get an internal server
> > error. Whereas with '/srv/www/brooski.net/brooski/' I get the actual
> > django error page
>
> the question is that does brooski directory have an __init__.py file in
> it. If so, It should not be on the path - only the parent directory
> should be in the path.
> --
> regards
> Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: question on directory structure for deploying project

2010-08-26 Thread Joel Klabo
Could someone just show me how theirs is set up?

On Aug 26, 4:54 pm, Joel Klabo  wrote:
> It does have __init__.py, but not the server isn't seeing it... '500
> internal server error'
>
> On Aug 26, 4:48 pm, Kenneth Gonsalves  wrote:
>
>
>
> > On Thu, 2010-08-26 at 16:44 -0700, Joel Klabo wrote:
> > > also, when I change the virtual host path to: /srv/www/brooski.net
> > > (instead of /srv/www/brooski.net/brooski/) I get an internal server
> > > error. Whereas with '/srv/www/brooski.net/brooski/' I get the actual
> > > django error page
>
> > the question is that does brooski directory have an __init__.py file in
> > it. If so, It should not be on the path - only the parent directory
> > should be in the path.
> > --
> > regards
> > Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: question on directory structure for deploying project

2010-08-27 Thread Joel Klabo
bmp

On Aug 26, 8:14 pm, Joel Klabo  wrote:
> Could someone just show me how theirs is set up?
>
> On Aug 26, 4:54 pm, Joel Klabo  wrote:
>
>
>
>
>
>
>
> > It does have __init__.py, but not the server isn't seeing it... '500
> > internal server error'
>
> > On Aug 26, 4:48 pm, Kenneth Gonsalves  wrote:
>
> > > On Thu, 2010-08-26 at 16:44 -0700, Joel Klabo wrote:
> > > > also, when I change the virtual host path to: /srv/www/brooski.net
> > > > (instead of /srv/www/brooski.net/brooski/) I get an internal server
> > > > error. Whereas with '/srv/www/brooski.net/brooski/' I get the actual
> > > > django error page
>
> > > the question is that does brooski directory have an __init__.py file in
> > > it. If so, It should not be on the path - only the parent directory
> > > should be in the path.
> > > --
> > > regards
> > > Kenneth Gonsalves

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



mod_wsgi setup issue

2010-08-27 Thread Joel Klabo
All the files are shown here: http://gist.github.com/554724

I don't know what I'm doing wrong but I'm still getting 500

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



mod_wsgi, apache, ubuntu setup question (noob alert)

2010-08-27 Thread Joel Klabo
This is my situation: http://gist.github.com/554724

I am getting 500 internal server error, don't know what's up...

I would appreciate any info, I'm a total apache noob.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: mod_wsgi, apache, ubuntu setup question (noob alert)

2010-08-27 Thread Joel Klabo
problem solved for the time being, I needed to add quotes around the
'settings'

On Aug 27, 10:08 pm, Joel Klabo  wrote:
> This is my situation:http://gist.github.com/554724
>
> I am getting 500 internal server error, don't know what's up...
>
> I would appreciate any info, I'm a total apache noob.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Saving a location with a model

2010-08-30 Thread Joel Klabo
I want to tie a location to each instance of a model. I am planning on
getting the lat/long. from navigator.geolocation through javascript.
My original idea is to have a location model with fields, latitude,
longitude, and the id of whatever model it is linked to. Is that the
way to go? Anyone have experience with 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-us...@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: Saving a location with a model

2010-08-30 Thread Joel Klabo
looks cool. Any problems with just adding lattitude and longitute
float fields?

On Aug 30, 3:38 pm, Mikhail Korobov  wrote:
> You may find this useful:http://bitbucket.org/barttc/django-generic-location
>
> On 31 авг, 04:05, Joel Klabo  wrote:
>
>
>
> > I want to tie a location to each instance of a model. I am planning on
> > getting the lat/long. from navigator.geolocation through javascript.
> > My original idea is to have a location model with fields, latitude,
> > longitude, and the id of whatever model it is linked to. Is that the
> > way to go? Anyone have experience with 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-us...@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 achievements

2010-09-11 Thread Joel Klabo
Does anyone know of an example of someone using django signals to do
achievements for a website? similar to foursquare or something like
that? I am going to attempt it and i don't really know where to start.
I would love some example or a nudge in the right direction.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: django achievements

2010-09-12 Thread Joel Klabo
that looks perfect, thanks.

On Sep 11, 12:44 pm, "nick.l...@gmail.com" 
wrote:
> Not sure if this will help ya...but the guys at Eldarion have brabeion for
> doing badges (awards).http://github.com/eldarion/brabeion
>
> That's all I got right now!
>
> n
>
>
>
>
>
> On Sat, Sep 11, 2010 at 12:26 PM, Joel Klabo  wrote:
> > Does anyone know of an example of someone using django signals to do
> > achievements for a website? similar to foursquare or something like
> > that? I am going to attempt it and i don't really know where to start.
> > I would love some example or a nudge in the right direction.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com > groups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/django-users?hl=en.
>
> --
> Guadajuko! Vamos a correr!
>  -"Cool! we are going to run!"

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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.



Signals problem

2010-09-22 Thread Joel Klabo
I keep getting this import error and I can't figure out why? Any ideas
would be greatly appreciated: http://dpaste.org/BgtI/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Signals problem

2010-09-22 Thread Joel Klabo
Update:
http://dpaste.org/kK5p/

On Sep 22, 11:41 pm, Joel Klabo  wrote:
> I keep getting this import error and I can't figure out why? Any ideas
> would be greatly appreciated:http://dpaste.org/BgtI/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Signals problem

2010-09-23 Thread Joel Klabo
Thanks for the help, all working now!

On Sep 22, 11:52 pm, Russell Keith-Magee 
wrote:
> On Thu, Sep 23, 2010 at 2:41 PM, Joel Klabo  wrote:
> > I keep getting this import error and I can't figure out why? Any ideas
> > would be greatly appreciated:http://dpaste.org/BgtI/
>
> It's a circular import problem. signals.py imports objects from
> models.py, and models.py imports objects from signals.py. Python can't
> handle circular imports -- hence, the import error.
>
> To fix this, you either need to:
>
>  * Put everything in models.py
>  * Refactor signals.py so that it doesn't need to import models.py at
> the global level.
>
> The second approach can be handled in two ways -- either make the
> import internal to the 'drink_activity' method:
>
> def drink_activity(sender, **kwargs):
>     from models import Activity
>     
>
> or use Django's dynamic model loading to determine the model at runtime:
>
> from django.db.models import get_model
>
> def drink_activity(sender, **kwargs):
>     Activity = get_model('myapp','Activity)
>     ...
>
> Django 1.3 will probably introduce a third option -- a reliable place
> to register signals. We need this for completely separate reasons, but
> providing a safe home for signal registration will be a happy
> consequence.
>
> 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-us...@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.



Image Upload question

2010-09-23 Thread Joel Klabo
I have a form trying to upload an image. In the docs it says that the
form must be bound to save a file. This is an issue for me because I
wan't to save the file with other data such as the User object that
saved it. I can't put a User object in a form so I put the username in
a hidden form field which allows me to find the user in the view and
use it. But, I can't bind the form with data not from POST right? I
need to do request.FILES, in combination with data not coming from
post. I'm obviously confused I would appreciate some guidance here

Here's the code: http://gist.github.com/594136

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Image Upload question

2010-09-23 Thread Joel Klabo
Thanks, upload is now working. But, only for smallish .png files, what
are the constraints on file type and size django sets? I can't find
the information anywhere? Beyond that, can I set them myself?

On Sep 23, 1:41 pm, Peter Bengtsson  wrote:
> By being bound it means that you will have run the .is_valid() method
> of the form instance once you've instanciated it with your POST and
> FILES data.
> E.g.
> form = BrewImageFrom(data=request.POST, files=request.FILES)
> if form.is_valid():
>     brewimage = form.save()
>
> On Sep 23, 3:00 pm, Joel Klabo  wrote:
>
>
>
> > I have a form trying to upload an image. In the docs it says that the
> > form must be bound to save a file. This is an issue for me because I
> > wan't to save the file with other data such as the User object that
> > saved it. I can't put a User object in a form so I put the username in
> > a hidden form field which allows me to find the user in the view and
> > use it. But, I can't bind the form with data not from POST right? I
> > need to do request.FILES, in combination with data not coming from
> > post. I'm obviously confused I would appreciate some guidance here
>
> > Here's the code:http://gist.github.com/594136

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Image Upload question

2010-09-23 Thread Joel Klabo
from the django docs:

inherits all attributes and methods from FileField, but also validates
that the uploaded object is a VALID IMAGE.

what does valid image mean?

On Sep 23, 2:40 pm, Joel Klabo  wrote:
> Thanks, upload is now working. But, only for smallish .png files, what
> are the constraints on file type and size django sets? I can't find
> the information anywhere? Beyond that, can I set them myself?
>
> On Sep 23, 1:41 pm, Peter Bengtsson  wrote:
>
>
>
> > By being bound it means that you will have run the .is_valid() method
> > of the form instance once you've instanciated it with your POST and
> > FILES data.
> > E.g.
> > form = BrewImageFrom(data=request.POST, files=request.FILES)
> > if form.is_valid():
> >     brewimage = form.save()
>
> > On Sep 23, 3:00 pm, Joel Klabo  wrote:
>
> > > I have a form trying to upload an image. In the docs it says that the
> > > form must be bound to save a file. This is an issue for me because I
> > > wan't to save the file with other data such as the User object that
> > > saved it. I can't put a User object in a form so I put the username in
> > > a hidden form field which allows me to find the user in the view and
> > > use it. But, I can't bind the form with data not from POST right? I
> > > need to do request.FILES, in combination with data not coming from
> > > post. I'm obviously confused I would appreciate some guidance here
>
> > > Here's the code:http://gist.github.com/594136

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Image Upload question

2010-09-23 Thread Joel Klabo
The problem was no PIL and libjpeg...

On Sep 23, 2:43 pm, Joel Klabo  wrote:
> from the django docs:
>
> inherits all attributes and methods from FileField, but also validates
> that the uploaded object is a VALID IMAGE.
>
> what does valid image mean?
>
> On Sep 23, 2:40 pm, Joel Klabo  wrote:
>
>
>
> > Thanks, upload is now working. But, only for smallish .png files, what
> > are the constraints on file type and size django sets? I can't find
> > the information anywhere? Beyond that, can I set them myself?
>
> > On Sep 23, 1:41 pm, Peter Bengtsson  wrote:
>
> > > By being bound it means that you will have run the .is_valid() method
> > > of the form instance once you've instanciated it with your POST and
> > > FILES data.
> > > E.g.
> > > form = BrewImageFrom(data=request.POST, files=request.FILES)
> > > if form.is_valid():
> > >     brewimage = form.save()
>
> > > On Sep 23, 3:00 pm, Joel Klabo  wrote:
>
> > > > I have a form trying to upload an image. In the docs it says that the
> > > > form must be bound to save a file. This is an issue for me because I
> > > > wan't to save the file with other data such as the User object that
> > > > saved it. I can't put a User object in a form so I put the username in
> > > > a hidden form field which allows me to find the user in the view and
> > > > use it. But, I can't bind the form with data not from POST right? I
> > > > need to do request.FILES, in combination with data not coming from
> > > > post. I'm obviously confused I would appreciate some guidance here
>
> > > > Here's the code:http://gist.github.com/594136

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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 Registration password reset problem

2010-10-05 Thread Joel Klabo
This is the error and location of the problem: http://gist.github.com/612210,
I can't see what it's looking for. It seems like I could hard code the
arguments it wants into the reverse() but that doesn't seem like the
correct way to do it. Any advice?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Django Registration password reset problem

2010-10-05 Thread Joel Klabo
Need to bump this, sorry. I don't get it.

On Oct 5, 1:04 pm, Joel Klabo  wrote:
> This is the error and location of the problem:http://gist.github.com/612210,
> I can't see what it's looking for. It seems like I could hard code the
> arguments it wants into the reverse() but that doesn't seem like the
> correct way to do it. Any advice?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Django Registration password reset problem

2010-10-05 Thread Joel Klabo
Ok, so I'm pretty sure this has to do with the fact that the
post_reset_redirect argument defaults to the
django.contrib.auth.views.password_reset_done if no
post_reset_redirect is passed to the view. I am using django-
registration and it seems like there would be a better way to deal
with this... There is something I'm missing. If anyone has used this
and gotten it to work I would be grateful to hear about it. All the
other parts of the registration system work which makes me think this
has something to do with the fact that it is reverting back to the
django.contrib views and now using the ones that come with django-
registration... Here is the view where the error first pops up, this
is where post_reset_redirect is as well: http://dpaste.org/gatU/

Thanks for your time



On Oct 5, 1:56 pm, Steve Holden  wrote:
> On 10/5/2010 4:45 PM, Joel Klabo wrote:> Need to bump this, sorry. I don't 
> get it.
>
> > On Oct 5, 1:04 pm, Joel Klabo  wrote:
> >> This is the error and location of the 
> >> problem:http://gist.github.com/612210,
> >> I can't see what it's looking for. It seems like I could hard code the
> >> arguments it wants into the reverse() but that doesn't seem like the
> >> correct way to do it. Any advice?
>
> I can quite see how 41 minutes would appear to be an infinity to someone
> who is wanting the answer to a problem. Please remember, though, that
> people who post on this list aren't paid to do so, and mostly have
> full-time jobs.
>
> So a little patience will make it more likely people will help you.
>
> regards
>  Steve
> --
> DjangoCon US 2010 September 7-9http://djangocon.us/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Django Registration password reset problem

2010-10-06 Thread Joel Klabo
So now I am redirecting to the named url in the URL conf. That is now
giving me the error: The included urlconf registration.auth_urls
doesn't have any patterns in it ... http://dpaste.org/OOw5/ any ideas
would be greatly appreciated

On Oct 5, 5:56 pm, Joel Klabo  wrote:
> Ok, so I'm pretty sure this has to do with the fact that the
> post_reset_redirect argument defaults to the
> django.contrib.auth.views.password_reset_done if no
> post_reset_redirect is passed to the view. I am using django-
> registration and it seems like there would be a better way to deal
> with this... There is something I'm missing. If anyone has used this
> and gotten it to work I would be grateful to hear about it. All the
> other parts of the registration system work which makes me think this
> has something to do with the fact that it is reverting back to the
> django.contrib views and now using the ones that come with django-
> registration... Here is the view where the error first pops up, this
> is where post_reset_redirect is as well:http://dpaste.org/gatU/
>
> Thanks for your time
>
> On Oct 5, 1:56 pm, Steve Holden  wrote:
>
>
>
> > On 10/5/2010 4:45 PM,JoelKlabowrote:> Need to bump this, sorry. I don't get 
> > it.
>
> > > On Oct 5, 1:04 pm,JoelKlabo wrote:
> > >> This is the error and location of the 
> > >> problem:http://gist.github.com/612210,
> > >> I can't see what it's looking for. It seems like I could hard code the
> > >> arguments it wants into the reverse() but that doesn't seem like the
> > >> correct way to do it. Any advice?
>
> > I can quite see how 41 minutes would appear to be an infinity to someone
> > who is wanting the answer to a problem. Please remember, though, that
> > people who post on this list aren't paid to do so, and mostly have
> > full-time jobs.
>
> > So a little patience will make it more likely people will help you.
>
> > regards
> >  Steve
> > --
> > DjangoCon US 2010 September 7-9http://djangocon.us/

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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: Django Registration password reset problem

2010-10-06 Thread Joel Klabo
Thanks for checking it out, this is the way it's set up: http://dpaste.org/e6Ra/

it looks like it's using registration.auth_urls to direct to the
django.contrib.auth.urls ? I don't understand why
registration.auth_urls would exist...

On Oct 6, 6:32 pm, Ian Lewis  wrote:
> I just took a cursory look at this but did you make sure to add
> something like the following to your urlpatterns in urls.py?
>
> urlpatterns=patterns('',
>     ...
>     (r'^accounts/', include('django.contrib.auth.urls')),
>     ...
> )
>
>
>
>
>
> On Thu, Oct 7, 2010 at 1:29 AM, Joel Klabo  wrote:
> > So now I am redirecting to the named url in the URL conf. That is now
> > giving me the error: The included urlconf registration.auth_urls
> > doesn't have any patterns in it ...http://dpaste.org/OOw5/any ideas
> > would be greatly appreciated
>
> > On Oct 5, 5:56 pm, Joel Klabo  wrote:
> >> Ok, so I'm pretty sure this has to do with the fact that the
> >> post_reset_redirect argument defaults to the
> >> django.contrib.auth.views.password_reset_done if no
> >> post_reset_redirect is passed to the view. I am using django-
> >> registration and it seems like there would be a better way to deal
> >> with this... There is something I'm missing. If anyone has used this
> >> and gotten it to work I would be grateful to hear about it. All the
> >> other parts of the registration system work which makes me think this
> >> has something to do with the fact that it is reverting back to the
> >> django.contrib views and now using the ones that come with django-
> >> registration... Here is the view where the error first pops up, this
> >> is where post_reset_redirect is as well:http://dpaste.org/gatU/
>
> >> Thanks for your time
>
> >> On Oct 5, 1:56 pm, Steve Holden  wrote:
>
> >> > On 10/5/2010 4:45 PM,JoelKlabowrote:> Need to bump this, sorry. I don't 
> >> > get it.
>
> >> > > On Oct 5, 1:04 pm,JoelKlabo wrote:
> >> > >> This is the error and location of the 
> >> > >> problem:http://gist.github.com/612210,
> >> > >> I can't see what it's looking for. It seems like I could hard code the
> >> > >> arguments it wants into the reverse() but that doesn't seem like the
> >> > >> correct way to do it. Any advice?
>
> >> > I can quite see how 41 minutes would appear to be an infinity to someone
> >> > who is wanting the answer to a problem. Please remember, though, that
> >> > people who post on this list aren't paid to do so, and mostly have
> >> > full-time jobs.
>
> >> > So a little patience will make it more likely people will help you.
>
> >> > regards
> >> >  Steve
> >> > --
> >> > DjangoCon US 2010 September 7-9http://djangocon.us/
>
> > --
> > You received this message because you are subscribed to the Google Groups 
> > "Django users" group.
> > To post to this group, send email to django-us...@googlegroups.com.
> > To unsubscribe from this group, send email to 
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group 
> > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> Ian
>
> http://www.ianlewis.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-us...@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: Django Registration password reset problem

2010-10-07 Thread Joel Klabo
My version is: VERSION = (0, 8, 0, 'alpha', 1)

Yeah, I have that include in my version as well...

It sends and email with this link:
http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d29e5f24e/

<http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d29e5f24e/>and
then when I click the link I get this error: http://dpaste.org/vrLp/



On Thu, Oct 7, 2010 at 5:48 AM, Felipe Prenholato wrote:

> Actually auth urls is 'appended' to urls in default backend (and should be
> added to your own backend if you create one).
>
> Take a look at this line: http://1l.to/bf1/ ... so you don't need to add
> it (again) to your urls.
>
> I don't have this error with password_reset_complete view , but I'm using
> my clone of original repo with some useful patches (additions). What is
> version that you are using?
>
> 2010/10/7 Joel Klabo 
>
>> Thanks for checking it out, this is the way it's set up:
>> http://dpaste.org/e6Ra/
>>
>> it looks like it's using registration.auth_urls to direct to the
>> django.contrib.auth.urls ? I don't understand why
>> registration.auth_urls would exist...
>>
>> On Oct 6, 6:32 pm, Ian Lewis  wrote:
>> > I just took a cursory look at this but did you make sure to add
>> > something like the following to your urlpatterns in urls.py?
>> >
>> > urlpatterns=patterns('',
>> > ...
>> > (r'^accounts/', include('django.contrib.auth.urls')),
>> > ...
>> > )
>> >
>> >
>> >
>> >
>> >
>> > On Thu, Oct 7, 2010 at 1:29 AM, Joel Klabo  wrote:
>> > > So now I am redirecting to the named url in the URL conf. That is now
>> > > giving me the error: The included urlconf registration.auth_urls
>> > > doesn't have any patterns in it ...http://dpaste.org/OOw5/any ideas
>> > > would be greatly appreciated
>> >
>> > > On Oct 5, 5:56 pm, Joel Klabo  wrote:
>> > >> Ok, so I'm pretty sure this has to do with the fact that the
>> > >> post_reset_redirect argument defaults to the
>> > >> django.contrib.auth.views.password_reset_done if no
>> > >> post_reset_redirect is passed to the view. I am using django-
>> > >> registration and it seems like there would be a better way to deal
>> > >> with this... There is something I'm missing. If anyone has used this
>> > >> and gotten it to work I would be grateful to hear about it. All the
>> > >> other parts of the registration system work which makes me think this
>> > >> has something to do with the fact that it is reverting back to the
>> > >> django.contrib views and now using the ones that come with django-
>> > >> registration... Here is the view where the error first pops up, this
>> > >> is where post_reset_redirect is as well:http://dpaste.org/gatU/
>> >
>> > >> Thanks for your time
>> >
>> > >> On Oct 5, 1:56 pm, Steve Holden  wrote:
>> >
>> > >> > On 10/5/2010 4:45 PM,JoelKlabowrote:> Need to bump this, sorry. I
>> don't get it.
>>
>> >
>> > >> > > On Oct 5, 1:04 pm,JoelKlabo wrote:
>> > >> > >> This is the error and location of the problem:
>> http://gist.github.com/612210,
>> > >> > >> I can't see what it's looking for. It seems like I could hard
>> code the
>> > >> > >> arguments it wants into the reverse() but that doesn't seem like
>> the
>> > >> > >> correct way to do it. Any advice?
>> >
>> > >> > I can quite see how 41 minutes would appear to be an infinity to
>> someone
>> > >> > who is wanting the answer to a problem. Please remember, though,
>> that
>> > >> > people who post on this list aren't paid to do so, and mostly have
>> > >> > full-time jobs.
>> >
>> > >> > So a little patience will make it more likely people will help you.
>> >
>> > >> > regards
>> > >> >  Steve
>> > >> > --
>> > >> > DjangoCon US 2010 September 7-9http://djangocon.us/
>> >
>> > > --
>> > > You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> > > To post to this group, send email to django-us...@googlegroups.com.
>> > 

Re: Django Registration password reset problem

2010-10-07 Thread Joel Klabo
Also, all my code is on Github if you would like to see something else:
http://github.com/joelklabo/brooski

I really appreciate your help, thank you.

On Thu, Oct 7, 2010 at 9:43 AM, Joel Klabo  wrote:

> My version is: VERSION = (0, 8, 0, 'alpha', 1)
>
> Yeah, I have that include in my version as well...
>
> It sends and email with this link:
> http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d29e5f24e/
>
>
> <http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d29e5f24e/>and
> then when I click the link I get this error: http://dpaste.org/vrLp/
>
>
>
> On Thu, Oct 7, 2010 at 5:48 AM, Felipe Prenholato wrote:
>
>> Actually auth urls is 'appended' to urls in default backend (and should be
>> added to your own backend if you create one).
>>
>> Take a look at this line: http://1l.to/bf1/ ... so you don't need to add
>> it (again) to your urls.
>>
>> I don't have this error with password_reset_complete view , but I'm using
>> my clone of original repo with some useful patches (additions). What is
>> version that you are using?
>>
>> 2010/10/7 Joel Klabo 
>>
>>> Thanks for checking it out, this is the way it's set up:
>>> http://dpaste.org/e6Ra/
>>>
>>> it looks like it's using registration.auth_urls to direct to the
>>> django.contrib.auth.urls ? I don't understand why
>>> registration.auth_urls would exist...
>>>
>>> On Oct 6, 6:32 pm, Ian Lewis  wrote:
>>> > I just took a cursory look at this but did you make sure to add
>>> > something like the following to your urlpatterns in urls.py?
>>> >
>>> > urlpatterns=patterns('',
>>> > ...
>>> > (r'^accounts/', include('django.contrib.auth.urls')),
>>> > ...
>>> > )
>>> >
>>> >
>>> >
>>> >
>>> >
>>> > On Thu, Oct 7, 2010 at 1:29 AM, Joel Klabo 
>>> wrote:
>>> > > So now I am redirecting to the named url in the URL conf. That is now
>>> > > giving me the error: The included urlconf registration.auth_urls
>>> > > doesn't have any patterns in it ...http://dpaste.org/OOw5/any ideas
>>> > > would be greatly appreciated
>>> >
>>> > > On Oct 5, 5:56 pm, Joel Klabo  wrote:
>>> > >> Ok, so I'm pretty sure this has to do with the fact that the
>>> > >> post_reset_redirect argument defaults to the
>>> > >> django.contrib.auth.views.password_reset_done if no
>>> > >> post_reset_redirect is passed to the view. I am using django-
>>> > >> registration and it seems like there would be a better way to deal
>>> > >> with this... There is something I'm missing. If anyone has used this
>>> > >> and gotten it to work I would be grateful to hear about it. All the
>>> > >> other parts of the registration system work which makes me think
>>> this
>>> > >> has something to do with the fact that it is reverting back to the
>>> > >> django.contrib views and now using the ones that come with django-
>>> > >> registration... Here is the view where the error first pops up, this
>>> > >> is where post_reset_redirect is as well:http://dpaste.org/gatU/
>>> >
>>> > >> Thanks for your time
>>> >
>>> > >> On Oct 5, 1:56 pm, Steve Holden  wrote:
>>> >
>>> > >> > On 10/5/2010 4:45 PM,JoelKlabowrote:> Need to bump this, sorry. I
>>> don't get it.
>>>
>>> >
>>> > >> > > On Oct 5, 1:04 pm,JoelKlabo wrote:
>>> > >> > >> This is the error and location of the problem:
>>> http://gist.github.com/612210,
>>> > >> > >> I can't see what it's looking for. It seems like I could hard
>>> code the
>>> > >> > >> arguments it wants into the reverse() but that doesn't seem
>>> like the
>>> > >> > >> correct way to do it. Any advice?
>>> >
>>> > >> > I can quite see how 41 minutes would appear to be an infinity to
>>> someone
>>> > >> > who is wanting the answer to a problem. Please remember, though,
>>> that
>>> > >> > people who post on this list aren't paid to do so, and mostly have
>>> > >

Re: Django Registration password reset problem

2010-10-07 Thread Joel Klabo
I am just using it as is. I haven't modified any of the code from
django-registration. I'm confused as to how these are connected. Thanks for
looking.

On Thu, Oct 7, 2010 at 10:20 AM, Felipe Prenholato wrote:

> This auth_views.py doesn't exist in trunk (that is this version), sounds
> like you writing custom admin views? Or you just copied admin/views.py
> locally?
>
> You already tried to resolve via name of url?
> Else, if you writing custom admin views, isn't right to reference this
> custom views?
>
> (anyway, tonight I'll check the code)
>
> 2010/10/7 Joel Klabo 
>
>> Also, all my code is on Github if you would like to see something else:
>> http://github.com/joelklabo/brooski
>>
>> I really appreciate your help, thank you.
>>
>> On Thu, Oct 7, 2010 at 9:43 AM, Joel Klabo  wrote:
>>
>>> My version is: VERSION = (0, 8, 0, 'alpha', 1)
>>>
>>> Yeah, I have that include in my version as well...
>>>
>>> It sends and email with this link:
>>> http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d29e5f24e/
>>>
>>>
>>> <http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d29e5f24e/>and
>>> then when I click the link I get this error: http://dpaste.org/vrLp/
>>>
>>>
>>>
>>> On Thu, Oct 7, 2010 at 5:48 AM, Felipe Prenholato 
>>> wrote:
>>>
>>>> Actually auth urls is 'appended' to urls in default backend (and should
>>>> be added to your own backend if you create one).
>>>>
>>>> Take a look at this line: http://1l.to/bf1/ ... so you don't need to
>>>> add it (again) to your urls.
>>>>
>>>> I don't have this error with password_reset_complete view , but I'm
>>>> using my clone of original repo with some useful patches (additions). What
>>>> is version that you are using?
>>>>
>>>> 2010/10/7 Joel Klabo 
>>>>
>>>>> Thanks for checking it out, this is the way it's set up:
>>>>> http://dpaste.org/e6Ra/
>>>>>
>>>>> it looks like it's using registration.auth_urls to direct to the
>>>>> django.contrib.auth.urls ? I don't understand why
>>>>> registration.auth_urls would exist...
>>>>>
>>>>> On Oct 6, 6:32 pm, Ian Lewis  wrote:
>>>>> > I just took a cursory look at this but did you make sure to add
>>>>> > something like the following to your urlpatterns in urls.py?
>>>>> >
>>>>> > urlpatterns=patterns('',
>>>>> > ...
>>>>> > (r'^accounts/', include('django.contrib.auth.urls')),
>>>>> > ...
>>>>> > )
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> >
>>>>> > On Thu, Oct 7, 2010 at 1:29 AM, Joel Klabo 
>>>>> wrote:
>>>>> > > So now I am redirecting to the named url in the URL conf. That is
>>>>> now
>>>>> > > giving me the error: The included urlconf registration.auth_urls
>>>>> > > doesn't have any patterns in it ...http://dpaste.org/OOw5/anyideas
>>>>> > > would be greatly appreciated
>>>>> >
>>>>> > > On Oct 5, 5:56 pm, Joel Klabo  wrote:
>>>>> > >> Ok, so I'm pretty sure this has to do with the fact that the
>>>>> > >> post_reset_redirect argument defaults to the
>>>>> > >> django.contrib.auth.views.password_reset_done if no
>>>>> > >> post_reset_redirect is passed to the view. I am using django-
>>>>> > >> registration and it seems like there would be a better way to deal
>>>>> > >> with this... There is something I'm missing. If anyone has used
>>>>> this
>>>>> > >> and gotten it to work I would be grateful to hear about it. All
>>>>> the
>>>>> > >> other parts of the registration system work which makes me think
>>>>> this
>>>>> > >> has something to do with the fact that it is reverting back to the
>>>>> > >> django.contrib views and now using the ones that come with django-
>>>>> > >> registration... Here is the view where the error first pops up,
>>>>> thi

Re: Django Registration password reset problem

2010-10-07 Thread Joel Klabo
Awesome, that fixed it. All I had to do was change "from registration import
auth_views" to "from django.contrib.auth import views as auth_views"

Thank you so much


On Thu, Oct 7, 2010 at 12:56 PM, Ted  wrote:

> I think your problem is in auth_urls.py
>
> 28 - from registration import auth_views
>
> in my version of registration this is:
> from django.contrib.auth import views as auth_views
>
>
> Then you can understand why you get this error:
> NoReverseMatch: Reverse for
> 'django.contrib.auth.views.password_reset_complete' with arguments
> '()' and keyword arguments '{}' not found.
>
> Because, you aren't mapping a URL to
> django.contrib.auth.views.password_reset_complete.  You are mapping a
> URL to registration.auth_views.password_reset_complete.  Django
> doesn't know that registration.auth_views.password_reset_complete is
> where you handle django.contrib.auth.views.password_reset_complete.
>
> You have two ways out of this:
>
> 1) don't use your local copy of auth_views, switch back to the
> imported version.
>
> 2) In auth_views.py update:
> 110 - post_reset_redirect =
> reverse('django.contrib.auth.views.password_reset_done')
> 144 -  post_reset_redirect =
> reverse('django.contrib.auth.views.password_reset_complete')
> 177 - post_change_redirect =
> reverse('django.contrib.auth.views.password_change_done')
>
> to
> 110 - post_reset_redirect =
> reverse('registration.auth_views.password_reset_done')
> 144 -  post_reset_redirect =
> reverse('registration.auth_views.password_reset_complete')
> 177 - post_change_redirect =
> reverse('registration.auth_views.password_change_done')
>
> It also bears mentioning that name spacing registration can cause a
> similar set of errors.
>
> Let me know if that worked,
> Ted
>
> On Oct 7, 10:59 am, Joel Klabo  wrote:
> > I am just using it as is. I haven't modified any of the code from
> > django-registration. I'm confused as to how these are connected. Thanks
> for
> > looking.
> >
> > On Thu, Oct 7, 2010 at 10:20 AM, Felipe Prenholato  >wrote:
> >
> >
> >
> > > This auth_views.py doesn't exist in trunk (that is this version),
> sounds
> > > like you writing custom admin views? Or you just copied admin/views.py
> > > locally?
> >
> > > You already tried to resolve via name of url?
> > > Else, if you writing custom admin views, isn't right to reference this
> > > custom views?
> >
> > > (anyway, tonight I'll check the code)
> >
> > > 2010/10/7 Joel Klabo 
> >
> > >> Also, all my code is on Github if you would like to see something
> else:
> > >>http://github.com/joelklabo/brooski
> >
> > >> I really appreciate your help, thank you.
> >
> > >> On Thu, Oct 7, 2010 at 9:43 AM, Joel Klabo 
> wrote:
> >
> > >>> My version is: VERSION = (0, 8, 0, 'alpha', 1)
> >
> > >>> Yeah, I have that include in my version as well...
> >
> > >>> It sends and email with this link:
> > >>>
> http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d...
> >
> > >>> <
> http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d..
> .>and
> > >>> then when I click the link I get this error:http://dpaste.org/vrLp/
> >
> > >>> On Thu, Oct 7, 2010 at 5:48 AM, Felipe Prenholato <
> philipe...@gmail.com>wrote:
> >
> > >>>> Actually auth urls is 'appended' to urls in default backend (and
> should
> > >>>> be added to your own backend if you create one).
> >
> > >>>> Take a look at this line:http://1l.to/bf1/... so you don't need to
> > >>>> add it (again) to your urls.
> >
> > >>>> I don't have this error with password_reset_complete view , but I'm
> > >>>> using my clone of original repo with some useful patches
> (additions). What
> > >>>> is version that you are using?
> >
> > >>>> 2010/10/7 Joel Klabo 
> >
> > >>>>> Thanks for checking it out, this is the way it's set up:
> > >>>>>http://dpaste.org/e6Ra/
> >
> > >>>>> it looks like it's using registration.auth_urls to direct to the
> > >>>>> django.contrib.auth.urls ? I don't understand 

Re: Django Registration password reset problem

2010-10-07 Thread Joel Klabo
Yeah. I don't understand that either. Except that auth_views.py uses
different templates I think…

Sent from my iPhone

On Oct 7, 2010, at 1:50 PM, Felipe Prenholato  wrote:

But about views that you have at auth_views.py, are same of django auth
views?
this registration/auth_views.py exists for something, not?

2010/10/7 Joel Klabo 

> Awesome, that fixed it. All I had to do was change "from registration
> import auth_views" to "from django.contrib.auth import views as auth_views"
>
> Thank you so much
>
>
> On Thu, Oct 7, 2010 at 12:56 PM, Ted  wrote:
>
>> I think your problem is in auth_urls.py
>>
>> 28 - from registration import auth_views
>>
>> in my version of registration this is:
>> from django.contrib.auth import views as auth_views
>>
>>
>> Then you can understand why you get this error:
>> NoReverseMatch: Reverse for
>> 'django.contrib.auth.views.password_reset_complete' with arguments
>> '()' and keyword arguments '{}' not found.
>>
>> Because, you aren't mapping a URL to
>> django.contrib.auth.views.password_reset_complete.  You are mapping a
>> URL to registration.auth_views.password_reset_complete.  Django
>> doesn't know that registration.auth_views.password_reset_complete is
>> where you handle django.contrib.auth.views.password_reset_complete.
>>
>> You have two ways out of this:
>>
>> 1) don't use your local copy of auth_views, switch back to the
>> imported version.
>>
>> 2) In auth_views.py update:
>> 110 - post_reset_redirect =
>> reverse('django.contrib.auth.views.password_reset_done')
>> 144 -  post_reset_redirect =
>> reverse('django.contrib.auth.views.password_reset_complete')
>> 177 - post_change_redirect =
>> reverse('django.contrib.auth.views.password_change_done')
>>
>> to
>> 110 - post_reset_redirect =
>> reverse('registration.auth_views.password_reset_done')
>> 144 -  post_reset_redirect =
>> reverse('registration.auth_views.password_reset_complete')
>> 177 - post_change_redirect =
>> reverse('registration.auth_views.password_change_done')
>>
>> It also bears mentioning that name spacing registration can cause a
>> similar set of errors.
>>
>> Let me know if that worked,
>> Ted
>>
>> On Oct 7, 10:59 am, Joel Klabo  wrote:
>> > I am just using it as is. I haven't modified any of the code from
>> > django-registration. I'm confused as to how these are connected. Thanks
>> for
>> > looking.
>> >
>> > On Thu, Oct 7, 2010 at 10:20 AM, Felipe Prenholato <
>> philipe...@gmail.com>wrote:
>> >
>> >
>> >
>> > > This auth_views.py doesn't exist in trunk (that is this version),
>> sounds
>> > > like you writing custom admin views? Or you just copied admin/views.py
>> > > locally?
>> >
>> > > You already tried to resolve via name of url?
>> > > Else, if you writing custom admin views, isn't right to reference this
>> > > custom views?
>> >
>> > > (anyway, tonight I'll check the code)
>> >
>> > > 2010/10/7 Joel Klabo 
>> >
>> > >> Also, all my code is on Github if you would like to see something
>> else:
>> > >>http://github.com/joelklabo/brooski
>> >
>> > >> I really appreciate your help, thank you.
>> >
>> > >> On Thu, Oct 7, 2010 at 9:43 AM, Joel Klabo 
>> wrote:
>> >
>> > >>> My version is: VERSION = (0, 8, 0, 'alpha', 1)
>> >
>> > >>> Yeah, I have that include in my version as well...
>> >
>> > >>> It sends and email with this link:
>> > >>>
>> http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d...
>> >
>> > >>> <
>> http://brooski.net/accounts/password/reset/confirm/1-2r2-ce8f57c2669d..
>> .>and
>> > >>> then when I click the link I get this error:http://dpaste.org/vrLp/
>> >
>> > >>> On Thu, Oct 7, 2010 at 5:48 AM, Felipe Prenholato <
>> philipe...@gmail.com>wrote:
>> >
>> > >>>> Actually auth urls is 'appended' to urls in default backend (and
>> should
>> > >>>> be added to your own backend if you create one).
>> >
>> > >>>> Take a look at this line:http://1l.to/bf1/... so you don't