Re: No reverse match at /

2021-07-06 Thread Julio Cojom
For what I can see in the issue, you're passing 2 values to the url (id ,
topic)

Maybe the error its for the topic because of the value (/Subject/Django)
try to sanitize the value after store it in the database, because it try to
get the url example.com/3//Subject/Django where 3 its the id or pk and
/Subject/Django its the topic, for the web server it may be confusing. You
can sanitize the value for something like slug field (django slug field docs
). Even
better, I suggest add slug field to the model and leave the topic off the
url.

Regards

El mar, 6 jul 2021 a las 7:12, DJANGO DEVELOPER ()
escribió:

> you have to provide id in your urls and in subject.html as well. share you
> views and url as well.
>
>
> On Tue, Jul 6, 2021 at 6:08 PM Bhanu prasad Ch 
> wrote:
>
>> I had a problem in passing special characters in Charfield in DB of
>> Django.
>> Is that possible to pass special characters in CharField DB?
>> GitHub Issue 
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/b57636e3-35c4-4798-abe3-b6f97576a53fn%40googlegroups.com
>> 
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAKPY9p%3DeBKaDSk8PsnmHXaPAmM9rbPhrvpyc6om85QPV7vXxyg%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHRQUH%3DFea-RkH4xanb%3DL_dVNk3%3DWj44Gfdnb0iXx34c1dWZ4g%40mail.gmail.com.


Re: No reverse match at /

2021-07-06 Thread DJANGO DEVELOPER
you have to provide id in your urls and in subject.html as well. share you
views and url as well.


On Tue, Jul 6, 2021 at 6:08 PM Bhanu prasad Ch  wrote:

> I had a problem in passing special characters in Charfield in DB of Django.
> Is that possible to pass special characters in CharField DB?
> GitHub Issue 
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/b57636e3-35c4-4798-abe3-b6f97576a53fn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAKPY9p%3DeBKaDSk8PsnmHXaPAmM9rbPhrvpyc6om85QPV7vXxyg%40mail.gmail.com.


No reverse match at /

2021-07-06 Thread Bhanu prasad Ch
I had a problem in passing special characters in Charfield in DB of Django.
Is that possible to pass special characters in CharField DB?
GitHub Issue 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b57636e3-35c4-4798-abe3-b6f97576a53fn%40googlegroups.com.


Re: No Reverse Match Error, When creating a new user (new user application) it should direct back to home (to the core application)

2020-04-19 Thread Farai M
You can use Httpresponse(reverse_lazy('appname'))

On Sun, Apr 19, 2020, 6:35 AM Ahmed Khairy 
wrote:

> For this project, I have made 2 applications: Core and Users
>
> Creating a new user is the 2nd application.
> I am trying to direct the new user after registration to 'home'
>
> I keep getting NoReverse Match Error
>
> This is the view.py this is the code:
>
> def register(request):
> if request.method == 'POST':
> form = UserCreationForm(request.POST)
> if form.is_valid():
> form.save()
> username = form.cleaned_data.get('username')
> messages.success(
> request, f'Account created for {username}
> ! Show us your Designs')
> return redirect('home')
> else:
> form = UserCreationForm()
> return render(request, 'register.html', {'form': form})
>
> This is the url.py in the core application:
>
> urlpatterns = [
> path('', HomeView.as_view(), name='home'),
> path('checkout/', checkout, name='checkout'),
> path('product//', ItemDetailView.as_view(), name='product'),
> path('score/', PostListView.as_view(), name='score'),
> path('register/', user_views.register, name='register'),
> ]
>
>
> What do I need to do to fix this issue,
>
> Thank you all in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4584668f-3cf5-40fe-930c-69c75b74b23d%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAMeub5OoTnXuJbkyMwY7B8hxr%3D9MLTqwOHX1Wm7S3u5R%3DuX1tg%40mail.gmail.com.


Re: No Reverse Match Error, When creating a new user (new user application) it should direct back to home (to the core application)

2020-04-19 Thread Jorge Gimeno
I would try to replace return redirect('home') with return
redirect(reverse('home'))

-Jorge

On 4/18/20, Motaz Hejaze  wrote:
> اعمل اسم الفانكشن الحقيقي مكان اسم ال url او استخدم redirect reverse
>
> On Sun, 19 Apr 2020, 6:35 am Ahmed Khairy, 
> wrote:
>
>> For this project, I have made 2 applications: Core and Users
>>
>> Creating a new user is the 2nd application.
>> I am trying to direct the new user after registration to 'home'
>>
>> I keep getting NoReverse Match Error
>>
>> This is the view.py this is the code:
>>
>> def register(request):
>> if request.method == 'POST':
>> form = UserCreationForm(request.POST)
>> if form.is_valid():
>> form.save()
>> username = form.cleaned_data.get('username')
>> messages.success(
>> request, f'Account created for {username}
>> ! Show us your Designs')
>> return redirect('home')
>> else:
>> form = UserCreationForm()
>> return render(request, 'register.html', {'form': form})
>>
>> This is the url.py in the core application:
>>
>> urlpatterns = [
>> path('', HomeView.as_view(), name='home'),
>> path('checkout/', checkout, name='checkout'),
>> path('product//', ItemDetailView.as_view(), name='product'),
>> path('score/', PostListView.as_view(), name='score'),
>> path('register/', user_views.register, name='register'),
>> ]
>>
>>
>> What do I need to do to fix this issue,
>>
>> Thank you all in advance
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/4584668f-3cf5-40fe-930c-69c75b74b23d%40googlegroups.com
>> 
>> .
>>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHV4E-eymYMWLhd23iEN%2BJqMMkdLNrA9OxHq41x8EuRrj0bh2Q%40mail.gmail.com.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CANfN%3DK9nwLpqxwFMFdqKM%2B4dpRNZgJ8c5LSU6FoCf%2BgsHVH7oA%40mail.gmail.com.


Re: No Reverse Match Error, When creating a new user (new user application) it should direct back to home (to the core application)

2020-04-19 Thread Motaz Hejaze
اعمل اسم الفانكشن الحقيقي مكان اسم ال url او استخدم redirect reverse

On Sun, 19 Apr 2020, 6:35 am Ahmed Khairy, 
wrote:

> For this project, I have made 2 applications: Core and Users
>
> Creating a new user is the 2nd application.
> I am trying to direct the new user after registration to 'home'
>
> I keep getting NoReverse Match Error
>
> This is the view.py this is the code:
>
> def register(request):
> if request.method == 'POST':
> form = UserCreationForm(request.POST)
> if form.is_valid():
> form.save()
> username = form.cleaned_data.get('username')
> messages.success(
> request, f'Account created for {username}
> ! Show us your Designs')
> return redirect('home')
> else:
> form = UserCreationForm()
> return render(request, 'register.html', {'form': form})
>
> This is the url.py in the core application:
>
> urlpatterns = [
> path('', HomeView.as_view(), name='home'),
> path('checkout/', checkout, name='checkout'),
> path('product//', ItemDetailView.as_view(), name='product'),
> path('score/', PostListView.as_view(), name='score'),
> path('register/', user_views.register, name='register'),
> ]
>
>
> What do I need to do to fix this issue,
>
> Thank you all in advance
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/4584668f-3cf5-40fe-930c-69c75b74b23d%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHV4E-eymYMWLhd23iEN%2BJqMMkdLNrA9OxHq41x8EuRrj0bh2Q%40mail.gmail.com.


No Reverse Match Error, When creating a new user (new user application) it should direct back to home (to the core application)

2020-04-18 Thread Ahmed Khairy
For this project, I have made 2 applications: Core and Users

Creating a new user is the 2nd application.
I am trying to direct the new user after registration to 'home'

I keep getting NoReverse Match Error

This is the view.py this is the code:

def register(request):
if request.method == 'POST':
form = UserCreationForm(request.POST)
if form.is_valid():
form.save()
username = form.cleaned_data.get('username')
messages.success(
request, f'Account created for {username}
! Show us your Designs')
return redirect('home')
else:
form = UserCreationForm()
return render(request, 'register.html', {'form': form})

This is the url.py in the core application: 

urlpatterns = [
path('', HomeView.as_view(), name='home'),
path('checkout/', checkout, name='checkout'),
path('product//', ItemDetailView.as_view(), name='product'),
path('score/', PostListView.as_view(), name='score'),
path('register/', user_views.register, name='register'),
]


What do I need to do to fix this issue, 

Thank you all in advance

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4584668f-3cf5-40fe-930c-69c75b74b23d%40googlegroups.com.


Django 2.1.1 No Reverse Match

2018-09-15 Thread Emprex KG
Hey everyone,

been learning Django for a week or so ago now,

Today I have been having issues with the Django reset_password view after I 
have added namespace to my app

path('reset_password/', 
PasswordResetView.as_view(template_name='accounts/reset_password.html'),
 name='reset_password'),



Error:

NoReverseMatch at /account/reset_password/ 

Reverse for 'password_reset_done' not found. 'password_reset_done' is not a 
valid view function or pattern name.

Request Method: POST 
Request URL: http://127.0.0.1:8000/account/reset_password/ 
Django Version: 2.1.1 
Exception Type: NoReverseMatch 
Exception Value: 

Reverse for 'password_reset_done' not found. 'password_reset_done' is not a 
valid view function or pattern name.

Exception Location: 
C:\Users\gilbe\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py
 
in _reverse_with_prefix, line 622 
Python Executable: 
C:\Users\gilbe\AppData\Local\Programs\Python\Python37-32\python.exe 
Python Version: 3.7.0 
Python Path: 

['C:\\Users\\gilbe\\Desktop\\testapplication',
 'C:\\Users\\gilbe\\Desktop\\testapplication',
 
'C:\\Users\\gilbe\\AppData\\Local\\Programs\\Python\\Python37-32\\python37.zip',
 'C:\\Users\\gilbe\\AppData\\Local\\Programs\\Python\\Python37-32\\DLLs',
 'C:\\Users\\gilbe\\AppData\\Local\\Programs\\Python\\Python37-32\\lib',
 'C:\\Users\\gilbe\\AppData\\Local\\Programs\\Python\\Python37-32',
 
'C:\\Users\\gilbe\\AppData\\Local\\Programs\\Python\\Python37-32\\lib\\site-packages',
 'C:\\Program Files\\JetBrains\\PyCharm '
 '2018.2.3\\helpers\\pycharm_matplotlib_backend']

Server time: Sat, 15 Sep 2018 11:36:06 +
I have looked around and the documentation I have found is referencing 
Django 1 {1.7 … 1.10}

this mentions adding another argument after template name 
post_reset_redirect however this seems to be causing more problems

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b572d959-1ea0-4f81-97da-033a9e37fc1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread yingi keme
You nailed it james. It worked for me. The capitalization matters.

Thanks James..!!!

Yingi Kem

> On 17 Dec 2017, at 12:14 PM, James Schneider  wrote:
> 
> 
> 
> 
> Update
> 
> It gives the No Reverse Error. I dont seem to understand why
> 
> Instead of User.id, try user.id, capitalization matters.
> 
> Trying not to confuse things, but in this instance you may instead want to 
> use object.id, since you may be referring to a different User object than the 
> one that is logged in. I made an assumption that the view will be only 
> modifying the logged in user.
> 
> -James
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWcjSo3%3DXOPLopKxo5r2qqwZ3pE_97gGpJV4q5gGNELCA%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/BB378E17-CAEB-4ADB-AF11-3E9A1F4AFE18%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread James Schneider
Update

It gives the No Reverse Error. I dont seem to understand why


Instead of User.id, try user.id, capitalization matters.


Trying not to confuse things, but in this instance you may instead want to
use object.id, since you may be referring to a different User object than
the one that is logged in. I made an assumption that the view will be only
modifying the logged in user.

-James

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWcjSo3%3DXOPLopKxo5r2qqwZ3pE_97gGpJV4q5gGNELCA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread James Schneider
On Dec 17, 2017 12:30 AM, "yingi keme"  wrote:

The problem is that, it works perfectly when i put the number on the
template like this

Update

But when i do

Update

It gives the No Reverse Error. I dont seem to understand why


Instead of User.id, try user.id, capitalization matters.

{% url 'Update' pk=user.id %}

The default context variable provided by django.contrib.auth is 'user' in
the template context, not 'User', which I'm assuming you are using.

Since the 'User' variable does not exist in your template context, it
resolves to '' (empty string), meaning that you are passing a PK of '' to
your view, which it is unhappy with. This is evidenced in the error message
you originally posted with an empty string showing as the argument to the
URL resolver:

Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s)
tried: ['Core/UpdateMe/(?P\\d+)/$']


HTH,

-James

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWBSsU2uMTSYUFJMy%2BRd_vfqkh_Buq0WNUR_UeiR1h0hw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread yingi keme
So is there no way out? I am really confused how to go on with this

Yingi Kem

> On 17 Dec 2017, at 9:44 AM, Andréas Kühne  wrote:
> 
> 
> 
> 2017-12-17 9:35 GMT+01:00 pradam programmer :
>> From this:
>> Update
>> Change to this:
>> Update
> 
> That will not work and isn't recommended. Everything within {% %} is python 
> code already, so you don't need to interpolate again. I don't even think that 
> will work.
> 
> Unfortunately I don't have any suggestions to get it working either...
> 
> Regards,
> 
> Andréas
> 
> 
>  
>>> On 17-Dec-2017 2:00 PM, "yingi keme"  wrote:
>>> The problem is that, it works perfectly when i put the number on the 
>>> template like this
>>> 
>>> Update
>>> 
>>> But when i do 
>>> 
>>> Update
>>> 
>>> It gives the No Reverse Error. I dont seem to understand why
>>> 
>>> Yingi Kem
>>> 
 On 16 Dec 2017, at 11:18 AM, Любопытный Енот  wrote:
 
 try fix your pattern to
 r'^/Core/UpdateMe/(?P\\d+)/$'
 
 
 суббота, 16 декабря 2017 г., 12:22:49 UTC+3 пользователь yingi keme 
 написал:
> 
> I am using the django generic UpdateView
> 
> class UserUpdate(UpdateView):
> model = User
> fields = ['first_name', 'last_name', 'email', 'username']
> template_name = 'Core\MyUpdate.htm'
> 
> And my url pattern is this:
> 
> url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')
> 
> However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives 
> this error
> 
> NoReverseMatch at /Core/UpdateMe/34/
> 
> Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) 
> tried: ['Core/UpdateMe/(?P\\d+)/$']
 You received this message because you are subscribed to the Google Groups 
 "Django users" group.
 To unsubscribe from this group and stop receiving emails from it, send an 
 email to django-users+unsubscr...@googlegroups.com.
 To post to this group, send email to django-users@googlegroups.com.
 Visit this group at https://groups.google.com/group/django-users.
 To view this discussion on the web visit 
 https://groups.google.com/d/msgid/django-users/867231ed-4b2e-4882-87c5-d482579dc182%40googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "Django users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to django-users+unsubscr...@googlegroups.com.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/django-users.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/249DD07C-736B-4861-A32B-2C00FC04E960%40gmail.com.
>>> For more options, visit https://groups.google.com/d/optout.
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/CAGGVXBPV1H%2BiT7gDb3DmDVOm%2B94i8wOr0KH%2BwEf97jGRfGFtmg%40mail.gmail.com.
>> For more options, visit https://groups.google.com/d/optout.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/CAK4qSCf-uU8cMQrz1JBWkrEU9e4ny_jW%2BRU8z4zbD0s-0hvHbw%40mail.gmail.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2595AC34-1A5D-447D-9D51-E02980B8376D%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread Andréas Kühne
2017-12-17 9:35 GMT+01:00 pradam programmer :

> From this:
> Update
> Change to this:
> Update
>
>
That will not work and isn't recommended. Everything within {% %} is python
code already, so you don't need to interpolate again. I don't even think
that will work.

Unfortunately I don't have any suggestions to get it working either...

Regards,

Andréas




> On 17-Dec-2017 2:00 PM, "yingi keme"  wrote:
>
>> The problem is that, it works perfectly when i put the number on the
>> template like this
>>
>> Update
>>
>> But when i do
>>
>> Update
>>
>> It gives the No Reverse Error. I dont seem to understand why
>>
>> Yingi Kem
>>
>> On 16 Dec 2017, at 11:18 AM, Любопытный Енот  wrote:
>>
>> try fix your pattern to
>>
>> r'^/Core/UpdateMe/(?P\\d+)/$'
>>
>>
>> суббота, 16 декабря 2017 г., 12:22:49 UTC+3 пользователь yingi keme
>> написал:
>>>
>>> I am using the django generic UpdateView
>>>
>>> class UserUpdate(UpdateView):
>>> model = User
>>> fields = ['first_name', 'last_name', 'email', 'username']
>>> template_name = 'Core\MyUpdate.htm'
>>>
>>> And my url pattern is this:
>>>
>>> url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')
>>>
>>> However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives
>>> this error
>>>
>>> NoReverseMatch at /Core/UpdateMe/34/
>>>
>>> Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) tried: 
>>> ['Core/UpdateMe/(?P\\d+)/$']
>>>
>>>
>>> You received this message because you are subscribed to the Google
>> Groups "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/867231ed-4b2e-4882-87c5-d482579dc182%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to django-users+unsubscr...@googlegroups.com.
>> To post to this group, send email to django-users@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/249DD07C-736B-4861-A32B-2C00FC04E960%40gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/CAGGVXBPV1H%2BiT7gDb3DmDVOm%
> 2B94i8wOr0KH%2BwEf97jGRfGFtmg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAK4qSCf-uU8cMQrz1JBWkrEU9e4ny_jW%2BRU8z4zbD0s-0hvHbw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread pradam programmer
>From this:
Update
Change to this:
Update

On 17-Dec-2017 2:00 PM, "yingi keme"  wrote:

> The problem is that, it works perfectly when i put the number on the
> template like this
>
> Update
>
> But when i do
>
> Update
>
> It gives the No Reverse Error. I dont seem to understand why
>
> Yingi Kem
>
> On 16 Dec 2017, at 11:18 AM, Любопытный Енот  wrote:
>
> try fix your pattern to
>
> r'^/Core/UpdateMe/(?P\\d+)/$'
>
>
> суббота, 16 декабря 2017 г., 12:22:49 UTC+3 пользователь yingi keme
> написал:
>>
>> I am using the django generic UpdateView
>>
>> class UserUpdate(UpdateView):
>> model = User
>> fields = ['first_name', 'last_name', 'email', 'username']
>> template_name = 'Core\MyUpdate.htm'
>>
>> And my url pattern is this:
>>
>> url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')
>>
>> However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives
>> this error
>>
>> NoReverseMatch at /Core/UpdateMe/34/
>>
>> Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) tried: 
>> ['Core/UpdateMe/(?P\\d+)/$']
>>
>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/867231ed-4b2e-4882-87c5-d482579dc182%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/249DD07C-736B-4861-A32B-2C00FC04E960%40gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAGGVXBPV1H%2BiT7gDb3DmDVOm%2B94i8wOr0KH%2BwEf97jGRfGFtmg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-17 Thread yingi keme
The problem is that, it works perfectly when i put the number on the template 
like this

Update

But when i do 

Update

It gives the No Reverse Error. I dont seem to understand why

Yingi Kem

> On 16 Dec 2017, at 11:18 AM, Любопытный Енот  wrote:
> 
> try fix your pattern to
> r'^/Core/UpdateMe/(?P\\d+)/$'
> 
> 
> суббота, 16 декабря 2017 г., 12:22:49 UTC+3 пользователь yingi keme написал:
>> 
>> I am using the django generic UpdateView
>> 
>> class UserUpdate(UpdateView):
>> model = User
>> fields = ['first_name', 'last_name', 'email', 'username']
>> template_name = 'Core\MyUpdate.htm'
>> 
>> And my url pattern is this:
>> 
>> url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')
>> 
>> However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives this 
>> error
>> 
>> NoReverseMatch at /Core/UpdateMe/34/
>> 
>> Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) tried: 
>> ['Core/UpdateMe/(?P\\d+)/$']
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/867231ed-4b2e-4882-87c5-d482579dc182%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/249DD07C-736B-4861-A32B-2C00FC04E960%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: No Reverse Match Exception

2017-12-16 Thread Любопытный Енот
try fix your pattern to

r'^/Core/UpdateMe/(?P\\d+)/$'


суббота, 16 декабря 2017 г., 12:22:49 UTC+3 пользователь yingi keme написал:
>
> I am using the django generic UpdateView
>
> class UserUpdate(UpdateView):
> model = User
> fields = ['first_name', 'last_name', 'email', 'username']
> template_name = 'Core\MyUpdate.htm'
>
> And my url pattern is this:
>
> url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')
>
> However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives 
> this error
>
> NoReverseMatch at /Core/UpdateMe/34/
>
> Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) tried: 
> ['Core/UpdateMe/(?P\\d+)/$']
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/867231ed-4b2e-4882-87c5-d482579dc182%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


No Reverse Match Exception

2017-12-16 Thread yingi keme
I am using the django generic UpdateView

class UserUpdate(UpdateView):
model = User
fields = ['first_name', 'last_name', 'email', 'username']
template_name = 'Core\MyUpdate.htm'

And my url pattern is this:

url(r'^UpdateMe/(?P\d+)/$', UserUpdate.as_view(), name='Update')

However, this url  Core/UpdateMe/34/ doesnt seem to match and it gives this 
error

NoReverseMatch at /Core/UpdateMe/34/

Reverse for 'Update' with arguments '('',)' not found. 1 pattern(s) tried: 
['Core/UpdateMe/(?P\\d+)/$']



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/53dc7230-00ec-45ae-b6d8-da9a135e04fb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: no django reverse match

2016-07-09 Thread ludovic coues
After reading your message, I don't know what the app should do, and
what happen currently.
I don't know if there is an error or not. Some part are missing like
the imports, app_name in urls.py or the url for message_board:list.


As a sidenote, I will suggest you to look the authentication views [1]
and the generic forms view [2]. These should make your life easier :)

[1] 
https://docs.djangoproject.com/en/1.9/topics/auth/default/#all-authentication-views
[2] 
https://docs.djangoproject.com/en/1.9/topics/class-based-views/generic-editing/#model-forms

2016-07-09 13:52 GMT+02:00  :
> this is my  login view ...
>
>
> def login(request):
> # c = {}
> # c.update(csrf(request))
> return render(request, 'envato.rathemes.com/infinity/topbar/login.html')
>
>
> def auth_view(request):
> username = request.POST.get('username', '')
> password = request.POST.get('password', '')
> user = auth.authenticate(username=username, password=password)
> if user is not None:
> auth.login(request, user)
> return redirect('message_board:list')
> else:
> return HttpResponse('notauthenticateplease login with correct
> detail', status=403)
>
>
> Im trying to go on new app and the urls for new app is this --
>
>
> urlpatterns = [
> url(r'^message_board/$', views.message, name='message'),
> url(r'^message_board/post_new$', views.post_new, name='post_new'),
> #url(r'^message_board/post_detail$', views.post_detail,
> name='post_detail')
> url(r'^message_board/post_detail/(?P\d+)/$', views.post_detail,
> name='post_detail'),
> ]
>
>
> and message board view is this -
>
>
>
> def message(request):
> posts = Post.objects.order_by('-created_date')
> return render(request, 'post_list.html', {'xyz': posts})
>
>
> @login_required
> def post_new(request):
> if request.method == "POST":
> form = PostForm(request.POST)
> if form.is_valid():
> post = form.save(commit=False)
> post.author = request.user
> post.published_date = timezone.now()
> post.save()
> return redirect('message_board:list')
> else:
> form = PostForm()
> return render(request, 'post_edit.html', {'form': form})
>
>
>
>
>
> please help me please..
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/832b97b8-0d25-4718-86ee-7ae87599f163%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.



-- 

Cordialement, Coues Ludovic
+336 148 743 42

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZuZ89v_HfCtcavA_mCYf7k9m99gVFZUtSW8%3D0_57r-UA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


no django reverse match

2016-07-09 Thread ashutosh13103496
this is my  login view ...


def login(request):
# c = {}
# c.update(csrf(request))
return render(request, 'envato.rathemes.com/infinity/topbar/login.html')


def auth_view(request):
username = request.POST.get('username', '')
password = request.POST.get('password', '')
user = auth.authenticate(username=username, password=password)
if user is not None:
auth.login(request, user)
return redirect('message_board:list')
else:
return HttpResponse('notauthenticateplease login with correct 
detail', status=403)


Im trying to go on new app and the urls for new app is this --


urlpatterns = [
url(r'^message_board/$', views.message, name='message'),
url(r'^message_board/post_new$', views.post_new, name='post_new'),
#url(r'^message_board/post_detail$', views.post_detail, name='post_detail')
url(r'^message_board/post_detail/(?P\d+)/$', views.post_detail, 
name='post_detail'),
]  


and message board view is this -



def message(request):
posts = Post.objects.order_by('-created_date')
return render(request, 'post_list.html', {'xyz': posts})


@login_required
def post_new(request):
if request.method == "POST":
form = PostForm(request.POST)
if form.is_valid():
post = form.save(commit=False)
post.author = request.user
post.published_date = timezone.now()
post.save()
return redirect('message_board:list')
else:
form = PostForm()
return render(request, 'post_edit.html', {'form': form})





please help me please..

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/832b97b8-0d25-4718-86ee-7ae87599f163%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Reverse match Exception on password_reset_confirm

2009-01-23 Thread Malcolm Tredinnick

On Fri, 2009-01-23 at 22:44 +0200, Oleg Oltar wrote:
>  Hi!
> 
> 
> I am trying to add password reset function to my application. 
> But when I am trying to process the email with confirmation link:
> 
> 
> code:
>  # Password resend group
> 
>   
> 
> (r'^reset/(?P[0-9A-Za-z]+)-(?P.+)/$',
>  
> 
>  'django.contrib.auth.views.password_reset_confirm'),
> 
> 
> 
> 
> Also I copied template reset_password_confirm.html to my register/
> folder in my templates
>  
> 
> 
> But when I am trying to process the url
> = http://localhost:8000/reset/1-29s-f1e5514c29ac724ad0c2/
>  
> 
> 
> Getting
> NoReverseMatch at /reset/1-29s-f1e5514c29ac724ad0c2/
> Reverse for '' with arguments 
> '()' and keyword arguments '{}' not found.

You haven't really explained how you get to this point, but the error
message is telling you the problem. Something (and which function in the
code is ultimately responsible will be contained in the traceback for
the exception) is trying to do a reverse URL lookup and not passing in
any arguments. Since the URL pattern you show requires two arguments, it
will never be used for anything that passed in no arguments.

Regards,
Malcolm

> 


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