Re: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread Anoop Thomas Mathew
Hi goutam,

1. You should not attach files in here. Bad practice. Just post it somewhere
like dpaste.de or pastebin.ca

Now,

You just try renaming your homepage_about to about. _ are usually taken
instead of . .And change correspondingly everywhere. It should work.

regards,
atm
___
Life is short, Live it hard




On 6 April 2011 19:11, GOUTAM KUMAR RANA  wrote:

> Oops Sorry , Its _  i was just trying by changing _ to -  .  At the time of
> - I had taken the screen shot . At _ and _ the same error is shown. plesae
> help.
>
> --
> 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: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread GOUTAM KUMAR RANA
Oops Sorry , Its _  i was just trying by changing _ to -  .  At the time of 
- I had taken the screen shot . At _ and _ the same error is shown. plesae 
help.

-- 
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: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread Casey Greene
- and _ are different characters.  The screenshot shows - while your 
posted error message and urls.py have _.


Casey

On 04/06/2011 09:29 AM, GOUTAM KUMAR RANA wrote:


--
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: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread GOUTAM KUMAR RANA
can u please help me in a small inventory project.

-- 
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: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread GOUTAM KUMAR RANA
here  are the files please  

-- 
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.

<<< text/html; charset=us-ascii; name=index.html: Unrecognized >>>
from django.conf.urls.defaults import *

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
(r'^$',include('inventory.apps.homepage.urls')),
	# Examples:

	# url(r'^$', 'inventory.views.home', name='home'),
# url(r'^inventory/', include('inventory.foo.urls')),

# Uncomment the admin/doc line below to enable admin documentation:
# url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
 url(r'^admin/', include(admin.site.urls)),
)
from django.conf.urls.defaults import *

urlpatterns = patterns('inventory.apps.homepage.views',
	url(r'^$', 'index', name="homepage_index"),
	url(r'^about/$', 'about', name="homepage_about"),
	url(r'^contact/$', 'contact', name="homepage_contact"),
	url(r'^archive/$', 'archive', name="homepage_archive"),
)

Re: Caught NoReverseMatch while rendering:

2011-04-06 Thread Gonzalo Delgado

El 05/04/11 17:48, GOUTAM KUMAR RANA escribió:


   7 : home - about - archive - contactcontact


Make sure a url named[0] "homepage_about" exists in one of your active 
urls.py files, and that it takes no arguments.


[0] 
http://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns


--
Gonzalo Delgado

--
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: Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread Anoop Thomas Mathew
Hi Goutam,

Post your urls.py somewhere.
It seems you have not added anything in urls.py to handle homepage_about.
regards,
atm
___
Life is short, Live it hard.




On 6 April 2011 18:26, GOUTAM KUMAR RANA <ranagou...@gmail.com> wrote:

> Environment:
>
>
> Request Method: GET
> Request URL: http://localhost:8000/
>
> Django Version: 1.3
> Python Version: 2.7.1
> Installed Applications:
> ['django.contrib.auth',
>  'django.contrib.contenttypes'
> ,
>  'django.contrib.sessions',
>  'django.contrib.sites',
>  'django.contrib.messages',
>  'django.contrib.staticfiles',
>  'apps.data',
>  'django.contrib.admin',
>  'django.contrib.admindocs']
> Installed Middleware:
> ('django.middleware.common.CommonMiddleware',
>  'django.contrib.sessions.middleware.SessionMiddleware',
>  'django.middleware.csrf.CsrfViewMiddleware',
>  'django.contrib.auth.middleware.AuthenticationMiddleware',
>  'django.contrib.messages.middleware.MessageMiddleware')
>
>
> Template error:
> In template
> d:\djangoproject\p_source_code\inventory\templates\homepage\index.html,
> error at line 7
>Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with
> arguments '()' and keyword arguments '{}' not found.
>1 : {% extends "base.html"%}
>
>
>2 : {% block title %}
>
>
>3 : Index Page
>
>
>4 : {% endblock %}
>
>
>5 :
>
>
>6 : {% block navi %}
>
>
>7 : home - about - archive - contactcontact
>
>
>8 : {% endblock %}
>
>
>9 :
>
>
>10 : {% block content %}
>
>
>11 : Entries:
>
>
>12 : {% for e in entries %}
>
>
>13 :  {{ e.title }}-{{ e.created }} 
>
>
>14 :  {{ e.text }} 
>
>15 : 
>
>
>16 : {% endfor %}
>
>
>17 : {% endblock %}
>
>
> Traceback:
> File "C:\PYTHON27\lib\site-packages\django\core\handlers\base.py" in
> get_response
>   111. response = callback(request, *callback_args,
> **callback_kwargs)
> File
> "D:\DjangoProject\p_source_code\inventory\..\inventory\apps\homepage\views.py"
> in index
>   7. return render_to_response('homepage/index.html',ctx)
> File "C:\PYTHON27\lib\site-packages\django\shortcuts\__init__.py" in
> render_to_response
>   20. return HttpResponse(loader.render_to_string(*args, **kwargs),
> **httpresponse_kwargs)
> File "C:\PYTHON27\lib\site-packages\django\template\loader.py" in
> render_to_string
>   183. return t.render(Context(dictionary))
> File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
>   123. return self._render(context)
> File "C:\PYTHON27\lib\site-packages\django\template\base.py" in _render
>   117. return self.nodelist.render(context)
> File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
>   744. bits.append(self.render_node(node, context))
> File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in
> render_node
>   73. result = node.render(context)
> File "C:\PYTHON27\lib\site-packages\django\template\loader_tags.py" in
> render
>   127. return compiled_parent._render(context)
> File "C:\PYTHON27\lib\site-packages\django\template\base.py" in _render
>   117. return self.nodelist.render(context)
> File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
>   744. bits.append(self.render_node(node, context))
> File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in
> render_node
>   73. result = node.render(context)
> File "C:\PYTHON27\lib\site-packages\django\template\loader_tags.py" in
> render
>   64.     result = block.nodelist.render(context)
> File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
>   744. bits.append(self.render_node(node, context))
> File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in
> render_node
>   73. result = node.render(context)
> File "C:\PYTHON27\lib\site-packages\django\template\defaulttags.py" in
> render
>   450. raise e
>
> Exception Type: TemplateSyntaxError at /
> Exception Value: Caught NoReverseMatch while rendering: Reverse for
> 'homepage_about' with arguments '()' and keyword arguments '{}' not found.
>
> --
> 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.



Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with arguments '()' and keyword arguments '{}' not found.

2011-04-06 Thread GOUTAM KUMAR RANA
Environment:


Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.3
Python Version: 2.7.1
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes'
,
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'apps.data',
 'django.contrib.admin',
 'django.contrib.admindocs']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Template error:
In template 
d:\djangoproject\p_source_code\inventory\templates\homepage\index.html, 
error at line 7
   Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with 
arguments '()' and keyword arguments '{}' not found.
   1 : {% extends "base.html"%}


   2 : {% block title %}


   3 : Index Page


   4 : {% endblock %}


   5 : 


   6 : {% block navi %}


   7 : home - about - archive - contactcontact


   8 : {% endblock %}


   9 : 


   10 : {% block content %}


   11 : Entries:


   12 : {% for e in entries %}


   13 :  {{ e.title }}-{{ e.created }} 


   14 :  {{ e.text }} 


   16 : {% endfor %}


   17 : {% endblock %}


Traceback:
File "C:\PYTHON27\lib\site-packages\django\core\handlers\base.py" in 
get_response
  111. response = callback(request, *callback_args, 
**callback_kwargs)
File 
"D:\DjangoProject\p_source_code\inventory\..\inventory\apps\homepage\views.py" 
in index
  7. return render_to_response('homepage/index.html',ctx)
File "C:\PYTHON27\lib\site-packages\django\shortcuts\__init__.py" in 
render_to_response
  20. return HttpResponse(loader.render_to_string(*args, **kwargs), 
**httpresponse_kwargs)
File "C:\PYTHON27\lib\site-packages\django\template\loader.py" in 
render_to_string
  183. return t.render(Context(dictionary))
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
  123. return self._render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in _render
  117. return self.nodelist.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
  744. bits.append(self.render_node(node, context))
File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in render_node
  73. result = node.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\loader_tags.py" in 
render
  127. return compiled_parent._render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in _render
  117. return self.nodelist.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
  744. bits.append(self.render_node(node, context))
File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in render_node
  73. result = node.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\loader_tags.py" in 
render
  64. result = block.nodelist.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
  744. bits.append(self.render_node(node, context))
File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in render_node
  73. result = node.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\defaulttags.py" in 
render
  450. raise e

Exception Type: TemplateSyntaxError at /
Exception Value: Caught NoReverseMatch while rendering: Reverse for 
'homepage_about' with arguments '()' and keyword arguments '{}' not found.

-- 
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.



Caught NoReverseMatch while rendering:

2011-04-05 Thread GOUTAM KUMAR RANA
Environment:


Request Method: GET
Request URL: http://localhost:8000/

Django Version: 1.3
Python Version: 2.7.1
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'apps.data',
 'django.contrib.admin',
 'django.contrib.admindocs']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Template error:
In template 
d:\djangoproject\p_source_code\inventory\templates\homepage\index.html, 
error at line 7
   Caught NoReverseMatch while rendering: Reverse for 'homepage_about' with 
arguments '()' and keyword arguments '{}' not found.
   1 : {% extends "base.html"%}


   2 : {% block title %}


   3 : Index Page


   4 : {% endblock %}


   5 : 


   6 : {% block navi %}


   7 : home - about - archive - contactcontact


   8 : {% endblock %}


   9 : 


   10 : {% block content %}


   11 : Entries:


   12 : {% for e in entries %}


   13 :  {{ e.title }}-{{ e.created }} 


   14 :  {{ e.text }} 


   16 : {% endfor %}


   17 : {% endblock %}


Traceback:
File "C:\PYTHON27\lib\site-packages\django\core\handlers\base.py" in 
get_response
  111. response = callback(request, *callback_args, 
**callback_kwargs)
File 
"D:\DjangoProject\p_source_code\inventory\..\inventory\apps\homepage\views.py" 
in index
  7. return render_to_response('homepage/index.html',ctx)
File "C:\PYTHON27\lib\site-packages\django\shortcuts\__init__.py" in 
render_to_response
  20. return HttpResponse(loader.render_to_string(*args, **kwargs), 
**httpresponse_kwargs)
File "C:\PYTHON27\lib\site-packages\django\template\loader.py" in 
render_to_string
  183. return t.render(Context(dictionary))
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
  123. return self._render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in _render
  117. return self.nodelist.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
  744. bits.append(self.render_node(node, context))
File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in render_node
  73. result = node.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\loader_tags.py" in 
render
  127. return compiled_parent._render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in _render
  117. return self.nodelist.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
  744. bits.append(self.render_node(node, context))
File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in render_node
  73. result = node.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\loader_tags.py" in 
render
  64. result = block.nodelist.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\base.py" in render
  744. bits.append(self.render_node(node, context))
File "C:\PYTHON27\lib\site-packages\django\template\debug.py" in render_node
  73. result = node.render(context)
File "C:\PYTHON27\lib\site-packages\django\template\defaulttags.py" in 
render
  450. raise e

Exception Type: TemplateSyntaxError at /
Exception Value: Caught NoReverseMatch while rendering: Reverse for 
'homepage_about' with arguments '()' and keyword arguments '{}' not found.

-- 
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: Built in password reset views resulting in Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.password_reset_confirm'

2010-05-31 Thread Mike Dewhirst

On 1/06/2010 6:20am, Cromulent wrote:

Hi Mike,

Thanks for the response. I did think of that. My template loaders
setting is as follows:

TEMPLATE_LOADERS = (
 'django.template.loaders.app_directories.Loader',
 'django.template.loaders.filesystem.Loader',
)

all of my templates are stored in the template directory for each
individual Django application to save on cross dependencies or global
dependencies as I want to maximise the modularity of them. From
reading the docs the app_directories loader is the correct one for
this situation.


I'm not sure this is correct but that is just my own uncertainty because 
I haven't read those docs recently. However I took a different approach 
which probably came from following one of the django books.


# if templates are not found here look in app_name/templates
TEMPLATE_DIRS = (os.path.join(PROJECT_ROOT, 'templates')

My PROJECT_ROOT is the path to settings.py


The problem with the filesystem loader is that you need to specify all
your template paths in the settings file, which is something I was
trying to avoid as the app_directories loader was what I wanted.


As you can see I only specify one templates dir. If I want to use my own 
templates for an imported app (or my own for that matter) I just create 
a sub-directory in TEMPLATE_DIRS and give it the app name. Django just 
knows where to look and uses any template it finds there in preference 
to one of the same name in the installed site-packages app.


Cheers

Mike


I guess the app_directories loader works on the order of apps listed in
the INSTALLED_APPS tuple?


I don't know. You'd need to lok at the gjango source to get that.



On May 31, 2:05 am, Mike Dewhirst  wrote:

Simon

Have considered the sequence in which templates are loaded?

Seehttp://docs.djangoproject.com/en/dev/ref/settings/

If you put the filesystem template loader ahead of the app_directories
django will find your own versions named identically with django
versions and use them instead.

TEMPLATE_LOADERS = (
  'django.template.loaders.filesystem.load_template_source',
  'django.template.loaders.app_directories.load_template_source',
)

hth

Mike

On 30/05/2010 11:49pm, Cromulent wrote:




Well I got it working by changing the names of my templates to
something other than the default value. This seems like a bug to me.
Surely Django should use a provided template if it is available and
only fall back on the built in ones as an absolute last resort?
Especially as I had specified in the dictionary the correct template
name and that they were available.



On May 30, 10:41 am, Cromulentwrote:

I'm using Django 1.2.1 on Mac OS X with Python 2.6.1 if that matters.
I've read the documentation and this is what I have for my urls.py
file:



password_reset_dict = {
  'post_reset_redirect' : '/profiles/login/',
  'email_template_name' : 'registration/password_reset_email.html',
  'template_name' : 'registration/password_reset_form.html',



}



password_reset_confirm_dict = {
  'template_name' : 'registration/password_reset_confirm.html',
  'post_reset_redirect':'/profiles/login/',



}



(r'^reset/$', 'django.contrib.auth.views.password_reset',
password_reset_dict),



(r'^reset/confirm/$',
'django.contrib.auth.views.password_reset_confirm', \
password_reset_confirm_dict),



(r'^reset/done/$', 'django.contrib.auth.views.password_reset_done'),



(r'^reset/complete/$',
'django.contrib.auth.views.password_reset_complete'),



The strange thing is that when the error comes back the generic view
does not seem to be using the templates that I have specified in the
dictionary, instead the error points to the internal
password_reset_email.html template and this line in particular:



{{ protocol }}://{{ domain }}{% url
django.contrib.auth.views.password_reset_confirm uidb36=uid
token=token %}



I've done a fair bit of Googling and tried the various methods
mentioned but the ones that seemed most promising require you to
change the template and as it does not actually get to my template I'm
at a bit of a loss.



Can anyone tell me where I am going wrong with this at all?



Any help is very much appreciated.




--
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: Built in password reset views resulting in Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.password_reset_confirm'

2010-05-31 Thread Cromulent
Hi Mike,

Thanks for the response. I did think of that. My template loaders
setting is as follows:

TEMPLATE_LOADERS = (
'django.template.loaders.app_directories.Loader',
'django.template.loaders.filesystem.Loader',
)

all of my templates are stored in the template directory for each
individual Django application to save on cross dependencies or global
dependencies as I want to maximise the modularity of them. From
reading the docs the app_directories loader is the correct one for
this situation.

The problem with the filesystem loader is that you need to specify all
your template paths in the settings file, which is something I was
trying to avoid as the app_directories loader was what I wanted. I
guess the app_directories loader works on the order of apps listed in
the INSTALLED_APPS tuple?

On May 31, 2:05 am, Mike Dewhirst  wrote:
> Simon
>
> Have considered the sequence in which templates are loaded?
>
> Seehttp://docs.djangoproject.com/en/dev/ref/settings/
>
> If you put the filesystem template loader ahead of the app_directories
> django will find your own versions named identically with django
> versions and use them instead.
>
> TEMPLATE_LOADERS = (
>      'django.template.loaders.filesystem.load_template_source',
>      'django.template.loaders.app_directories.load_template_source',
> )
>
> hth
>
> Mike
>
> On 30/05/2010 11:49pm, Cromulent wrote:
>
>
>
> > Well I got it working by changing the names of my templates to
> > something other than the default value. This seems like a bug to me.
> > Surely Django should use a provided template if it is available and
> > only fall back on the built in ones as an absolute last resort?
> > Especially as I had specified in the dictionary the correct template
> > name and that they were available.
>
> > On May 30, 10:41 am, Cromulent  wrote:
> >> I'm using Django 1.2.1 on Mac OS X with Python 2.6.1 if that matters.
> >> I've read the documentation and this is what I have for my urls.py
> >> file:
>
> >> password_reset_dict = {
> >>      'post_reset_redirect' : '/profiles/login/',
> >>      'email_template_name' : 'registration/password_reset_email.html',
> >>      'template_name' : 'registration/password_reset_form.html',
>
> >> }
>
> >> password_reset_confirm_dict = {
> >>      'template_name' : 'registration/password_reset_confirm.html',
> >>      'post_reset_redirect':'/profiles/login/',
>
> >> }
>
> >> (r'^reset/$', 'django.contrib.auth.views.password_reset',
> >> password_reset_dict),
>
> >> (r'^reset/confirm/$',
> >> 'django.contrib.auth.views.password_reset_confirm', \
> >> password_reset_confirm_dict),
>
> >> (r'^reset/done/$', 'django.contrib.auth.views.password_reset_done'),
>
> >> (r'^reset/complete/$',
> >> 'django.contrib.auth.views.password_reset_complete'),
>
> >> The strange thing is that when the error comes back the generic view
> >> does not seem to be using the templates that I have specified in the
> >> dictionary, instead the error points to the internal
> >> password_reset_email.html template and this line in particular:
>
> >> {{ protocol }}://{{ domain }}{% url
> >> django.contrib.auth.views.password_reset_confirm uidb36=uid
> >> token=token %}
>
> >> I've done a fair bit of Googling and tried the various methods
> >> mentioned but the ones that seemed most promising require you to
> >> change the template and as it does not actually get to my template I'm
> >> at a bit of a loss.
>
> >> Can anyone tell me where I am going wrong with this at all?
>
> >> Any help is very much appreciated.

-- 
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: Built in password reset views resulting in Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.password_reset_confirm'

2010-05-30 Thread Mike Dewhirst

Simon

Have considered the sequence in which templates are loaded?

See http://docs.djangoproject.com/en/dev/ref/settings/

If you put the filesystem template loader ahead of the app_directories 
django will find your own versions named identically with django 
versions and use them instead.


TEMPLATE_LOADERS = (
'django.template.loaders.filesystem.load_template_source',
'django.template.loaders.app_directories.load_template_source',
)

hth

Mike

On 30/05/2010 11:49pm, Cromulent wrote:

Well I got it working by changing the names of my templates to
something other than the default value. This seems like a bug to me.
Surely Django should use a provided template if it is available and
only fall back on the built in ones as an absolute last resort?
Especially as I had specified in the dictionary the correct template
name and that they were available.

On May 30, 10:41 am, Cromulent  wrote:

I'm using Django 1.2.1 on Mac OS X with Python 2.6.1 if that matters.
I've read the documentation and this is what I have for my urls.py
file:

password_reset_dict = {
 'post_reset_redirect' : '/profiles/login/',
 'email_template_name' : 'registration/password_reset_email.html',
 'template_name' : 'registration/password_reset_form.html',

}

password_reset_confirm_dict = {
 'template_name' : 'registration/password_reset_confirm.html',
 'post_reset_redirect':'/profiles/login/',

}

(r'^reset/$', 'django.contrib.auth.views.password_reset',
password_reset_dict),

(r'^reset/confirm/$',
'django.contrib.auth.views.password_reset_confirm', \
password_reset_confirm_dict),

(r'^reset/done/$', 'django.contrib.auth.views.password_reset_done'),

(r'^reset/complete/$',
'django.contrib.auth.views.password_reset_complete'),

The strange thing is that when the error comes back the generic view
does not seem to be using the templates that I have specified in the
dictionary, instead the error points to the internal
password_reset_email.html template and this line in particular:

{{ protocol }}://{{ domain }}{% url
django.contrib.auth.views.password_reset_confirm uidb36=uid
token=token %}

I've done a fair bit of Googling and tried the various methods
mentioned but the ones that seemed most promising require you to
change the template and as it does not actually get to my template I'm
at a bit of a loss.

Can anyone tell me where I am going wrong with this at all?

Any help is very much appreciated.




--
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: Built in password reset views resulting in Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.password_reset_confirm'

2010-05-30 Thread Cromulent
Well I got it working by changing the names of my templates to
something other than the default value. This seems like a bug to me.
Surely Django should use a provided template if it is available and
only fall back on the built in ones as an absolute last resort?
Especially as I had specified in the dictionary the correct template
name and that they were available.

On May 30, 10:41 am, Cromulent  wrote:
> I'm using Django 1.2.1 on Mac OS X with Python 2.6.1 if that matters.
> I've read the documentation and this is what I have for my urls.py
> file:
>
> password_reset_dict = {
>     'post_reset_redirect' : '/profiles/login/',
>     'email_template_name' : 'registration/password_reset_email.html',
>     'template_name' : 'registration/password_reset_form.html',
>
> }
>
> password_reset_confirm_dict = {
>     'template_name' : 'registration/password_reset_confirm.html',
>     'post_reset_redirect':'/profiles/login/',
>
> }
>
> (r'^reset/$', 'django.contrib.auth.views.password_reset',
> password_reset_dict),
>
> (r'^reset/confirm/$',
> 'django.contrib.auth.views.password_reset_confirm', \
> password_reset_confirm_dict),
>
> (r'^reset/done/$', 'django.contrib.auth.views.password_reset_done'),
>
> (r'^reset/complete/$',
> 'django.contrib.auth.views.password_reset_complete'),
>
> The strange thing is that when the error comes back the generic view
> does not seem to be using the templates that I have specified in the
> dictionary, instead the error points to the internal
> password_reset_email.html template and this line in particular:
>
> {{ protocol }}://{{ domain }}{% url
> django.contrib.auth.views.password_reset_confirm uidb36=uid
> token=token %}
>
> I've done a fair bit of Googling and tried the various methods
> mentioned but the ones that seemed most promising require you to
> change the template and as it does not actually get to my template I'm
> at a bit of a loss.
>
> Can anyone tell me where I am going wrong with this at all?
>
> Any help is very much appreciated.

-- 
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.



Built in password reset views resulting in Caught NoReverseMatch while rendering: Reverse for 'django.contrib.auth.views.password_reset_confirm'

2010-05-30 Thread Cromulent
I'm using Django 1.2.1 on Mac OS X with Python 2.6.1 if that matters.
I've read the documentation and this is what I have for my urls.py
file:

password_reset_dict = {
'post_reset_redirect' : '/profiles/login/',
'email_template_name' : 'registration/password_reset_email.html',
'template_name' : 'registration/password_reset_form.html',
}

password_reset_confirm_dict = {
'template_name' : 'registration/password_reset_confirm.html',
'post_reset_redirect':'/profiles/login/',
}

(r'^reset/$', 'django.contrib.auth.views.password_reset',
password_reset_dict),

(r'^reset/confirm/$',
'django.contrib.auth.views.password_reset_confirm', \
password_reset_confirm_dict),

(r'^reset/done/$', 'django.contrib.auth.views.password_reset_done'),

(r'^reset/complete/$',
'django.contrib.auth.views.password_reset_complete'),


The strange thing is that when the error comes back the generic view
does not seem to be using the templates that I have specified in the
dictionary, instead the error points to the internal
password_reset_email.html template and this line in particular:

{{ protocol }}://{{ domain }}{% url
django.contrib.auth.views.password_reset_confirm uidb36=uid
token=token %}

I've done a fair bit of Googling and tried the various methods
mentioned but the ones that seemed most promising require you to
change the template and as it does not actually get to my template I'm
at a bit of a loss.

Can anyone tell me where I am going wrong with this at all?

Any help is very much appreciated.

-- 
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.