Re: django registration error

2020-02-05 Thread N Rupesh
On Wed, Feb 5, 2020 at 3:40 PM  wrote:

>
>
>
>
> You might not have applied migrations
>
> python manage.py makemigrations
>
> python manage.py migrate
>
>
>
> *From: *nrupesh08 
> *Sent: *Wednesday, February 5, 2020 2:18 PM
> *To: *Django users 
> *Subject: *django registration error
>
>
>
>
>
> --
> 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/f1085c52-43ca-4ab4-9758-7e9d971241a4%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f1085c52-43ca-4ab4-9758-7e9d971241a4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
> --
> 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/5e3a9477.1c69fb81.4aeed.840e%40mx.google.com
> <https://groups.google.com/d/msgid/django-users/5e3a9477.1c69fb81.4aeed.840e%40mx.google.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAJTpUzm0gexYEMv4yTYo%2BzZso%2B80G8ptSJTnKGptYfFW3SdO6A%40mail.gmail.com.


Re: django registration error

2020-02-05 Thread N Rupesh
okay


On Wed, Feb 5, 2020 at 3:40 PM  wrote:

>
>
>
>
> You might not have applied migrations
>
> python manage.py makemigrations
>
> python manage.py migrate
>
>
>
> *From: *nrupesh08 
> *Sent: *Wednesday, February 5, 2020 2:18 PM
> *To: *Django users 
> *Subject: *django registration error
>
>
>
>
>
> --
> 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/f1085c52-43ca-4ab4-9758-7e9d971241a4%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/f1085c52-43ca-4ab4-9758-7e9d971241a4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
>
>
> --
> 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/5e3a9477.1c69fb81.4aeed.840e%40mx.google.com
> <https://groups.google.com/d/msgid/django-users/5e3a9477.1c69fb81.4aeed.840e%40mx.google.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAJTpUzk0NTmBaBr1mJ4D65wW-EByHD3ya7-xJ1Xra%2BjvganfRQ%40mail.gmail.com.


RE: django registration error

2020-02-05 Thread dhruvashah1221999
  You might not have applied migrationspython manage.py makemigrationspython manage.py migrate From: nrupesh08Sent: Wednesday, February 5, 2020 2:18 PMTo: Django usersSubject: django registration error  -- 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/f1085c52-43ca-4ab4-9758-7e9d971241a4%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/5e3a9477.1c69fb81.4aeed.840e%40mx.google.com.


Re: django registration error

2020-02-05 Thread maninder singh Kumar
Are you using mutiple databases and perhaps django is looking in the wrong
place for auth_user ?
could you post the entire error and your settings.py file


[image: --]

Maninder Kumar
[image: http://]about.me/maninder.s.kumar





On Wed, Feb 5, 2020 at 2:18 PM nrupesh08  wrote:

> [image: error.png]
>
>
> --
> 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/f1085c52-43ca-4ab4-9758-7e9d971241a4%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/CABOHK3REhv6Nrt7zz3_rDz7YjtnTi3-8X0oiEM%2BXcwUo0LXqYA%40mail.gmail.com.


django registration error

2020-02-05 Thread nrupesh08


[image: error.png]


-- 
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/f1085c52-43ca-4ab4-9758-7e9d971241a4%40googlegroups.com.


Re: Looking for Django registration API

2019-08-22 Thread Rahul Sharma
Try django-rest-auth 
. This is 
what I have used over the years. Easy to understand and implement. Hope it 
helps you.

On Thursday, August 22, 2019 at 12:15:12 AM UTC+5:30, Sandip Nath wrote:
>
> Are there any ready to use user authentication API for Django where user 
> can register not only with username, password and email but also with date 
> of birth, profile-url, picture etc?
>

-- 
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/61173eab-b55b-4e04-b38d-6b46608ead7d%40googlegroups.com.


Re: Looking for Django registration API

2019-08-22 Thread Rahul Sharma
Try django-rest-auth
.
This is what I have used over the years. Easy to understand and implement.
Hope it helps you.

On Thu, Aug 22, 2019 at 1:06 PM Suraj Thapa FC 
wrote:

> Search djoser
>
> On Thu, 22 Aug, 2019, 12:15 AM Sandip Nath,  wrote:
>
>> Are there any ready to use user authentication API for Django where user
>> can register not only with username, password and email but also with date
>> of birth, profile-url, picture etc?
>>
>> --
>> 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/0cef9c81-2a80-48d9-a217-d9418fe94dfb%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/CAPjsHcFykoOCtdQPQiOj8YCpP6uPCJm_vwAsTwzAoEasVnK4wQ%40mail.gmail.com
> 
> .
>


-- 
Rahul Sharma

-- 
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/CAMV6LZ6ERFsD4%3DOw%3DvzexxC%2B%2BVR%3Dnf0BA6HnS1Biy7p-UiL-PQ%40mail.gmail.com.


Re: Looking for Django registration API

2019-08-22 Thread Suraj Thapa FC
Search djoser

On Thu, 22 Aug, 2019, 12:15 AM Sandip Nath,  wrote:

> Are there any ready to use user authentication API for Django where user
> can register not only with username, password and email but also with date
> of birth, profile-url, picture etc?
>
> --
> 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/0cef9c81-2a80-48d9-a217-d9418fe94dfb%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/CAPjsHcFykoOCtdQPQiOj8YCpP6uPCJm_vwAsTwzAoEasVnK4wQ%40mail.gmail.com.


Looking for Django registration API

2019-08-21 Thread Sandip Nath
Are there any ready to use user authentication API for Django where user 
can register not only with username, password and email but also with date 
of birth, profile-url, picture etc?

-- 
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/0cef9c81-2a80-48d9-a217-d9418fe94dfb%40googlegroups.com.


Re: Installing and using django registration – backends

2019-01-09 Thread Yuval Bachrach
my latest response failed to make it - SO I am trying again (converted some
text to jpg - the contect of dirs() and "ls" in shell)

The package is installed (pip) and migration is clean. Next steps at the
documents: Adding to urls at urlpatterns but I get error messages (details
below). So I am stacked at the very beginning. As a Django beginner, I
would be happy to get some help.



The issues are with “backaends” that exists on the file system (with the
required content) but Django can’t find it.

django_registration project was added to INSTALLED_APPS as instructed.



On:

urlpatterns = [

url(r'^accounts/',
include('django_registration.backends.activation.urls')),

url(r'^accounts/', include('django.contrib.auth.urls')),



I had to comment out the first url as backends due to an error:

  File "", line 965, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'django_registration.backends'


[image: django registration backends.jpg]

There were suggestions at web to install django_registration using --user
flag of pip install: Tried that: It does not help



On Wed, Jan 2, 2019 at 8:02 PM Yuval Bachrach 
wrote:

> Installing and using django registration – backends
>
> The package is installed (pip) and migration is clean. Next steps at the
> documents: Adding to urls at urlpatterns but I get error messages (details
> below). So I am stacked at the very beginning. As a Django beginner, I
> would be happy to get some help.
>
> The issues are with “backaends” that exists on the file system (with the
> required content) but Django can’t find it
>
>
>
> *Details:*
>
> Ø  The urls added:
>
> urlpatterns = [
>
> url(r'^accounts/',
> include('django_registration.backends.activation.urls')),
>
> url(r'^accounts/', include('django.contrib.auth.urls')),
>
> .
>
> .
>
> ]
>
> o   In here there is an error message (from runserver) ended with:
>
>   File "", line 965, in
> _find_and_load_unlocked
>
> ModuleNotFoundError: No module named 'django_registration.backends'
>
>
>
> Ø  Commenting out the first url out of the two makes the error go away
>
> Ø  Adding (inside url.py prior to urlpattern declaration):
>
> from django_registration import backends
>
> is resulted with the following error message:
>
> ImportError: cannot import name 'backends' from 'django_registration'
> (C:\Users\yuval\OneDrive\pythonWorkDir\django\tutor1\ybsite\django_registration\__init__.py)
>
> (I did not think this line is to be added but wanted to see the
> response…). I commented it out.
>
>
>
> Ø  This is the case both when in settings.py INSTALLED_APPS I have or
> don’t have the following:
>
>  'django_registration',   # <= This one is OK
>
> Ø  Trying to add
>
>  'django_registration.backends',
>
>  #   <= This one is NOT OK : error message:
>
> oduleNotFoundError: No module named 'django_registration.backends'
>
> (I did not think this line is to be added but wanted to see the
> response…). I commented it out.
>
>
>
> So now I don’t have an error message but also not having Django
> registration ready to use…
>
> --
>
> Yuval B
>
>

-- 

Yuval B

-- 
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/CAD16PYTu%2BKLoXN9zz5Uh5Zn3iRujTtX0620Gjrb5gKK7EqdWsA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Installing and using django registration – backends

2019-01-04 Thread Yuval Bachrach
Adding more information:


   - __init__.py of django_registration is an empty file: Question: Should
   it be?
   - *At python shell, when doing dir() to django_registration, backends,
   as well as anything else, is missing*. At the file system, relevant
   files and directory exsists

In [1]: import django_registration

In [2]: dir(django_registration)

Out[2]:

['__builtins__',

 '__cached__',

 '__doc__',

 '__file__',

 '__loader__',

 '__name__',

 '__package__',

 '__path__',

 '__spec__']

In [3]:


while "ls" shows:

ModeLastWriteTime Length Name

- -- 

d- 1/3/2019   7:02 PMbackends

d- 1/3/2019   7:02 PMlocale

d- 1/3/2019   7:02 PMmigrations

d- 1/3/2019   7:02 PM__pycache__

-a 1/3/2019   7:02 PM483 exceptions.py

-a 1/3/2019   7:02 PM   3499 forms.py

-a 1/3/2019   7:02 PM311 signals.py

-a 1/3/2019   7:02 PM   6852 validators.py

-a 1/3/2019   7:02 PM   3638 views.py

-a 1/3/2019   7:02 PM  0 __init__.py


   - There were suggestions at web to install django_registration using
   --user flag of pip install: Tried that: It does not help


On Thu, Jan 3, 2019 at 1:45 PM Yuval Bachrach 
wrote:

> For the suggested link I get the following error message:
> "ModuleNotFoundError: No module named 'registration'"
> I think registration is the old name used at version 2.3.
>  Instead of following the pdf I follow
> https://django-registration.readthedocs.io/en/3.0/
> (pdf is for an older version 2.3)
> specifically
> https://django-registration.readthedocs.io/en/3.0/quickstart.html is
> short and describes the way to start and the urls to use... but, I am
> getting the error message I have described.
>
>
>
> On Thu, Jan 3, 2019 at 12:03 PM Rahul Verma 
> wrote:
>
>> Can you try like ths
>>   urlpatterns = [
>>  # Other URL patterns ...
>> url(r'^accounts/', include('registration.backends.activation.urls')),
>> # More URL patterns ...
>> ]
>>  By the way, this is the documentation of Django Registration ,Hopefully
>> it may help you.
>>
>> https://media.readthedocs.org/pdf/django-registration/latest/django-registration.pdf
>>
>> On Thu, Jan 3, 2019 at 12:33 AM Yuval Bachrach 
>> wrote:
>>
>>> Installing and using django registration – backends
>>>
>>> The package is installed (pip) and migration is clean. Next steps at the
>>> documents: Adding to urls at urlpatterns but I get error messages (details
>>> below). So I am stacked at the very beginning. As a Django beginner, I
>>> would be happy to get some help.
>>>
>>> The issues are with “backaends” that exists on the file system (with the
>>> required content) but Django can’t find it
>>>
>>>
>>>
>>> *Details:*
>>>
>>> Ø  The urls added:
>>>
>>> urlpatterns = [
>>>
>>> url(r'^accounts/',
>>> include('django_registration.backends.activation.urls')),
>>>
>>> url(r'^accounts/', include('django.contrib.auth.urls')),
>>>
>>> .
>>>
>>> .
>>>
>>> ]
>>>
>>> o   In here there is an error message (from runserver) ended with:
>>>
>>>   File "", line 965, in
>>> _find_and_load_unlocked
>>>
>>> ModuleNotFoundError: No module named 'django_registration.backends'
>>>
>>>
>>>
>>> Ø  Commenting out the first url out of the two makes the error go away
>>>
>>> Ø  Adding (inside url.py prior to urlpattern declaration):
>>>
>>> from django_registration import backends
>>>
>>> is resulted with the following error message:
>>>
>>> ImportError: cannot import name 'backends' from 'django_registration'
>>> (C:\Users\yuval\OneDrive\pythonWorkDir\django\tutor1\ybsite\django_registration\__init__.py)
>>>
>>> (I did not think this line is to be added but wanted to see the
>>> response…). I commented it out.
>>>
>>>
>>>
>>> Ø  This is the case both when in settings.py INSTALLED_APPS I have or
>>> don’t have the following:
>>>
>>>  'django_registration',   # <= This one is OK

Re: Installing and using django registration – backends

2019-01-03 Thread Yuval Bachrach
For the suggested link I get the following error message:
"ModuleNotFoundError: No module named 'registration'"
I think registration is the old name used at version 2.3.
 Instead of following the pdf I follow
https://django-registration.readthedocs.io/en/3.0/
(pdf is for an older version 2.3)
specifically
https://django-registration.readthedocs.io/en/3.0/quickstart.html is short
and describes the way to start and the urls to use... but, I am getting the
error message I have described.



On Thu, Jan 3, 2019 at 12:03 PM Rahul Verma 
wrote:

> Can you try like ths
>   urlpatterns = [
>  # Other URL patterns ...
> url(r'^accounts/', include('registration.backends.activation.urls')),
> # More URL patterns ...
> ]
>  By the way, this is the documentation of Django Registration ,Hopefully
> it may help you.
>
> https://media.readthedocs.org/pdf/django-registration/latest/django-registration.pdf
>
> On Thu, Jan 3, 2019 at 12:33 AM Yuval Bachrach 
> wrote:
>
>> Installing and using django registration – backends
>>
>> The package is installed (pip) and migration is clean. Next steps at the
>> documents: Adding to urls at urlpatterns but I get error messages (details
>> below). So I am stacked at the very beginning. As a Django beginner, I
>> would be happy to get some help.
>>
>> The issues are with “backaends” that exists on the file system (with the
>> required content) but Django can’t find it
>>
>>
>>
>> *Details:*
>>
>> Ø  The urls added:
>>
>> urlpatterns = [
>>
>> url(r'^accounts/',
>> include('django_registration.backends.activation.urls')),
>>
>> url(r'^accounts/', include('django.contrib.auth.urls')),
>>
>> .
>>
>> .
>>
>> ]
>>
>> o   In here there is an error message (from runserver) ended with:
>>
>>   File "", line 965, in
>> _find_and_load_unlocked
>>
>> ModuleNotFoundError: No module named 'django_registration.backends'
>>
>>
>>
>> Ø  Commenting out the first url out of the two makes the error go away
>>
>> Ø  Adding (inside url.py prior to urlpattern declaration):
>>
>> from django_registration import backends
>>
>> is resulted with the following error message:
>>
>> ImportError: cannot import name 'backends' from 'django_registration'
>> (C:\Users\yuval\OneDrive\pythonWorkDir\django\tutor1\ybsite\django_registration\__init__.py)
>>
>> (I did not think this line is to be added but wanted to see the
>> response…). I commented it out.
>>
>>
>>
>> Ø  This is the case both when in settings.py INSTALLED_APPS I have or
>> don’t have the following:
>>
>>  'django_registration',   # <= This one is OK
>>
>> Ø  Trying to add
>>
>>  'django_registration.backends',
>>
>>  #   <= This one is NOT OK : error message:
>>
>> oduleNotFoundError: No module named 'django_registration.backends'
>>
>> (I did not think this line is to be added but wanted to see the
>> response…). I commented it out.
>>
>>
>>
>> So now I don’t have an error message but also not having Django
>> registration ready to use…
>>
>> --
>>
>> Yuval B
>>
>> --
>> 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/CAD16PYRvn0652HHEXrQJ4J4hy5b4VmonUwBvi5NdxaOs7CoDtQ%40mail.gmail.com
>> <https://groups.google.com/d/msgid/django-users/CAD16PYRvn0652HHEXrQJ4J4hy5b4VmonUwBvi5NdxaOs7CoDtQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> --
> *   donverma*
>
> --
> 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-user

Re: Installing and using django registration – backends

2019-01-03 Thread Rahul Verma
Can you try like ths
  urlpatterns = [
 # Other URL patterns ...
url(r'^accounts/', include('registration.backends.activation.urls')),
# More URL patterns ...
]
 By the way, this is the documentation of Django Registration ,Hopefully it
may help you.
https://media.readthedocs.org/pdf/django-registration/latest/django-registration.pdf

On Thu, Jan 3, 2019 at 12:33 AM Yuval Bachrach 
wrote:

>     Installing and using django registration – backends
>
> The package is installed (pip) and migration is clean. Next steps at the
> documents: Adding to urls at urlpatterns but I get error messages (details
> below). So I am stacked at the very beginning. As a Django beginner, I
> would be happy to get some help.
>
> The issues are with “backaends” that exists on the file system (with the
> required content) but Django can’t find it
>
>
>
> *Details:*
>
> Ø  The urls added:
>
> urlpatterns = [
>
> url(r'^accounts/',
> include('django_registration.backends.activation.urls')),
>
> url(r'^accounts/', include('django.contrib.auth.urls')),
>
> .
>
> .
>
> ]
>
> o   In here there is an error message (from runserver) ended with:
>
>   File "", line 965, in
> _find_and_load_unlocked
>
> ModuleNotFoundError: No module named 'django_registration.backends'
>
>
>
> Ø  Commenting out the first url out of the two makes the error go away
>
> Ø  Adding (inside url.py prior to urlpattern declaration):
>
> from django_registration import backends
>
> is resulted with the following error message:
>
> ImportError: cannot import name 'backends' from 'django_registration'
> (C:\Users\yuval\OneDrive\pythonWorkDir\django\tutor1\ybsite\django_registration\__init__.py)
>
> (I did not think this line is to be added but wanted to see the
> response…). I commented it out.
>
>
>
> Ø  This is the case both when in settings.py INSTALLED_APPS I have or
> don’t have the following:
>
>  'django_registration',   # <= This one is OK
>
> Ø  Trying to add
>
>  'django_registration.backends',
>
>  #   <= This one is NOT OK : error message:
>
> oduleNotFoundError: No module named 'django_registration.backends'
>
> (I did not think this line is to be added but wanted to see the
> response…). I commented it out.
>
>
>
> So now I don’t have an error message but also not having Django
> registration ready to use…
>
> --
>
> Yuval B
>
> --
> 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/CAD16PYRvn0652HHEXrQJ4J4hy5b4VmonUwBvi5NdxaOs7CoDtQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/django-users/CAD16PYRvn0652HHEXrQJ4J4hy5b4VmonUwBvi5NdxaOs7CoDtQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 
*   donverma*

-- 
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/CALedDsJW6Vd0ASOAYMj2xbsH-%3DYghNFa-gyxn7UCMgp0e6fs_A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Installing and using django registration – backends

2019-01-02 Thread Yuval Bachrach
Installing and using django registration – backends

The package is installed (pip) and migration is clean. Next steps at the
documents: Adding to urls at urlpatterns but I get error messages (details
below). So I am stacked at the very beginning. As a Django beginner, I
would be happy to get some help.

The issues are with “backaends” that exists on the file system (with the
required content) but Django can’t find it



*Details:*

Ø  The urls added:

urlpatterns = [

url(r'^accounts/',
include('django_registration.backends.activation.urls')),

url(r'^accounts/', include('django.contrib.auth.urls')),

.

.

]

o   In here there is an error message (from runserver) ended with:

  File "", line 965, in _find_and_load_unlocked

ModuleNotFoundError: No module named 'django_registration.backends'



Ø  Commenting out the first url out of the two makes the error go away

Ø  Adding (inside url.py prior to urlpattern declaration):

from django_registration import backends

is resulted with the following error message:

ImportError: cannot import name 'backends' from 'django_registration'
(C:\Users\yuval\OneDrive\pythonWorkDir\django\tutor1\ybsite\django_registration\__init__.py)

(I did not think this line is to be added but wanted to see the
response…). I commented it out.



Ø  This is the case both when in settings.py INSTALLED_APPS I have or don’t
have the following:

 'django_registration',   # <= This one is OK

Ø  Trying to add

 'django_registration.backends',

 #   <= This one is NOT OK : error message:

oduleNotFoundError: No module named 'django_registration.backends'

(I did not think this line is to be added but wanted to see the
response…). I commented it out.



So now I don’t have an error message but also not having Django
registration ready to use…

-- 

Yuval B

-- 
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/CAD16PYRvn0652HHEXrQJ4J4hy5b4VmonUwBvi5NdxaOs7CoDtQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: template location for django-registration framework

2018-12-31 Thread Yuval Bachrach
(the suggested url: I saw it before writing the message. It is outdated.
Example: It uses "python manage.py syncdb"
Besides: It instruct adding to INSTALLED_APPS : "'registration'": This
yield errors: First reason: A comma is missing..
I also think, but not sure,that this line is not relevant anymore..)
I now see that I get an error message with runserver:
*ModuleNotFoundError: No module named 'django_registration.backends'*
That has to do with addition added to url.py under urlpatterns
The line cause the error message is:
*url(r'^accounts/',
include('django_registration.backends.activation.urls')),  *
  while the following line works fine.
  url(r'^accounts/', include('django.contrib.auth.urls')),

*Note that url.py exists
at Python37-32\Lib\site-packages\django_registration\backends\activation*
I am new to django still could not making the error to go away. I noticed
that there are no __init__.py files at "*lib*" as well as at "
*site-packages*".
(I could not  believe it is the reason for the error and nor that I should
make changes there but I tried adding empty __init__.py anyway...)
So what should I do to resolve the  *ModuleNotFoundError: No module named
'django_registration.backends' *error?



On Sun, Dec 30, 2018 at 7:41 PM Yuval Bachrach 
wrote:

> First: thank you!
> Yes I did search before asking
> I was trying to place the templates under my project tree (rather than
> under
> "Python37-32\Lib\site-packages\django\contrib\admin\templates\registration"
> and could not make it work.
> Per you advice I also tried putting the template file at the above
> mentioned directory as a temporary solution but I still get the same error
> message.
>
> On Sat, Dec 29, 2018 at 5:45 PM Zhe Li  wrote:
>
>> Have you searched the internet before posting?
>>
>>
>> https://stackoverflow.com/questions/6127264/troubleshooting-templatedoesnotexist-at-accounts-login-django-auth-setup
>>
>> You can either create your own pages or copy the whole templates under
>> the django admin site
>> -- site-packages/django/contrib/admin/templates/registration/
>>
>> On Saturday, December 29, 2018 at 10:22:11 AM UTC-5, Yuval Bachrach wrote:
>>>
>>> I have installed "django-registration:" and now follow "
>>> https://django-registration.readthedocs.io/en/3.0/quickstart.html";
>>>
>>> I have set URLs as explained (see below) but failed to tell django where
>>> to find the templates.
>>>
>>> What do I need to do to have django find the templates?
>>>
>>>
>>> More details:
>>>
>>> http://127.0.0.1:8000/accounts/register/
>>>
>>> is resulted with an error:
>>> TemplateDoesNotExist at /accounts/register/
>>>
>>> django_registration/registration_form.html
>>>
>>> Request Method: GET
>>> Request URL: http://127.0.0.1:8000/accounts/register/
>>> Django Version: 2.1.3
>>> Exception Type: TemplateDoesNotExist
>>> Exception Value:
>>>
>>> django_registration/registration_form.html
>>>
>>> Exception Location: C:\Program Files
>>> (x86)\Python37-32\lib\site-packages\django\template\loader.py in
>>> select_template, line 47
>>> Python Executable: C:\Program Files (x86)\Python37-32\python.exe
>>> Python Version: 3.7.1
>>>
>>> I have tried to locate *registration_form.html* at
>>> django_reistration/reister/templates at
>>> "django_registration\registration\templates\registration" under my
>>> project.
>>> Also tried "django-registration\registration\templates\registration" and
>>> several other locations but I keep getting the error message.
>>>
>>> The problem could be the template location or  a missing setting,...
>>>
>>>- I added no app to the "INSTALLED_APPS" at setting.py
>>>- my template is:
>>>
>>> TEMPLATES = [
>>> {
>>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>>> # changed at tutor7
>>> # 'DIRS': [],
>>> 'DIRS': [os.path.join(BASE_DIR, 'templates')],
>>> # DIRS is a list of filesystem directories to check when loading
>>> Django templates; it’s a search path
>>> 'APP_DIRS': True,
>>> 'OPTIONS': {
>>> 'context_processors': [
>>> 'django.template.context_processors

Re: template location for django-registration framework

2018-12-30 Thread Yuval Bachrach
First: thank you!
Yes I did search before asking
I was trying to place the templates under my project tree (rather than
under
"Python37-32\Lib\site-packages\django\contrib\admin\templates\registration"
and could not make it work.
Per you advice I also tried putting the template file at the above
mentioned directory as a temporary solution but I still get the same error
message.

On Sat, Dec 29, 2018 at 5:45 PM Zhe Li  wrote:

> Have you searched the internet before posting?
>
>
> https://stackoverflow.com/questions/6127264/troubleshooting-templatedoesnotexist-at-accounts-login-django-auth-setup
>
> You can either create your own pages or copy the whole templates under the
> django admin site
> -- site-packages/django/contrib/admin/templates/registration/
>
> On Saturday, December 29, 2018 at 10:22:11 AM UTC-5, Yuval Bachrach wrote:
>>
>> I have installed "django-registration:" and now follow "
>> https://django-registration.readthedocs.io/en/3.0/quickstart.html";
>>
>> I have set URLs as explained (see below) but failed to tell django where
>> to find the templates.
>>
>> What do I need to do to have django find the templates?
>>
>>
>> More details:
>>
>> http://127.0.0.1:8000/accounts/register/
>>
>> is resulted with an error:
>> TemplateDoesNotExist at /accounts/register/
>>
>> django_registration/registration_form.html
>>
>> Request Method: GET
>> Request URL: http://127.0.0.1:8000/accounts/register/
>> Django Version: 2.1.3
>> Exception Type: TemplateDoesNotExist
>> Exception Value:
>>
>> django_registration/registration_form.html
>>
>> Exception Location: C:\Program Files
>> (x86)\Python37-32\lib\site-packages\django\template\loader.py in
>> select_template, line 47
>> Python Executable: C:\Program Files (x86)\Python37-32\python.exe
>> Python Version: 3.7.1
>>
>> I have tried to locate *registration_form.html* at
>> django_reistration/reister/templates at
>> "django_registration\registration\templates\registration" under my
>> project.
>> Also tried "django-registration\registration\templates\registration" and
>> several other locations but I keep getting the error message.
>>
>> The problem could be the template location or  a missing setting,...
>>
>>- I added no app to the "INSTALLED_APPS" at setting.py
>>- my template is:
>>
>> TEMPLATES = [
>> {
>> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
>> # changed at tutor7
>> # 'DIRS': [],
>> 'DIRS': [os.path.join(BASE_DIR, 'templates')],
>> # DIRS is a list of filesystem directories to check when loading
>> Django templates; it’s a search path
>> 'APP_DIRS': True,
>> 'OPTIONS': {
>> 'context_processors': [
>> 'django.template.context_processors.debug',
>> 'django.template.context_processors.request',
>> 'django.contrib.auth.context_processors.auth',
>> 'django.contrib.messages.context_processors.messages',
>> ],
>> },
>> },
>> ]
>>
>>
>>
>> from django.conf.urls import include, url
>> urlpatterns = [
>> # Other URL patterns ...
>> url(r'^accounts/', 
>> include('django_registration.backends.activation.urls')),
>> url(r'^accounts/', include('django.contrib.auth.urls')),
>> # More URL patterns ...
>>
>>
>>
>> --
>>
>> Yuval B
>>
>> --
> 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/a0f6a2f7-455d-4cdc-985d-acc8a810daf4%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a0f6a2f7-455d-4cdc-985d-acc8a810daf4%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 

Yuval B

-- 
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/CAD16PYR5OgHMS5UOzDYsmYFROh0CnO6T61%3DpKhw-giT9VED1bQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: template location for django-registration framework

2018-12-29 Thread Zhe Li
Have you searched the internet before posting?

https://stackoverflow.com/questions/6127264/troubleshooting-templatedoesnotexist-at-accounts-login-django-auth-setup

You can either create your own pages or copy the whole templates under the 
django admin site 
-- site-packages/django/contrib/admin/templates/registration/

On Saturday, December 29, 2018 at 10:22:11 AM UTC-5, Yuval Bachrach wrote:
>
> I have installed "django-registration:" and now follow "
> https://django-registration.readthedocs.io/en/3.0/quickstart.html"; 
>
> I have set URLs as explained (see below) but failed to tell django where 
> to find the templates.
>
> What do I need to do to have django find the templates?
>
>
> More details:
>
> http://127.0.0.1:8000/accounts/register/
>
> is resulted with an error: 
> TemplateDoesNotExist at /accounts/register/
>
> django_registration/registration_form.html
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/accounts/register/
> Django Version: 2.1.3
> Exception Type: TemplateDoesNotExist
> Exception Value: 
>
> django_registration/registration_form.html
>
> Exception Location: C:\Program Files 
> (x86)\Python37-32\lib\site-packages\django\template\loader.py in 
> select_template, line 47
> Python Executable: C:\Program Files (x86)\Python37-32\python.exe
> Python Version: 3.7.1
>
> I have tried to locate *registration_form.html* at 
> django_reistration/reister/templates at 
> "django_registration\registration\templates\registration" under my 
> project.  
> Also tried "django-registration\registration\templates\registration" and 
> several other locations but I keep getting the error message. 
>
> The problem could be the template location or  a missing setting,...
>
>- I added no app to the "INSTALLED_APPS" at setting.py
>- my template is:
>
> TEMPLATES = [
> {
> 'BACKEND': 'django.template.backends.django.DjangoTemplates',
> # changed at tutor7
> # 'DIRS': [],
> 'DIRS': [os.path.join(BASE_DIR, 'templates')],
> # DIRS is a list of filesystem directories to check when loading 
> Django templates; it’s a search path
> 'APP_DIRS': True,
> 'OPTIONS': {
> 'context_processors': [
> 'django.template.context_processors.debug',
> 'django.template.context_processors.request',
> 'django.contrib.auth.context_processors.auth',
> 'django.contrib.messages.context_processors.messages',
> ],
> },
> },
> ]
>
>
>
> from django.conf.urls import include, url
> urlpatterns = [
> # Other URL patterns ...
> url(r'^accounts/', 
> include('django_registration.backends.activation.urls')),
> url(r'^accounts/', include('django.contrib.auth.urls')),
> # More URL patterns ...
>
>
>
> -- 
>
> Yuval B
>
>

-- 
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/a0f6a2f7-455d-4cdc-985d-acc8a810daf4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


template location for django-registration framework

2018-12-29 Thread Yuval Bachrach
I have installed "django-registration:" and now follow "
https://django-registration.readthedocs.io/en/3.0/quickstart.html";

I have set URLs as explained (see below) but failed to tell django where to
find the templates.

What do I need to do to have django find the templates?


More details:

http://127.0.0.1:8000/accounts/register/

is resulted with an error:
TemplateDoesNotExist at /accounts/register/

django_registration/registration_form.html

Request Method: GET
Request URL: http://127.0.0.1:8000/accounts/register/
Django Version: 2.1.3
Exception Type: TemplateDoesNotExist
Exception Value:

django_registration/registration_form.html

Exception Location: C:\Program Files
(x86)\Python37-32\lib\site-packages\django\template\loader.py in
select_template, line 47
Python Executable: C:\Program Files (x86)\Python37-32\python.exe
Python Version: 3.7.1

I have tried to locate *registration_form.html* at
django_reistration/reister/templates at
"django_registration\registration\templates\registration" under my
project.
Also tried "django-registration\registration\templates\registration" and
several other locations but I keep getting the error message.

The problem could be the template location or  a missing setting,...

   - I added no app to the "INSTALLED_APPS" at setting.py
   - my template is:

TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
# changed at tutor7
# 'DIRS': [],
'DIRS': [os.path.join(BASE_DIR, 'templates')],
# DIRS is a list of filesystem directories to check when loading
Django templates; it’s a search path
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]



from django.conf.urls import include, url
urlpatterns = [
# Other URL patterns ...
url(r'^accounts/', include('django_registration.backends.activation.urls')),
url(r'^accounts/', include('django.contrib.auth.urls')),
# More URL patterns ...



-- 

Yuval B

-- 
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/CAD16PYSFse0On6tqDU-TjLyeaGivc0oCB3v2VBhirBMqphohEw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Fail to create Django registration form with email and password only

2018-08-20 Thread Mikhailo Keda
No need to change Django registration/authentication, you need to use it.

Check this example - https://chat.mkeda.me/login?next=/
source code for registration/authentication 
- 
https://bitbucket.org/voron-raven/chat/src/f78b6531652f866109dbfa2f8aeffac6c0f1bb32/core/views.py#lines-247:283
Just set username same as email.

-- 
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/c07aa488-d4e3-4a81-a0b4-801c8a00259c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Fail to create Django registration form with email and password only

2018-08-19 Thread Yan Cheng Cheok
 

Creating basic registration/ authentication in Django is insanely hard.


After many tries, I manage to create basic registration/ authentication in 
Django using username and password.


[image: enter image description here] 

The code is shown in https://github.com/yccheok/django


Now, I wish to create registration form which only use email and password. 
No username.


I try to following the official example 
https://docs.djangoproject.com/en/dev/topics/auth/customizing/#a-full-example 
. The example is using email, password and DOB for registration. I'm not 
interested in DOB, but I will just simply follow the example at this point.


I made the following changes : 
https://github.com/yccheok/django/commit/ae0b16d38a39fad78a2137e2649c0f3fda12a3ff


However, I'm facing 2 problems.

   1. The registration form, still look the same as previous registration 
   form. It has username and password text fields. What I'm expecting are 
   email and password text fields.
   2. Error Manager isn't available; 'auth.User' has been swapped for 
   'accounts.MyUser' after clicking Sign up button. I had read Manager 
   isn't available; 'auth.User' has been swapped for 'polls.User' 
   

 
   , but total clueless on how to apply the solution in my case.

[image: enter image description here] 


--

There's one thing confusing me. 

Why in accounts/admin.py, we are using from accounts.models import MyUser. 
But in web/settings.py, we are using AUTH_USER_MODEL = 'accounts.MyUser' 
(Instead of AUTH_USER_MODEL = 'accounts.models.MyUser')
--


Any idea how I can modify my basic workable registration/login example (
https://github.com/yccheok/django), to make them register using email and 
password?

-- 
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/edec0bf7-3c72-4478-be2b-3a7ce25406d6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Is it possible have Django registration and content databases on 2 different servers?

2018-01-12 Thread NoviceSortOf


Is it possible have Django registration and content databases on 2 
different servers?

I would like to decouple the registration from the content management 
system, and am wondering
if its possible to place them on 2 different servers. What caveats, 
guidelines and methods
are available for such an approach?

Please advise 



-- 
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/38fbd7d3-0d57-46f1-a456-da2e196b6cf8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: TemplateDoesNotExist for django-registration (but it does)

2017-05-13 Thread farah_chaaban
Hello i have the same problem. please help me

-- 
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/2a204311-cd54-426d-8593-b9e14f1d1319%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: django registration issues

2017-05-12 Thread Antonis Christofides
Hi,

not what you ask, but it isn't a good idea to have a copy of django-registration
(or any third-party package) in your project directory; instead, just "pip
install django-registration-redux".

Regards,

A.

Antonis Christofides
http://djangodeployment.com


On 2017-05-12 17:09, farah_chaa...@hotmail.com wrote:
> |Enter at least one application label|

-- 
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/36f48927-847f-999e-15a6-331420f02af8%40djangodeployment.com.
For more options, visit https://groups.google.com/d/optout.


django registration issues

2017-05-12 Thread farah_chaaban
I am trying to download registration application from github but i have 
some problems:
 - git clone https://github.com/macropin/django-registration.git
 - python install setup.py 
- i copied the registration folder to my project folder Than :

*Url.py*

from django.conf.urls import *
from django.contrib import admin
from registration.views import*


urlpatterns = ['',
url (r'^accounts/', include('registration.backends.default.urls')),]


Than:


*Setting.py:*

INSTALLED_APPS = 
(

'django.contrib.admin',

'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
'django.contrib.staticfiles',
# additional external apps
'registration',
'social.apps.django_app.default',

)

SITE_ID=1

ACCOUNT_ACTIVATION_DAYS = 7

REGISTRATION_AUTO_LOGIN = True

When I type python manage.py sqlall **the result is this error :

manage.py sqlall: error: Enter at least one application label.

I guess that my project can't read the application registration and 

when i write : python manage.py runserver

the error is The current URL, accounts/, didn't match any of these.

Please any help ?

-- 
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/65d5c582-74b0-48af-8d0c-a1f447b0a1a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Integrating django-registration-redux along with custom_user: Prevent user registration if UserProfile is not valid

2016-10-20 Thread njan


I'm trying to use django-registration-redux along with custom_user. I have 
added both apps to settings.py


My main urls.py is as given below

from userprofile.forms import UserProfileForm
from registration.backends.default.views import RegistrationView
urlpatterns = [
url(r'user/register/$', 
RegistrationView.as_view(form_class = UserProfileForm), 
name = 'registration_register'),

url(r'^user/', include('registration.backends.default.urls')),
]

I have a UserProfile model as given below. (userprofile/models.py)

def validate_dob(value):
now=timezone.now()
start_date=date(now.year-settings.AGE_UPPER, 1, 1)
end_date=date(now.year-settings.AGE_LOWER, 12, 31)
print("start: %s end: %s supplied :%s" % (start_date, end_date, value))
if start_date >value or value > end_date:
raise ValidationError("Please choose a valid date from the given 
set") 
#
class UserProfile(models.Model):
user=models.OneToOneField(settings.AUTH_USER_MODEL, 
on_delete=models.CASCADE,
primary_key=True,)
fullname=models.CharField(max_length=70, blank=False)
dob=models.DateField(blank=False,validators=[validate_dob] )
photo=models.ImageField(upload_to='profile_images', blank=False)
def __str__(self):
return self.user.email
def get_profile(self):
return self.user.id
#---adding signal to save UserProfile
def user_registered_callback(sender, user, request, **kwargs):
profile = UserProfile(user = user)
print(request.POST)
profile.fullname =request.POST["fullname"]
profile.dob ="%s-%s-%s" % 
(request.POST["dob_year"],request.POST["dob_month"],request.POST["dob_day"])
#profile.dob=request.POST["dob"]
if 'photo' in request.FILES:
profile.photo = request.FILES['photo']

profile.save()

user_registered.connect(user_registered_callback)

and here's my userprofile/forms.py

class UserProfileForm(RegistrationForm):
fullname=forms.CharField(required=True,label="Full name",  min_length=3, 
max_length=75)
dob=forms.DateField(required=True,label="Date of birth", 

widget=forms.SelectDateWidget(years=range(now.year-settings.AGE_UPPER,now.year-settings.AGE_LOWER)))

photo=forms.ImageField(required=True)`

How do I prevent inserting User values into the table if the filed, say dob 
is not in the specified range (AGE_UPPER=70 ,AGE_LOWER=18)


Please tell me if I'm making this over complicated.


Thanks

-- 
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/5df878dc-1bd3-4170-a462-9861d5ae0455%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: How to test email-verification in django-registration-redux application on localhost?

2015-06-09 Thread Luis Zárate
Put  SITE_ID = 1 in your settings file to fix this error


2015-06-09 7:01 GMT-06:00 akshat :

> You're using the Django "sites framework" without having set the SITE_ID 
> setting. Create a site in your database and set the SITE_ID setting or pass a 
> request to Site.objects.get_current() to fix this error
>
>



-- 
"La utopía sirve para caminar" Fernando Birri

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAG%2B5VyM3sv4pf3Hs%3DjSzqeh5XsaRhMNLd-7-w4grG8Dr8AaAWQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


How to test email-verification in django-registration-redux application on localhost?

2015-06-09 Thread akshat
I have made an django app which uses Django-Registration-redux application 
to registration and email verification of users.I am using 'Sites' 
framework also.How ever when I click register button email is not sent but 
instead I get this error message - 

You're using the Django "sites framework" without having set the SITE_ID 
setting. Create a site in your database and set the SITE_ID setting or pass a 
request to Site.objects.get_current() to fix this error


I want to add localhost:8000 to the django_site table in database.What is the 
right way to add localhost to sites and test email-verification here?


Thanks

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/9565b5dc-15a0-4415-a729-aedf0e385750%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Question on auto-generating username while using django registration

2015-04-30 Thread Babatunde Akinyanmi
Yes it is and very easy.

Create a form without a username field and do something like this:

def autogenerate_username ():
# some logic

new_user=User.objects.create_user(autogenerate_username (),
  self.cleaned_data['email'],
  self.cleaned_data['password1'])
new_user.first_name = self.cleaned_data['first_name']
new_user.last_name = self.cleaned_data['last_name']
new_user.save()

On 1 May 2015 01:48,  wrote:
>
> Hi there -
> I’m in the process of building a site with django, and I noticed that
username is a requirement for the django registration app.  I’m wondering
if it’s possible to auto generate the username after the user make entries
in the other fields (i.e. name, city, email, password)?
>
> OR does django registration necessarily require the username to be
created at the same time as the other fields?
>
> thanks 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/26e45341-aa13-4404-9f42-c3c38061b753%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BWjgXNEqitXLwjMufNntqwU-QoL72O-AhTBHJ5FizQ%3DQdv28A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Question on auto-generating username while using django registration

2015-04-30 Thread emeka2106
Hi there -
I’m in the process of building a site with django, and I noticed that 
username is a requirement for the django registration app.  I’m wondering 
if it’s possible to auto generate the username *after* the user make 
entries in the other fields (i.e. name, city, email, password)?

OR does django registration necessarily require the username to be created 
at the same time as the other fields?

thanks 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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/26e45341-aa13-4404-9f42-c3c38061b753%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django Registration

2014-09-29 Thread Collin Anderson
def get_success_url(request, user):
return settings.REGISTRATION_EMAIL_REGISTER_SUCCESS_URL


or even more straighforward:
def get_success_url(request, user):
return '/accounts/register/complete/'

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/87b7378e-5979-4acb-b4ff-6537c3eee957%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django Registration

2014-09-29 Thread Tsolmon Narantsogt
Hello folks

*I got this error Django Registration 'str' object is not callable*

INSTALLED_APPS = (
 ..
'registration',
)

REGISTRATION_EMAIL_REGISTER_SUCCESS_URL = '/accounts/register/complete/'

in urls.py

get_success_url=getattr(
settings, 'REGISTRATION_EMAIL_REGISTER_SUCCESS_URL',
lambda request, user: '/'
),

Please help what happend to me i dont understand.

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPs6WScaQqikbxyNALZ5c4%3D-dYN_s%2Bpt6Y-kD9UBhzJgVgA97w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Alternative to django-registration (unmaintaned since September 2013)

2014-07-27 Thread rush
Hi guys,Looks like django-signup ( https://bitbucket.org/fcoelho/django-signup/ ) may be interesting for you. It is based on django-registration and as for now the last commit was about a 5 days ago.-- wbr,rush.   24.07.2014, 19:21, "Oscar Carballal" :Same for me in my personal projects and in our company, we fully switched to django-allauth and we are quite happyRegards,Oscar-- Oscar Carballal Prego - Senior Software Developerhttp://oscarcp.com | @pizte2014-07-23 8:15 GMT+01:00 Santiago L <santiago.lam...@gmail.com>:El sábado, 19 de julio de 2014 02:17:24 UTC+2, Russell Keith-Magee escribió:On Fri, Jul 18, 2014 at 8:31 PM, Santiago L <santiag...@gmail.com> wrote:Hi, Some weeks ago I noticed that django-registration is not longer maintained byits creator: quoting https://bitbucket.org/ubernostrum/django-registration/wiki/Home> django-registration> I stepped down as maintainer of this application in September 2013. Pull> requests, issues and comments sent to this repository will be ignored.  As I'm currently using this app in my project, I wonder if there is anyalternative for django-registration? Maybe someone knows about a fork. I'm not aware of an active fork. If you're looking to step into open source contribution, this would be a good project to adopt - the code base is stable, so the management overhead should be relatively low.   I like the idea about contributing and get in charge of a fork, but I'm not sure about my availability...   Besides that, I found a related issue report (rejected because is not the goodplace to ask this question, but relevant anyway)[2] [2] https://code.djangoproject.com/ticket/13164 Because there's no single answer to the question. Authentication is a topic that is hard to get right, and there's a very limited number of "right" answers. Passwords *must* be done well, or you risk vulnerability, and what constitutes "well" requires considerable expertise.  However, the requirements for registration and signup will vary between projects, and will depend on project requirements. Some projects will need a fully verified personal profile before you can continue; some only require a verified email address; some will allow an email address, but allow later verification, and some will require completely anonymous profiles that are filled in at a critical point in workflow (e.g., at checkout in an e-commerce site). There's also nothing especially technically complex about these workflows - unlike Authentication, there aren't any real land mines that could lead to vulnerabilities (beyond those that are inherent in building *any* web page). So, the Django project has made the decision to keep Authentication as a core piece of functionality, but keep registration as a third-party thing. This means that the wider community can contribute alternate approaches. It also means that the core team isn't a bottleneck on progress - django-regsistration has it's own release cycles, bug tracking processes, and so on. This arrangement has worked well for 8 years; it's only because James has stepped down and nobody has volunteered to take over that a problem now exists.  Thanks for your explanation!!  --  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 http://groups.google.com/group/django-users.To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a8450ee8-96a0-4a1e-9071-2740544e5533%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 http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BXe2iaED-arSkS7R1zTrZyTpkLEUBTz_hmJmubT%3Db7%3DaQc9fQ%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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/502341406527661%40web23h.yandex.ru.
For more options, visit https://groups.google.com/d/optout.


Re: Alternative to django-registration (unmaintaned since September 2013)

2014-07-24 Thread Oscar Carballal
Same for me in my personal projects and in our company, we fully switched
to django-allauth and we are quite happy

Regards,
Oscar

--
Oscar Carballal Prego - Senior Software Developer
http://oscarcp.com | @pizte


2014-07-23 8:15 GMT+01:00 Santiago L :

> El sábado, 19 de julio de 2014 02:17:24 UTC+2, Russell Keith-Magee
> escribió:
>
>>
>> On Fri, Jul 18, 2014 at 8:31 PM, Santiago L  wrote:
>>
>>> Hi,
>>>
>>> Some weeks ago I noticed that django-registration is not longer
>>> maintained by
>>> its creator:
>>>
>>> quoting https://bitbucket.org/ubernostrum/django-registration/wiki/Home
>>> > django-registration
>>> > I stepped down as maintainer of this application in September 2013.
>>> Pull
>>> > requests, issues and comments sent to this repository will be ignored.
>>>
>>>
>>> As I'm currently using this app in my project, I wonder if there is any
>>> alternative for django-registration? Maybe someone knows about a fork.
>>>
>>
>> I'm not aware of an active fork. If you're looking to step into open
>> source contribution, this would be a good project to adopt - the code base
>> is stable, so the management overhead should be relatively low.
>>
>
> I like the idea about contributing and get in charge of a fork, but I'm
> not sure about my availability...
>
>
>>
>>
>>> Besides that, I found a related issue report (rejected because is not
>>> the good
>>> place to ask this question, but relevant anyway)[2]
>>>
>>> [2] https://code.djangoproject.com/ticket/13164
>>>
>>> Because there's no single answer to the question.
>>
>> Authentication is a topic that is hard to get right, and there's a very
>> limited number of "right" answers. Passwords *must* be done well, or you
>> risk vulnerability, and what constitutes "well" requires considerable
>> expertise.
>>
>> However, the requirements for registration and signup will vary between
>> projects, and will depend on project requirements. Some projects will need
>> a fully verified personal profile before you can continue; some only
>> require a verified email address; some will allow an email address, but
>> allow later verification, and some will require completely anonymous
>> profiles that are filled in at a critical point in workflow (e.g., at
>> checkout in an e-commerce site).
>>
>> There's also nothing especially technically complex about these workflows
>> - unlike Authentication, there aren't any real land mines that could lead
>> to vulnerabilities (beyond those that are inherent in building *any* web
>> page).
>>
>> So, the Django project has made the decision to keep Authentication as a
>> core piece of functionality, but keep registration as a third-party thing.
>> This means that the wider community can contribute alternate approaches. It
>> also means that the core team isn't a bottleneck on progress -
>> django-regsistration has it's own release cycles, bug tracking processes,
>> and so on.
>>
>> This arrangement has worked well for 8 years; it's only because James has
>> stepped down and nobody has volunteered to take over that a problem now
>> exists.
>>
>>
> Thanks for your explanation!!
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/a8450ee8-96a0-4a1e-9071-2740544e5533%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/a8450ee8-96a0-4a1e-9071-2740544e5533%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> 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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2BXe2iaED-arSkS7R1zTrZyTpkLEUBTz_hmJmubT%3Db7%3DaQc9fQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Alternative to django-registration (unmaintaned since September 2013)

2014-07-24 Thread Scot Hacker
On Friday, July 18, 2014 5:31:14 AM UTC-7, Santiago L wrote:
>
> Hi,
>
> Some weeks ago I noticed that django-registration is not longer maintained 
> by
> its creator:
>

I've switched to django-allauth for my Django projects, which does an 
equally superb job of supporting both social and traditional logins, is 
very well documented, actively supported, and easy to implement. 

https://github.com/pennersr/django-allauth

YMMV. 

./s

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/23766955-9002-40bf-a064-c28e5ada382a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Alternative to django-registration (unmaintaned since September 2013)

2014-07-23 Thread Santiago L
El sábado, 19 de julio de 2014 02:17:24 UTC+2, Russell Keith-Magee escribió:
>
>
> On Fri, Jul 18, 2014 at 8:31 PM, Santiago L  > wrote:
>
>> Hi,
>>
>> Some weeks ago I noticed that django-registration is not longer 
>> maintained by
>> its creator:
>>
>> quoting https://bitbucket.org/ubernostrum/django-registration/wiki/Home
>> > django-registration
>> > I stepped down as maintainer of this application in September 2013. Pull
>> > requests, issues and comments sent to this repository will be ignored.
>>
>>
>> As I'm currently using this app in my project, I wonder if there is any
>> alternative for django-registration? Maybe someone knows about a fork.
>>
>
> I'm not aware of an active fork. If you're looking to step into open 
> source contribution, this would be a good project to adopt - the code base 
> is stable, so the management overhead should be relatively low. 
>

I like the idea about contributing and get in charge of a fork, but I'm not 
sure about my availability...
 

>  
>
>> Besides that, I found a related issue report (rejected because is not the 
>> good
>> place to ask this question, but relevant anyway)[2]
>>
>> [2] https://code.djangoproject.com/ticket/13164
>>
>> Because there's no single answer to the question.
>
> Authentication is a topic that is hard to get right, and there's a very 
> limited number of "right" answers. Passwords *must* be done well, or you 
> risk vulnerability, and what constitutes "well" requires considerable 
> expertise. 
>
> However, the requirements for registration and signup will vary between 
> projects, and will depend on project requirements. Some projects will need 
> a fully verified personal profile before you can continue; some only 
> require a verified email address; some will allow an email address, but 
> allow later verification, and some will require completely anonymous 
> profiles that are filled in at a critical point in workflow (e.g., at 
> checkout in an e-commerce site).
>
> There's also nothing especially technically complex about these workflows 
> - unlike Authentication, there aren't any real land mines that could lead 
> to vulnerabilities (beyond those that are inherent in building *any* web 
> page).
>
> So, the Django project has made the decision to keep Authentication as a 
> core piece of functionality, but keep registration as a third-party thing. 
> This means that the wider community can contribute alternate approaches. It 
> also means that the core team isn't a bottleneck on progress - 
> django-regsistration has it's own release cycles, bug tracking processes, 
> and so on.
>
> This arrangement has worked well for 8 years; it's only because James has 
> stepped down and nobody has volunteered to take over that a problem now 
> exists.
>
>
Thanks for your explanation!! 

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a8450ee8-96a0-4a1e-9071-2740544e5533%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Alternative to django-registration (unmaintaned since September 2013)

2014-07-18 Thread Ovnicraft
On Fri, Jul 18, 2014 at 7:31 AM, Santiago L 
wrote:

> Hi,
>
> Some weeks ago I noticed that django-registration is not longer maintained
> by
> its creator:
>
> quoting https://bitbucket.org/ubernostrum/django-registration/wiki/Home
> > django-registration
> > I stepped down as maintainer of this application in September 2013. Pull
> > requests, issues and comments sent to this repository will be ignored.
>
>
> As I'm currently using this app in my project, I wonder if there is any
> alternative for django-registration? Maybe someone knows about a fork.
>

I dont know about a fork but you can give a try to django-user-account[1]
from pinax team.

Regards,

[1] https://github.com/pinax/django-user-accounts


> Besides that, I found a related issue report (rejected because is not the
> good
> place to ask this question, but relevant anyway)[2]
>
> [2] https://code.djangoproject.com/ticket/13164
>
>
> Thanks!
> Best regards,
>
> Santiago
>
> --
> 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 http://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/bdba6d6b-b20d-4de1-836e-3bcb4bf4c808%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/bdba6d6b-b20d-4de1-836e-3bcb4bf4c808%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 

[image: Cristian Salamea on about.me]

Cristian Salamea
about.me/ovnicraft
<http://about.me/ovnicraft>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B16coMS4gO2VJGaq7y8Ukz6vDJqHVyRm8RGH3dkgX%2Br9knt5A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Alternative to django-registration (unmaintaned since September 2013)

2014-07-18 Thread Russell Keith-Magee
On Fri, Jul 18, 2014 at 8:31 PM, Santiago L 
wrote:

> Hi,
>
> Some weeks ago I noticed that django-registration is not longer maintained
> by
> its creator:
>
> quoting https://bitbucket.org/ubernostrum/django-registration/wiki/Home
> > django-registration
> > I stepped down as maintainer of this application in September 2013. Pull
> > requests, issues and comments sent to this repository will be ignored.
>
>
> As I'm currently using this app in my project, I wonder if there is any
> alternative for django-registration? Maybe someone knows about a fork.
>

I'm not aware of an active fork. If you're looking to step into open source
contribution, this would be a good project to adopt - the code base is
stable, so the management overhead should be relatively low.


> Besides that, I found a related issue report (rejected because is not the
> good
> place to ask this question, but relevant anyway)[2]
>
> [2] https://code.djangoproject.com/ticket/13164
>
> Because there's no single answer to the question.

Authentication is a topic that is hard to get right, and there's a very
limited number of "right" answers. Passwords *must* be done well, or you
risk vulnerability, and what constitutes "well" requires considerable
expertise.

However, the requirements for registration and signup will vary between
projects, and will depend on project requirements. Some projects will need
a fully verified personal profile before you can continue; some only
require a verified email address; some will allow an email address, but
allow later verification, and some will require completely anonymous
profiles that are filled in at a critical point in workflow (e.g., at
checkout in an e-commerce site).

There's also nothing especially technically complex about these workflows -
unlike Authentication, there aren't any real land mines that could lead to
vulnerabilities (beyond those that are inherent in building *any* web page).

So, the Django project has made the decision to keep Authentication as a
core piece of functionality, but keep registration as a third-party thing.
This means that the wider community can contribute alternate approaches. It
also means that the core team isn't a bottleneck on progress -
django-regsistration has it's own release cycles, bug tracking processes,
and so on.

This arrangement has worked well for 8 years; it's only because James has
stepped down and nobody has volunteered to take over that a problem now
exists.

Yours,
Russ Magee %-)

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJxq848i_UPVh9fhq0wTQ_0aWpAQa%3DA-fETtuMc4FK4u4HDdSw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Alternative to django-registration (unmaintaned since September 2013)

2014-07-18 Thread Santiago L
Hi,

Some weeks ago I noticed that django-registration is not longer maintained 
by
its creator:

quoting https://bitbucket.org/ubernostrum/django-registration/wiki/Home
> django-registration
> I stepped down as maintainer of this application in September 2013. Pull
> requests, issues and comments sent to this repository will be ignored.


As I'm currently using this app in my project, I wonder if there is any
alternative for django-registration? Maybe someone knows about a fork.

Besides that, I found a related issue report (rejected because is not the 
good
place to ask this question, but relevant anyway)[2]

[2] https://code.djangoproject.com/ticket/13164


Thanks!
Best regards,

Santiago

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bdba6d6b-b20d-4de1-836e-3bcb4bf4c808%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: UserProfile.user" must be a "User" instance. django-registration

2014-06-10 Thread Jimish Parekh
Hey Nikhil,
I might be wrong but please check your UserProfile model

   - In your __Unicode(something) function check for syntax error. i think 
   it should be __Unicode__
   - And why are you trying to return full name of User. I think you should 
   return self.user there so that when you are requesting back you can get 
   User Object back

If these answers are wrong and feels like bullshit then pls ignore... I am 
also trying to learn:)
Thanks,

On Monday, July 2, 2012 6:47:03 PM UTC+5:30, Nikhil Verma wrote:
>
> HI All
>
> I am applying an django-registration in my app. So i create a UserProfile 
> Model and  a ModelForm after clicking on the email link
> the user is redirected to the ModelForm page of UserProfile. I am filling 
> the details and trying to save it, however i am getting the above error.
>
>
> Traceback:-
>
>
> Exception Type: ValueError at /myprofile/completingprofile/
> Exception Value: Cannot assign " object at 0x3487c10>": "UserProfile.user" must be a "User" instance.
>
>
> model
>
> class UserProfile(models.Model):
> user = models.ForeignKey(User, blank=True, null=True, unique=True)
> first_name = models.CharField(max_length=30)
> last_name = models.CharField(max_length=30, blank=True)
> gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
> mobile = models.CharField(max_length=15, blank=True)
> primary_email = models.EmailField(max_length=60, blank=True)
>
> # For professional Account
> institution_name = 
> models.CharField(max_length=100,blank=True,null=True)
>
> street = models.CharField(max_length=75)
> state = models.CharField(max_length=30)
> zip_code = models.IntegerField(max_length=7, blank=True, null=True)
> country = models.CharField(max_length=30, blank=True)
> 
>
> def __unicode(self):
> name = self.first_name + self.last_name
> return name
>
>
> form.py
>
> class UserProfileForm(ModelForm):
> class Meta:
> model = UserProfile
> exclude = ('user',)
> 
> def __init__(self, *args, **kwargs):
> super(UserProfileForm, self).__init__(*args, **kwargs)
>
>
>
> views.py 
>
> def completingprofile(request):
> """
> Creating Profile
> """
> print request
> if request.method == "POST":
> 
> form = UserProfileForm(request.POST)
> if form.is_valid():
> userprofile_obj = UserProfile(
> first_name = form.cleaned_data['first_name'],
> last_name = 
> form.cleaned_data['last_name'],
> gender = form.cleaned_data['gender'],
> mobile = form.cleaned_data['mobile'],
> institution_name = form.cleaned_data['institution_name'],
>     street = form.cleaned_data['street'],
> zip_code = form.cleaned_data['zip_code'],
> state = form.cleaned_data['state'],
> country = form.cleaned_data['country'],
> user = request.user,# here i am trying to add user from 
> request who is coming from RegistrationForm from django -registration
># I am getting the error in this above line  
> )
> userprofile_obj.save()
> logger.info("Save profile for user: %s" % request.user)
> 
> return HttpResponseRedirect('/thanks/')
> else:
> form = UserProfileForm()
> return render_to_response("myprofile/profile_page.html", 
> {"form": form },
> context_instance=RequestContext(request)
> )
>  
> How can i save the user field ?
>
>
> Thanks for help in advance
>
> -- 
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/12436236-8cee-4ce0-bd71-e15fe1b730d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: UserProfile.user" must be a "User" instance. django-registration

2014-06-09 Thread 曾阿牛
I have the same problem.

Nikhil Verma於 2012年7月2日星期一UTC+8下午9時17分03秒寫道:
>
> HI All
>
> I am applying an django-registration in my app. So i create a UserProfile 
> Model and  a ModelForm after clicking on the email link
> the user is redirected to the ModelForm page of UserProfile. I am filling 
> the details and trying to save it, however i am getting the above error.
>
>
> Traceback:-
>
>
> Exception Type: ValueError at /myprofile/completingprofile/
> Exception Value: Cannot assign " object at 0x3487c10>": "UserProfile.user" must be a "User" instance.
>
>
> model
>
> class UserProfile(models.Model):
> user = models.ForeignKey(User, blank=True, null=True, unique=True)
> first_name = models.CharField(max_length=30)
> last_name = models.CharField(max_length=30, blank=True)
> gender = models.CharField(max_length=1, choices=GENDER_CHOICES)
> mobile = models.CharField(max_length=15, blank=True)
> primary_email = models.EmailField(max_length=60, blank=True)
>
> # For professional Account
> institution_name = 
> models.CharField(max_length=100,blank=True,null=True)
>
> street = models.CharField(max_length=75)
> state = models.CharField(max_length=30)
> zip_code = models.IntegerField(max_length=7, blank=True, null=True)
> country = models.CharField(max_length=30, blank=True)
> 
>
> def __unicode(self):
> name = self.first_name + self.last_name
> return name
>
>
> form.py
>
> class UserProfileForm(ModelForm):
> class Meta:
> model = UserProfile
> exclude = ('user',)
> 
> def __init__(self, *args, **kwargs):
> super(UserProfileForm, self).__init__(*args, **kwargs)
>
>
>
> views.py 
>
> def completingprofile(request):
> """
> Creating Profile
> """
> print request
> if request.method == "POST":
> 
> form = UserProfileForm(request.POST)
> if form.is_valid():
> userprofile_obj = UserProfile(
> first_name = form.cleaned_data['first_name'],
> last_name = 
> form.cleaned_data['last_name'],
> gender = form.cleaned_data['gender'],
> mobile = form.cleaned_data['mobile'],
> institution_name = form.cleaned_data['institution_name'],
>     street = form.cleaned_data['street'],
> zip_code = form.cleaned_data['zip_code'],
> state = form.cleaned_data['state'],
> country = form.cleaned_data['country'],
> user = request.user,# here i am trying to add user from 
> request who is coming from RegistrationForm from django -registration
># I am getting the error in this above line  
> )
> userprofile_obj.save()
> logger.info("Save profile for user: %s" % request.user)
> 
> return HttpResponseRedirect('/thanks/')
> else:
> form = UserProfileForm()
> return render_to_response("myprofile/profile_page.html", 
> {"form": form },
> context_instance=RequestContext(request)
> )
>  
> How can i save the user field ?
>
>
> Thanks for help in advance
>
> -- 
> Regards
> Nikhil Verma
> +91-958-273-3156
>
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/a116b9c8-09aa-451d-9090-05b2bbcc9a92%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Using custom user (AbstractUser) and django-registration

2014-06-05 Thread Arnaud Vandecasteele
Hi guys,

I've been trying the whole day to use django-registration with a custom
user model.
Basically this is what I did :

*1/ Create a custom user model (models.py)*

class customUser(AbstractUser):
company_name = models.CharField(max_length=255)

--> My first question is do I need to add "objects = UserManager()" to my
model ?

*2/ Register my new user in the admin interface*

from django.contrib import admin
from django.contrib.auth.models import Group

from .models import customUser
admin.site.register(customUser)


*3/ Add my customUser to my settings.py*AUTH_USER_MODEL = 'myApp.customUser'

*Ok from this point everything works fine ! *

But my next step was to use django-registration [1] to have a full user
creation workflow.
After the installation, when I've tried to register a new user using the
registration forms, Django raised this error:
*django Manager isn't available; User has been swapped *

I've tried different things but none of them have worked.
The only solution I found [2] is by modifying directly django-registration:

Edit registration/forms.py, in the top change
from django.contrib.auth.models import User

to

from django.contrib.auth import get_user_model
User = get_user_model()

While I really don't like to change an existing application, after this
change I was able to use both django-registration and my custom user.

So I'm sure you can guess my question, is there no other way to do this ? I
really would like to keep my code clean without this kind of dirty hack.

Thanks

Arnaud


[1] https://django-registration.readthedocs.org/en/latest/#
[2] https://sulami.github.io/django-tweaking-custom-user-model-fixes.html

-- 

Arnaud Vandecasteele
SIG - WebMapping - Spatial Ontology - GeoCollaboration

Web Site
http://www.marinegis.com/?page_id=131
http://geotribu.net/

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHZ2jmCiTF0wCcMcwHCc3muBuxwThyo6C0ivFPPEG80NknTW5g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django Registration Customization Problem

2014-03-24 Thread Abbas Sheikh
Hello All,

I want the following registration workflow in my app.

   1. User enters his email and is automatically logged-in to the app. The 
   user can play with the app, and it would logout the user after 30 minutes.
   2. Meanwhile an activation email goes out to user's email that would
  1. Confirm his email address
  2. Redirects the user to a new page where he enters his first/last 
  name and password
  3. User can now login to the app his new password.

To implement this workflow, I customized registration 
backend(registration.backends.default.DefaultBackend). Specifically, I have 
override the 'post_activation_redirect' method to redirect the user to his 
profile update page. Where he enters his name and password and submits 
data. 

> from registration.backends.default import DefaultBackend
>
> class CustomBackend(DefaultBackend):
>
> def post_activation_redirect(self, request, user):
> """
> Return the name of the URL to redirect to after successful
> account activation.
> 
> """
> return ('update_user_profile', (user, ), {})
>
However, the problem is that when user clicks on activation link his email 
is validated and activation_key expires. Now if user does not fill his 
profile information at that point in time, the activation link would no 
longer redirect him to profile update page because the activation key has 
expired. 

Please advise how to solve this problem. 

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/af58f0cf-8419-42fb-bebc-fca777c47cfc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Combining example Polls app with django-registration

2013-10-10 Thread Alex Koudrin
I'm learning Django (Ubuntu 13.04, Python 2.7, Django 1.5, Postgres 9.2, 
Bootstrap 3.0). As my first effort I got the Polls app going from the Django 
1.5 tutorial <https://docs.djangoproject.com/en/1.5/intro/tutorial01/>. I 
then installed django-registration 
1.0<https://django-registration.readthedocs.org/en/latest>and these 
templates <https://github.com/macdhuibh/django-registration-templates> to 
make it work. I chose that package for authentication as opposed to 
django-allauth <http://django-allauth.readthedocs.org/en/latest/> as a result 
of my question on 
StackOverflow<http://stackoverflow.com/questions/19026916/simplest-django-authentication-package-to-use-as-of-oct-2013>.
 


What I want to do now is to integrate these two apps so that the polls are 
not anonymous. After the poll results have been collected, a script is run 
to analyse the results and send an email to each user about how they did as 
compared to total or average. The script and the emailing could be done via 
Python, but even better should really be initialised via the Admin 
interface by site admin.

At first pass I was thinking roughly the following. The poll & choice could 
be simplified down to just a numeric answer to a question. At database 
level we would need a separate table. The primary key would be the userid. 
Each column would store one answer per. I'm guessing this would need a 
class PollsResults in model.py that would include defining the primary key 
as "User", which should exist via django-registration. Exactly how to do 
that and what follows gets a bit hazy to me at the moment.

At the moment my knowledge of Django is so light that I'm struggling to put 
two and two together in an elegant way. I have briefly looked at Light 
Bird's Questionnaire <http://lightbird.net/dbe2/questionnaire.html>, but 
decided it was too complicated using his own library of modular class based 
views. I'd like to keep it as simple as possible, using as much of 
out-of-the-box Django 1.5 functionality as possible.

I also looked at Pinax, but it seems to be stuck in dark ages with latest 
stuff supporting Django 1.4 and Bootstrap 2.x. Documentation looks poor 
too. It looks like a great concept - half-way house between a web framework 
and a CMS. But if only it had a larger following and be more up-to-date 
with a variety of starter projects (e.g. a Questionnaire/Polls type starter 
project where users enter data and then some processing happens etc).

I'm sure it's a simple exercise for any good Django dev to essentially 
combine django-registration with a result against each user, which can then 
be processed/emailed/etc.

Could anyone give any hints or maybe even point me to an example of 
something similar that could give me a starting point of modifying things 
rather than creating from scratch?

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c431b06a-6bc2-4fca-80b2-73543af2540e%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: django-registration: extending the user model

2013-10-07 Thread N8
If you mean that the User model doesnt have fields you may want, like 
telephone or address i.e., the best and easiest way is to use add a 
UserProfile model with a foreignkey to the User model.  Django-profiles is 
one and it's meant for use with django-registration> 
 https://bitbucket.org/ubernostrum/django-profiles



On Sunday, 6 October 2013 16:43:57 UTC+2, +Emmanuel wrote:
>
> Hi,
> I am looking for a comprehensive tutorial on how I can extend the default 
> user model using django-registration, specifically for Django 1.5 and 
> django-registration 1.0
> Thanks!
>

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/99fc23b6-7fc1-465d-8a94-5d710dbbca27%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


django-registration: extending the user model

2013-10-06 Thread +Emmanuel
Hi,
I am looking for a comprehensive tutorial on how I can extend the default 
user model using django-registration, specifically for Django 1.5 and 
django-registration 1.0
Thanks!

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b0c71f91-b977-4d06-8f58-f3ff17ce893c%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Two sets of registration with django-registration

2013-10-02 Thread Vibhu Rishi
hi

I have updated and using All Auth now. I also liked it that i can do the
social logins and the linkedin login seems to be working so far :)

Can you point me to documentation on how to ovveride the methods ? I dont
know so much about this part of django and am a bit at a loss in my
implementation.

vibhu


On Tue, Sep 24, 2013 at 7:32 AM, Vibhu Rishi  wrote:

> Thanks for the pointer. Will check out all auth.
>
> V.
>
>
> On Tue, Sep 24, 2013 at 4:03 AM, Kamil Gałuszka wrote:
>
>>
>> Of course.
>>
>> First of all I would recommend you using of django-allauth. They are
>> having great docs and they support custom user model. django-registration
>> is little less maintained and maybe less suitable for your needs.
>>
>> First you define your custom form in settings.py:
>> SIGNUP_FORM_CLASS
>>
>> Then you are inherit this class
>> https://github.com/pennersr/django-allauth/blob/master/allauth/account/adapter.pyand
>>  override method save_user to actually do what you want.
>>
>> And that is it. Is just that simple
>>
>> Cheers
>> Kamil
>>
>>
>>
>>
>> On Monday, September 23, 2013 7:32:38 PM UTC+2, Vibhu Rishi wrote:
>>>
>>> Hi,
>>>
>>> I have 2 types of users with different views of the same page . Using
>>> django-registration, I have been able to setup all the signup/password
>>> change etc for one level of users - say students.
>>>
>>> Now I want to have another set of registrations for Teachers. Is there a
>>> way to achieve that ?
>>>
>>> Vibhu
>>>
>>> --
>>> Simplicity is the ultimate sophistication. - Leonardo da Vinci
>>> Life is really simple, but we insist on making it complicated. -
>>> Confucius
>>>
>>  --
>> 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 http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Simplicity is the ultimate sophistication. - Leonardo da Vinci
> Life is really simple, but we insist on making it complicated. - Confucius
>



-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPiONw%3DSGHvprmV3QYF967i7Ce5z1hQZsPH-%3DDJdoSHpwrMSeg%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Two sets of registration with django-registration

2013-09-23 Thread Vibhu Rishi
Thanks for the pointer. Will check out all auth.

V.


On Tue, Sep 24, 2013 at 4:03 AM, Kamil Gałuszka  wrote:

>
> Of course.
>
> First of all I would recommend you using of django-allauth. They are
> having great docs and they support custom user model. django-registration
> is little less maintained and maybe less suitable for your needs.
>
> First you define your custom form in settings.py:
> SIGNUP_FORM_CLASS
>
> Then you are inherit this class
> https://github.com/pennersr/django-allauth/blob/master/allauth/account/adapter.pyand
>  override method save_user to actually do what you want.
>
> And that is it. Is just that simple
>
> Cheers
> Kamil
>
>
>
>
> On Monday, September 23, 2013 7:32:38 PM UTC+2, Vibhu Rishi wrote:
>>
>> Hi,
>>
>> I have 2 types of users with different views of the same page . Using
>> django-registration, I have been able to setup all the signup/password
>> change etc for one level of users - say students.
>>
>> Now I want to have another set of registrations for Teachers. Is there a
>> way to achieve that ?
>>
>> Vibhu
>>
>> --
>> Simplicity is the ultimate sophistication. - Leonardo da Vinci
>> Life is really simple, but we insist on making it complicated. -
>> Confucius
>>
>  --
> 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 http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Two sets of registration with django-registration

2013-09-23 Thread Kamil Gałuszka

Of course.

First of all I would recommend you using of django-allauth. They are having 
great docs and they support custom user model. django-registration is 
little less maintained and maybe less suitable for your needs.

First you define your custom form in settings.py:
SIGNUP_FORM_CLASS

Then you are inherit this class 
https://github.com/pennersr/django-allauth/blob/master/allauth/account/adapter.py
 
and override method save_user to actually do what you want. 

And that is it. Is just that simple

Cheers
Kamil 



On Monday, September 23, 2013 7:32:38 PM UTC+2, Vibhu Rishi wrote:
>
> Hi, 
>
> I have 2 types of users with different views of the same page . Using 
> django-registration, I have been able to setup all the signup/password 
> change etc for one level of users - say students. 
>
> Now I want to have another set of registrations for Teachers. Is there a 
> way to achieve that ? 
>
> Vibhu
>
> -- 
> Simplicity is the ultimate sophistication. - Leonardo da Vinci
> Life is really simple, but we insist on making it complicated. - Confucius 
>

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Two sets of registration with django-registration

2013-09-23 Thread Vibhu Rishi
Hi,

I have 2 types of users with different views of the same page . Using
django-registration, I have been able to setup all the signup/password
change etc for one level of users - say students.

Now I want to have another set of registrations for Teachers. Is there a
way to achieve that ?

Vibhu

-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-Registration compatible with 1.5.2?

2013-09-11 Thread René Fleschenberg
Hi,

Andre Lopes:
> I need to user a registration app for Django 1.5.2. I'm a little bit
> confused on what app to use.

I use django-registration==1.0 from PyPi with Django 1.5. Works for me.

Regards,
René

-- 
René Fleschenberg

Am Stadtgarten 28, 45276 Essen, Germany
Phone: +49 1577 170 7363
E-Mail: r...@fleschenberg.net

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Django-Registration compatible with 1.5.2?

2013-09-08 Thread Andre Lopes
Hi,

I need to user a registration app for Django 1.5.2. I'm a little bit
confused on what app to use.

Currently 
django-registration(https://bitbucket.org/ubernostrum/django-registration)
is compatible with Django 1.5.2?

If not, what app should I use?


Best Regards,

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Customize error messages for django-registration

2013-09-05 Thread Tony Lâmpada
Hi, I have a question about django-registration (
https://bitbucket.org/ubernostrum/django-registration), but I can't find 
their issue tracker or a mailing list for it, so I'll try mu luck here.

My application enables login via OpenID and login/password.

Some users "forget their password" on FS on try to reset it 
(here<http://freedomsponsors.org/accounts/password/reset/>), 
but then they get the message:

The user account associated with this e-mail address cannot reset the 
> password.

 
With no further explanations.
(You can try and reset *my* password - just type my email (tonylampada at 
gmail dot com) there to see the error message.

I want to customize that message. A better message would be:

The user account associated with this e-mail address cannot reset the 
> password.
> This happens because the user account was created with an OpenID or OAuth 
> provider (tipically Google, Facebook, MyOpenID, etc). 

To see the login provider(s) associated with this account, take a look at 
> the user profile <http://freedomsponsors.org/core/user/2/tonylampada>.


What is the easiest way to tell django-registration that?

Thanks!

PS: This issue on github: 
https://github.com/freedomsponsors/www.freedomsponsors.org/issues/191 (just 
in case you're feeling like making a pull request today :-))

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-registration reset password templates not getting picked up

2013-09-03 Thread Kelvin Wong
I put the overridden templates (auth, registration, etc) in a project 
templates folder in the project root. You have to set it up though in your 
settings.py as I noted earlier. The filesystem loader is still right there 
above the app_directories loader. To me the overridden templates don't seem 
to make sense in an app even if it does nothing but serve the homepage.

Templates that belong to certain apps are put into application templates 
folders. That makes more sense to me.

This is just personal dogma though.

K



On Tuesday, September 3, 2013 9:59:24 AM UTC-7, Vibhu Rishi wrote:
>
>
> I was doing all my templates within a single directory pre 1.5 . But then 
> in 1.5 they changed it, so I got a bit confused but then started putting 
> the templates within the app. Not sure if this is good or bad.
>

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-registration reset password templates not getting picked up

2013-09-03 Thread Vibhu Rishi
Hi Kevin,

You were absolutely correct. Moving 'homepage' to the top made it work.
Thanks!

I was doing all my templates within a single directory pre 1.5 . But then
in 1.5 they changed it, so I got a bit confused but then started putting
the templates within the app. Not sure if this is good or bad.

Vibhu


On Tue, Sep 3, 2013 at 7:55 AM, Kelvin Wong  wrote:

> Check that your 'homepage' app is above the 'registration' app:
>
> INSTALLED_APPS = (
> 'homepage',  # Order matters, this is loaded before others
> 'registration',
> 'django.contrib.auth',
>...
> )
>
> Order of the apps is significant. Review
>
>
> https://docs.djangoproject.com/en/dev/ref/templates/api/#django.template.loaders.app_directories.Loader
>
> As a matter of personal style, I would put them in a project template
> folder and not in an app templates folder.
>
> K
>
>
>
> On Monday, September 2, 2013 7:01:30 PM UTC-7, Vibhu Rishi wrote:
>>
>> Essentially the below should work (and is working for all) as I have the
>> following template loader:
>>
>> TEMPLATE_LOADERS = (
>> 'django.template.loaders.**filesystem.Loader',
>> 'django.template.loaders.app_**directories.Loader',
>> )
>>
>  --
> 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 http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Kelvin Wong
Check that your 'homepage' app is above the 'registration' app:

INSTALLED_APPS = (
'homepage',  # Order matters, this is loaded before others
'registration',
'django.contrib.auth',
   ...
)

Order of the apps is significant. Review

https://docs.djangoproject.com/en/dev/ref/templates/api/#django.template.loaders.app_directories.Loader

As a matter of personal style, I would put them in a project template 
folder and not in an app templates folder.

K



On Monday, September 2, 2013 7:01:30 PM UTC-7, Vibhu Rishi wrote:
>
> Essentially the below should work (and is working for all) as I have the 
> following template loader:
>
> TEMPLATE_LOADERS = (
> 'django.template.loaders.filesystem.Loader',
> 'django.template.loaders.app_directories.Loader',
> )
>

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
Essentially the below should work (and is working for all) as I have the
following template loader:

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

Vibhu

On Tue, Sep 3, 2013 at 7:21 AM, Vibhu Rishi  wrote:

> I have a module called homepage and they reside in that. Path is as
> follows :
>
> $ ls homepage/templates/registration/
> *activate.htmlpassword_change_form.html
> *activation_complete.html  password_reset_complete.html
> *activation_email_subject.txt  password_reset_confirm.html
> *activation_email.txt  password_reset_done.html
> *base.html password_reset_email.html
> *login_error.html  password_reset_form.html
> *login.html*registration_complete.html
> *logout.html   *registration_form.html
> password_change_done.html
>
> The ones with * are being picked up (* added after the ls command :) ).
> Others are not.
>
> Vibhu
>
>
> On Tue, Sep 3, 2013 at 6:58 AM, Kelvin Wong  wrote:
>
>> If you are not using a templates folder in your project root, where are
>> your registration templates located?
>>
>> K
>>
>>
>> On Monday, September 2, 2013 9:42:50 AM UTC-7, Vibhu Rishi wrote:
>>
>>>
>>> So far, all the other template html files get picked up - except the
>>> ones related to the password management ones.
>>>
>>> Vibhu
>>>
>>  --
>> 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 http://groups.google.com/group/django-users.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>
>
>
> --
> Simplicity is the ultimate sophistication. - Leonardo da Vinci
> Life is really simple, but we insist on making it complicated. - Confucius
>



-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
I have a module called homepage and they reside in that. Path is as follows
:

$ ls homepage/templates/registration/
*activate.htmlpassword_change_form.html
*activation_complete.html  password_reset_complete.html
*activation_email_subject.txt  password_reset_confirm.html
*activation_email.txt  password_reset_done.html
*base.html password_reset_email.html
*login_error.html  password_reset_form.html
*login.html*registration_complete.html
*logout.html   *registration_form.html
password_change_done.html

The ones with * are being picked up (* added after the ls command :) ).
Others are not.

Vibhu


On Tue, Sep 3, 2013 at 6:58 AM, Kelvin Wong  wrote:

> If you are not using a templates folder in your project root, where are
> your registration templates located?
>
> K
>
>
> On Monday, September 2, 2013 9:42:50 AM UTC-7, Vibhu Rishi wrote:
>
>>
>> So far, all the other template html files get picked up - except the ones
>> related to the password management ones.
>>
>> Vibhu
>>
>  --
> 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 http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Kelvin Wong
If you are not using a templates folder in your project root, where are 
your registration templates located?

K


On Monday, September 2, 2013 9:42:50 AM UTC-7, Vibhu Rishi wrote:
>
>
> So far, all the other template html files get picked up - except the ones 
> related to the password management ones. 
>
> Vibhu
>

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-registration reset password templates not getting picked up

2013-09-02 Thread Vibhu Rishi
Thanks Kelvin for the response. However, I am not sure I understand why
this is to be done.

currently my TEMPLATE_DIRS is not having anything. it is as follows:
TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or
"C:/www/django/templates".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
)

So far, all the other template html files get picked up - except the ones
related to the password management ones.

Vibhu



On Mon, Sep 2, 2013 at 6:37 AM, Kelvin Wong  wrote:

> TEMPLATE_DIRS needs to have the location of the templates. As long as
> those templates are being picked up and one is called
> 'password_reset_form.html' it should work.
>
> One of my apps has this form at:
>
> /my_project/templates_global/registration/password_reset_form.html
>
> In /my_project/my_project/settings.py
>
> PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
>
> TEMPLATE_DIRS = (
> os.path.join(PROJECT_ROOT, 'templates_global')
> )
>
> The templates were all copied
> from django.contrib.admin.templates.registration
>
> K
>
>
> On Saturday, August 31, 2013 11:02:14 PM UTC-7, Vibhu Rishi wrote:
>
>> I am getting a bit of a problem with django-registration
>>
>> what else do i need to do ? As per the django-registration documentation,
>> the auth_urls.py is supposed to be automatically included with the default
>> backend. But apparently, there is some disconnect here.
>>
>  --
> 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 http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
>



-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django-registration reset password templates not getting picked up

2013-09-01 Thread Kelvin Wong
TEMPLATE_DIRS needs to have the location of the templates. As long as those 
templates are being picked up and one is called 'password_reset_form.html' 
it should work.

One of my apps has this form at:

/my_project/templates_global/registration/password_reset_form.html

In /my_project/my_project/settings.py

PROJECT_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))

TEMPLATE_DIRS = (
os.path.join(PROJECT_ROOT, 'templates_global')
)

The templates were all copied 
from django.contrib.admin.templates.registration

K


On Saturday, August 31, 2013 11:02:14 PM UTC-7, Vibhu Rishi wrote:
>
> I am getting a bit of a problem with django-registration
>
> what else do i need to do ? As per the django-registration documentation, 
> the auth_urls.py is supposed to be automatically included with the default 
> backend. But apparently, there is some disconnect here. 
>

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Django-registration reset password templates not getting picked up

2013-08-31 Thread Vibhu Rishi
I am getting a bit of a problem with django-registration

django-registration was installed in a venv using pip. I have version 1.0
of django-registration and 1.5.1 of Django . I have the
templates/registration directory with the templates for the pages that are
to display the different pages.
login, logout, register work fine. Proper templates get picked up - and I
have modified them according to my needs.

However, now I am trying to loop in the password reset functionality.
However, when I hit the URL http://127.0.0.1:8000/accounts/password/reset/ it
is picking up the default django admin reset url. I cant get this to pickup
my templates. Following are my settings:

in settings.py :

INSTALLED_APPS = (
'registration',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.messages',
   ...
)

in urls.py

urlpatterns = patterns('',
#django-registration
url(r'^accounts/',include('registration.backends.default.urls')),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
   ...
)

what else do i need to do ? As per the django-registration documentation,
the auth_urls.py is supposed to be automatically included with the default
backend. But apparently, there is some disconnect here.

Regards,
Vibhu
-- 
Simplicity is the ultimate sophistication. - Leonardo da Vinci
Life is really simple, but we insist on making it complicated. - Confucius

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.


Re: django-registration ImportError

2013-07-21 Thread Mike


On Sunday, July 21, 2013 5:20:36 PM UTC+2, donarb wrote:
>
>
>
> On Saturday, July 20, 2013 9:23:37 PM UTC-7, Mike wrote:
>>
>> I just updated django-registration to 1.0 (from 0.8) and now I get an 
>> ImportError:
>>
>> ImportError: cannot import name activate
>>
>>
>> /Users/mike/sieve-django/SIEVEENV/lib/python2.7/site-packages/registration_email/backends/default/urls.py
>>  in 
>>
>>1. 
>>
>>from registration.views import activate, register
>>
>>
>>
>> Has anyone else had this problem? For now I'll revert to 0.8.
>>
>
>
> The package has been rewritten to use class based views. The activate 
> method (as well as the register method) no longer exists by itself, it's a 
> method in the ActivationView class.
>
> Check the documentation for information on how to upgrade:
>
> https://django-registration.readthedocs.org
>  
>
Hi - Thanks.  yes, I didn't read the docs.  Also, it seems that 
django-registration-email 0.5.4 is not compatible with django-registration 
1.0   

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django-registration ImportError

2013-07-21 Thread donarb


On Saturday, July 20, 2013 9:23:37 PM UTC-7, Mike wrote:
>
> I just updated django-registration to 1.0 (from 0.8) and now I get an 
> ImportError:
>
> ImportError: cannot import name activate
>
>
> /Users/mike/sieve-django/SIEVEENV/lib/python2.7/site-packages/registration_email/backends/default/urls.py
>  in 
>
>1. 
>
>from registration.views import activate, register
>
>
>
> Has anyone else had this problem? For now I'll revert to 0.8.
>


The package has been rewritten to use class based views. The activate 
method (as well as the register method) no longer exists by itself, it's a 
method in the ActivationView class.

Check the documentation for information on how to upgrade:

https://django-registration.readthedocs.org
 

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




django-registration ImportError

2013-07-20 Thread Mike
I just updated django-registration to 1.0 (from 0.8) and now I get an 
ImportError:

ImportError: cannot import name activate

/Users/mike/sieve-django/SIEVEENV/lib/python2.7/site-packages/registration_email/backends/default/urls.py
 in 

   1. 
   
   from registration.views import activate, register
   
   

Has anyone else had this problem? For now I'll revert to 0.8.

-- 
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 http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




RE: problem with extending django registration form

2013-05-31 Thread Babatunde Akinyanmi
I'm guessing you want to store more information than default registration
allows you to when signing up users.

First hijack the URL for displaying the registration form so go to your
urls.py file and add this:

from path.to.form import CustomForm

urlpatterns = patterns('',
#hijack this from registration
url(r'^accounts/register/$', 'registration.views.register',
{
 'backend':'path.to.custom.CustomBackend'},
name='registration_register'),
url(r'^accounts/', include('registration.backends.default.urls')),
...
)

In your CustomBackend, your `get_form_class` method should return the form
that you want for registering users. Your register and activate methods
should take care of saving additional information to your defined User
Profile. The work flow of Registration's DefaultBackend class
(registration.backends.default) is usually sufficient so backend can just
inherit from it.

Check registration's source for inspiration and holla if you still need
assistance.

Sent from my Windows Phone
--
From: Okorie Emmanuel
Sent: 5/31/2013 4:26 PM
To: django-users@googlegroups.com
Cc: Okorie Emmanuel
Subject: Re: problem with extending django registration form



On Thursday, May 30, 2013 2:08:46 PM UTC+1, Tundebabzy wrote:
>
> Hi,
> Have you been able to sort out this issue?
> Why don't you create your own backend and shoe horn it into
> django-registration. You'll need to implement register, activate,
> registration_allowed, get_form_class, post_registration_redirect and
> post_activation_redirect methods (as needed) though.
>
> Sent from my Windows Phone
>
> -Original Message-
> From: Okorie Emmanuel
> Sent: 5/21/2013 3:04 PM
> To: django...@googlegroups.com 
> Subject: problem with extending django registration form
>
> hi
>
> I have tried extending django registration page with little progress.
> I can now add new user from the admin but cannot do that on the
> front end. the problem is that the url does not display the from,
> but raises exception, "the page cannot be found". Do I need to create a
> view.py
> to be able to use  django registration app?
>
> here is my code
>
> http://pastebin.com/JBa8J1ry
>
> is there anything i have not
>



thanks tundebabzy for your reply

I have not solved the problem
The issue is that i don't understand how to implement the backend like you
suggest
can you give me a clue on this. thanks


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

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




Re: problem with extending django registration form

2013-05-31 Thread Okorie Emmanuel


On Thursday, May 30, 2013 2:08:46 PM UTC+1, Tundebabzy wrote:
>
> Hi, 
> Have you been able to sort out this issue? 
> Why don't you create your own backend and shoe horn it into 
> django-registration. You'll need to implement register, activate, 
> registration_allowed, get_form_class, post_registration_redirect and 
> post_activation_redirect methods (as needed) though. 
>
> Sent from my Windows Phone 
>
> -Original Message- 
> From: Okorie Emmanuel 
> Sent: 5/21/2013 3:04 PM 
> To: django...@googlegroups.com  
> Subject: problem with extending django registration form 
>
> hi 
>
> I have tried extending django registration page with little progress. 
> I can now add new user from the admin but cannot do that on the 
> front end. the problem is that the url does not display the from, 
> but raises exception, "the page cannot be found". Do I need to create a 
> view.py 
> to be able to use  django registration app? 
>
> here is my code 
>
> http://pastebin.com/JBa8J1ry 
>
> is there anything i have not 
>



thanks tundebabzy for your reply

I have not solved the problem 
The issue is that i don't understand how to implement the backend like you 
suggest
can you give me a clue on this. thanks
  

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




RE: problem with extending django registration form

2013-05-30 Thread Babatunde Akinyanmi
Hi,
Have you been able to sort out this issue?
Why don't you create your own backend and shoe horn it into
django-registration. You'll need to implement register, activate,
registration_allowed, get_form_class, post_registration_redirect and
post_activation_redirect methods (as needed) though.

Sent from my Windows Phone

-Original Message-
From: Okorie Emmanuel
Sent: 5/21/2013 3:04 PM
To: django-users@googlegroups.com
Subject: problem with extending django registration form

hi

I have tried extending django registration page with little progress.
I can now add new user from the admin but cannot do that on the
front end. the problem is that the url does not display the from,
but raises exception, "the page cannot be found". Do I need to create a view.py
to be able to use  django registration app?

here is my code

http://pastebin.com/JBa8J1ry

is there anything i have not

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




problem with extending django registration form

2013-05-21 Thread Okorie Emmanuel
hi

I have tried extending django registration page with little progress.
I can now add new user from the admin but cannot do that on the 
front end. the problem is that the url does not display the from,
but raises exception, "the page cannot be found". Do I need to create a 
view.py
to be able to use  django registration app?

here is my code

http://pastebin.com/JBa8J1ry

is there anything i have not done right?

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




Pinax Django User Accounts vs. Django Registration

2013-05-13 Thread Parin Porecha
Hi,

I want to implement 2-step registration in my Django application.
I am using Django 1.5 and MySQL.
So, I have decided to use either 'django-user-accounts' by Pinax or
'django-registration' by James Reynolds.
I am confused which app to use.
User Accounts takes care of all the aspects regarding a user (
registration, password change, reset and settings )
whereas Django Registration only deals with signing up a user, but has been
developed originally by James Bennett.

So, please can anyone suggest which choice is better ?

Thanks,
Parin

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




RE: How can i extend django registration Field

2013-05-08 Thread Babatunde Akinyanmi
How about specifics on the things you have tried and the errors that you
got. You would get more responses of you supply those

Sent from my Windows Phone
--
From: Okorie Emmanuel
Sent: 5/8/2013 9:23 AM
To: django-users@googlegroups.com
Subject: How can i extend django registration Field

HI,
Am new to django, and working on application i intend to extend the
registration field using the django registration app by james bennett, it i
keep having several error. is there any other way i can achieve these, or
how can i effectively interage django registration

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

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




How can i extend django registration Field

2013-05-08 Thread Okorie Emmanuel
HI, 
Am new to django, and working on application i intend to extend the 
registration field using the django registration app by james bennett, it i 
keep having several error. is there any other way i can achieve these, or 
how can i effectively interage django registration 

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




Re: Django-Registration/Custom Authentication Issue

2013-04-19 Thread Lee Hinde
Thanks.


On Fri, Apr 19, 2013 at 4:41 AM, Paul Walsh  wrote:

> These are the changes you'll have to make to django-registration, if you
> are using AUTH_USER_MODEL in django 1.5 and inheriting from AbstractUser:
>
>
> https://bitbucket.org/prjts/django-registration/commits/ba31fc3053bfca7eb7a19d912882e50e295adc55
>
>
>
> On Friday, 19 April 2013 11:52:55 UTC+3, Paul Walsh wrote:
>>
>> James Bennet says above that it is compatible, but the latest
>> django-registration code is not compatible with custom user models.
>>
>> RegistrationProfile, for example, still refers directly to User, whereas
>> the new custom user implementation in Django 1.5 require this to be changed
>> in order to work when AUTH_USER_MODEL is actually being used.
>>
>> See the docs here https://docs.**djangoproject.com/en/dev/**
>> topics/auth/customizing/#**referencing-the-user-model<https://docs.djangoproject.com/en/dev/topics/auth/customizing/#referencing-the-user-model>
>>
>> Seeing as in Django, we can't override fields when we subclass models, we
>> cannot "subclass the provided stuff" in this case. Of course, we can
>> override forms and views.
>>
>> In a current django app I am working on, and indeed in every Django app I
>> have worked on, the I was happy with the default user model, and extended
>> it with a profile that included language settings, for example - I didn't
>> replace functionality.
>>
>> The Django 1.5 docs refer explicitly to my use case:
>>
>> https://docs.djangoproject.**com/en/dev/topics/auth/**
>> customizing/#extending-django-**s-default-user<https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-django-s-default-user>
>>
>> But, django-registration does not work with this use case.
>>
>>
>>
>>
>> On Wednesday, 17 April 2013 10:51:44 UTC+3, James Bennett wrote:
>>>
>>> Current hg tip is actually 1.5-compatible, in the sense that if you want
>>> to use your own User model, you just subclass the provided stuff and plug
>>> in your model, either importing directly or using the helper function in
>>> Django 1.5.
>>>
>>> django-registration does not do this itself because
>>>
>>> 1. Using Django 1.5's helpers requires either extra complication of the
>>> imports, or a break with Django 1.4 compatibility, and
>>> 2. If you're using a custom User model, you will by definition be
>>> wanting to subclass and override the default fields, validation logic,
>>> etc., since only a User model identical to django.contrib.auth.models.**User
>>> works with the defaults.
>>>
>>  --
>
>

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




Re: Django-Registration/Custom Authentication Issue

2013-04-19 Thread Paul Walsh
These are the changes you'll have to make to django-registration, if you 
are using AUTH_USER_MODEL in django 1.5 and inheriting from AbstractUser:

https://bitbucket.org/prjts/django-registration/commits/ba31fc3053bfca7eb7a19d912882e50e295adc55



On Friday, 19 April 2013 11:52:55 UTC+3, Paul Walsh wrote:
>
> James Bennet says above that it is compatible, but the latest 
> django-registration code is not compatible with custom user models.
>
> RegistrationProfile, for example, still refers directly to User, whereas 
> the new custom user implementation in Django 1.5 require this to be changed 
> in order to work when AUTH_USER_MODEL is actually being used.
>
> See the docs here 
> https://docs.djangoproject.com/en/dev/topics/auth/customizing/#referencing-the-user-model
>
> Seeing as in Django, we can't override fields when we subclass models, we 
> cannot "subclass the provided stuff" in this case. Of course, we can 
> override forms and views.
>
> In a current django app I am working on, and indeed in every Django app I 
> have worked on, the I was happy with the default user model, and extended 
> it with a profile that included language settings, for example - I didn't 
> replace functionality.
>
> The Django 1.5 docs refer explicitly to my use case:
>
>
> https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-django-s-default-user
>
> But, django-registration does not work with this use case.
>
>
>
>
> On Wednesday, 17 April 2013 10:51:44 UTC+3, James Bennett wrote:
>>
>> Current hg tip is actually 1.5-compatible, in the sense that if you want 
>> to use your own User model, you just subclass the provided stuff and plug 
>> in your model, either importing directly or using the helper function in 
>> Django 1.5.
>>
>> django-registration does not do this itself because
>>
>> 1. Using Django 1.5's helpers requires either extra complication of the 
>> imports, or a break with Django 1.4 compatibility, and
>> 2. If you're using a custom User model, you will by definition be wanting 
>> to subclass and override the default fields, validation logic, etc., since 
>> only a User model identical to django.contrib.auth.models.User works with 
>> the defaults.
>>  
>

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




Re: Django-Registration/Custom Authentication Issue

2013-04-19 Thread Paul Walsh
James Bennet says above that it is compatible, but the latest 
django-registration code is not compatible with custom user models.

RegistrationProfile, for example, still refers directly to User, whereas 
the new custom user implementation in Django 1.5 require this to be changed 
in order to work when AUTH_USER_MODEL is actually being used.

See the docs 
here 
https://docs.djangoproject.com/en/dev/topics/auth/customizing/#referencing-the-user-model

Seeing as in Django, we can't override fields when we subclass models, we 
cannot "subclass the provided stuff" in this case. Of course, we can 
override forms and views.

In a current django app I am working on, and indeed in every Django app I 
have worked on, the I was happy with the default user model, and extended 
it with a profile that included language settings, for example - I didn't 
replace functionality.

The Django 1.5 docs refer explicitly to my use case:

https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-django-s-default-user

But, django-registration does not work with this use case.




On Wednesday, 17 April 2013 10:51:44 UTC+3, James Bennett wrote:
>
> Current hg tip is actually 1.5-compatible, in the sense that if you want 
> to use your own User model, you just subclass the provided stuff and plug 
> in your model, either importing directly or using the helper function in 
> Django 1.5.
>
> django-registration does not do this itself because
>
> 1. Using Django 1.5's helpers requires either extra complication of the 
> imports, or a break with Django 1.4 compatibility, and
> 2. If you're using a custom User model, you will by definition be wanting 
> to subclass and override the default fields, validation logic, etc., since 
> only a User model identical to django.contrib.auth.models.User works with 
> the defaults.
>  

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




Re: Django-Registration/Custom Authentication Issue

2013-04-17 Thread Scott Anderson
That's good to know. How stable is it?

-scott

Via mobile phone

On Apr 17, 2013, at 3:52 AM, James Bennett  wrote:

Current hg tip is actually 1.5-compatible, in the sense that if you want to
use your own User model, you just subclass the provided stuff and plug in
your model, either importing directly or using the helper function in
Django 1.5.

django-registration does not do this itself because

1. Using Django 1.5's helpers requires either extra complication of the
imports, or a break with Django 1.4 compatibility, and
2. If you're using a custom User model, you will by definition be wanting
to subclass and override the default fields, validation logic, etc., since
only a User model identical to django.contrib.auth.models.User works with
the defaults.

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

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




Re: Django-Registration/Custom Authentication Issue

2013-04-17 Thread James Bennett
Current hg tip is actually 1.5-compatible, in the sense that if you want to
use your own User model, you just subclass the provided stuff and plug in
your model, either importing directly or using the helper function in
Django 1.5.

django-registration does not do this itself because

1. Using Django 1.5's helpers requires either extra complication of the
imports, or a break with Django 1.4 compatibility, and
2. If you're using a custom User model, you will by definition be wanting
to subclass and override the default fields, validation logic, etc., since
only a User model identical to django.contrib.auth.models.User works with
the defaults.

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




Re: Django-Registration/Custom Authentication Issue

2013-04-16 Thread Lee Hinde
Thanks Scott; that turned out to be the issue. I found those references and 
updated them and all is well.

On Apr 16, 2013, at 7:05 PM, Scott Anderson  wrote:

> Django registration is not compatible with custom user models in Django 1.5, 
> as it directly references django.contrib.auth.models.User in several places.
> 
> If you want to maintain your own copy you can swap those refs for those of 
> your own User model.
> 
> -scott
> 
> Via mobile phone
> 
> On Apr 16, 2013, at 9:59 PM, Rainy  wrote:
> 
>> 
>> 
>> 
>> 
>> On Sunday, April 14, 2013 9:49:32 PM UTC-4, Lee Hinde wrote:
>> I'm trying to do a 'simple' registration with just a user email and password 
>> required to create an account. I'm using django-registration with django 
>> 1.5.1 and have created a custom model and the custom model manager. 
>> 
>> I can hit all the registration forms just fine and have copied the example 
>> from the django docs (ignoring, temporarily, the admonition not to do that.).
>> 
>> I've created a custom backend in django-registration, basically to remove 
>> the username requirement. In fact, my custom backend is identical to the 
>> default, minus any references to the username.
>> 
>> When I try to create a new user (i.e, submit the form), from 
>> /accounts/register/ I get the following error:
>> 
>> AttributeError at /accounts/register/
>> Manager isn't available; User has been swapped for 'letters.PCSUser'
>> 
>> The full trace back is:
>> 
>> File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in 
>> get_response
>>   115. response = callback(request, *callback_args, 
>> **callback_kwargs)
>> File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in view
>>   68. return self.dispatch(request, *args, **kwargs)
>> File 
>> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
>>  in dispatch
>>   79. return super(RegistrationView, self).dispatch(request, *args, 
>> **kwargs)
>> File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in 
>> dispatch
>>   86. return handler(request, *args, **kwargs)
>> File 
>> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
>>  in post
>>   35. return self.form_valid(request, form)
>> File 
>> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
>>  in form_valid
>>   82. new_user = self.register(request, **form.cleaned_data)
>> File 
>> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/backends/pcs/views.py"
>>  in register
>>   80. 
>> password, site)
>> File "/Library/Python/2.7/site-packages/django/db/transaction.py" in inner
>>   223. return func(*args, **kwargs)
>> File 
>> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/models.py"
>>  in create_inactive_user
>>   78. new_user = User.objects.create_user( email, password)
>> File "/Library/Python/2.7/site-packages/django/db/models/manager.py" in 
>> __get__
>>   256. self.model._meta.object_name, self.model._meta.swapped
>> 
>> 
>> No doubt I've left out some needed component to show why this error is 
>> coming up, but I'm not sure what.  I'm grateful for any pointers on where I 
>> should be looking.
>> 
>> 
>> 
>> I believe the issue is that you need to define usermanager on your custom 
>> user, and
>> you will possibly need to inherit from django usermanager and override it to 
>> not
>> use username anywhere. But at the very least, you need to do something like:
>> 
>> import UserManager from wherever
>> class CustomUser(User):
>> objects = UserManager()
>> 
>> 
>>  -ak
>> 
>  

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




Re: Django-Registration/Custom Authentication Issue

2013-04-16 Thread Scott Anderson
Django registration is not compatible with custom user models in Django
1.5, as it directly references django.contrib.auth.models.User in several
places.

If you want to maintain your own copy you can swap those refs for those of
your own User model.

-scott

Via mobile phone

On Apr 16, 2013, at 9:59 PM, Rainy  wrote:





On Sunday, April 14, 2013 9:49:32 PM UTC-4, Lee Hinde wrote:
>
> I'm trying to do a 'simple' registration with just a user email and
> password required to create an account. I'm using django-registration with
> django 1.5.1 and have created a custom model and the custom model manager.
>
> I can hit all the registration forms just fine and have copied the example
> from the django docs (ignoring, temporarily, the admonition not to do
> that.).
>
> I've created a custom backend in django-registration, basically to remove
> the username requirement. In fact, my custom backend is identical to the
> default, minus any references to the username.
>
> When I try to create a new user (i.e, submit the form), from
> /accounts/register/ I get the following error:
>
> AttributeError at /accounts/register/
> Manager isn't available; User has been swapped for 'letters.PCSUser'
>
> The full trace back is:
>
> File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in
> get_response
>   115. response = callback(request,
> *callback_args, **callback_kwargs)
> File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in
> view
>   68. return self.dispatch(request, *args, **kwargs)
> File
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
> in dispatch
>   79. return super(RegistrationView, self).dispatch(request,
> *args, **kwargs)
> File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in
> dispatch
>   86. return handler(request, *args, **kwargs)
> File
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
> in post
>   35. return self.form_valid(request, form)
> File
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
> in form_valid
>   82. new_user = self.register(request, **form.cleaned_data)
> File
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/backends/pcs/views.py"
> in register
>   80.
> password, site)
> File "/Library/Python/2.7/site-packages/django/db/transaction.py" in inner
>   223. return func(*args, **kwargs)
> File
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/models.py"
> in create_inactive_user
>   78. new_user = User.objects.create_user( email, password)
> File "/Library/Python/2.7/site-packages/django/db/models/manager.py" in
> __get__
>   256. self.model._meta.object_name, self.model._meta.swapped
>
>
> No doubt I've left out some needed component to show why this error is
> coming up, but I'm not sure what.  I'm grateful for any pointers on where I
> should be looking.
>
>
>
I believe the issue is that you need to define usermanager on your custom
user, and
you will possibly need to inherit from django usermanager and override it
to not
use username anywhere. But at the very least, you need to do something like:

import UserManager from wherever
class CustomUser(User):
objects = UserManager()


 -ak

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

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




Re: Django-Registration/Custom Authentication Issue

2013-04-16 Thread Rainy




On Sunday, April 14, 2013 9:49:32 PM UTC-4, Lee Hinde wrote:
>
> I'm trying to do a 'simple' registration with just a user email and 
> password required to create an account. I'm using django-registration with 
> django 1.5.1 and have created a custom model and the custom model manager. 
>
> I can hit all the registration forms just fine and have copied the example 
> from the django docs (ignoring, temporarily, the admonition not to do 
> that.). 
>
> I've created a custom backend in django-registration, basically to remove 
> the username requirement. In fact, my custom backend is identical to the 
> default, minus any references to the username.
>
> When I try to create a new user (i.e, submit the form), from 
> /accounts/register/ I get the following error:
>
> AttributeError at /accounts/register/
> Manager isn't available; User has been swapped for 'letters.PCSUser'
>
> The full trace back is:
>
> File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in 
> get_response
>   115. response = callback(request, 
> *callback_args, **callback_kwargs)
> File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in 
> view
>   68. return self.dispatch(request, *args, **kwargs)
> File 
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
>  
> in dispatch
>   79. return super(RegistrationView, self).dispatch(request, 
> *args, **kwargs)
> File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in 
> dispatch
>   86. return handler(request, *args, **kwargs)
> File 
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
>  
> in post
>   35. return self.form_valid(request, form)
> File 
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
>  
> in form_valid
>   82. new_user = self.register(request, **form.cleaned_data)
> File 
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/backends/pcs/views.py"
>  
> in register
>   80. 
> password, site)
> File "/Library/Python/2.7/site-packages/django/db/transaction.py" in inner
>   223. return func(*args, **kwargs)
> File 
> "/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/models.py"
>  
> in create_inactive_user
>   78. new_user = User.objects.create_user( email, password)
> File "/Library/Python/2.7/site-packages/django/db/models/manager.py" in 
> __get__
>   256. self.model._meta.object_name, self.model._meta.swapped
>
>
> No doubt I've left out some needed component to show why this error is 
> coming up, but I'm not sure what.  I'm grateful for any pointers on where I 
> should be looking.
>
>
>
I believe the issue is that you need to define usermanager on your custom 
user, and
you will possibly need to inherit from django usermanager and override it 
to not
use username anywhere. But at the very least, you need to do something like:

import UserManager from wherever
class CustomUser(User):
objects = UserManager()


 -ak

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




Django-Registration/Custom Authentication Issue

2013-04-14 Thread Lee Hinde
I'm trying to do a 'simple' registration with just a user email and
password required to create an account. I'm using django-registration with
django 1.5.1 and have created a custom model and the custom model manager.

I can hit all the registration forms just fine and have copied the example
from the django docs (ignoring, temporarily, the admonition not to do
that.).

I've created a custom backend in django-registration, basically to remove
the username requirement. In fact, my custom backend is identical to the
default, minus any references to the username.

When I try to create a new user (i.e, submit the form), from
/accounts/register/ I get the following error:

AttributeError at /accounts/register/
Manager isn't available; User has been swapped for 'letters.PCSUser'

The full trace back is:

File "/Library/Python/2.7/site-packages/django/core/handlers/base.py" in
get_response
  115. response = callback(request, *callback_args,
**callback_kwargs)
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in
view
  68. return self.dispatch(request, *args, **kwargs)
File
"/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
in dispatch
  79. return super(RegistrationView, self).dispatch(request, *args,
**kwargs)
File "/Library/Python/2.7/site-packages/django/views/generic/base.py" in
dispatch
  86. return handler(request, *args, **kwargs)
File
"/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
in post
  35. return self.form_valid(request, form)
File
"/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/views.py"
in form_valid
  82. new_user = self.register(request, **form.cleaned_data)
File
"/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/backends/pcs/views.py"
in register
  80.
password, site)
File "/Library/Python/2.7/site-packages/django/db/transaction.py" in inner
  223. return func(*args, **kwargs)
File
"/Users/leehinde/Documents/Clients/ProfessionalCreditSolutions/pcs/pcs/registration/models.py"
in create_inactive_user
  78. new_user = User.objects.create_user( email, password)
File "/Library/Python/2.7/site-packages/django/db/models/manager.py" in
__get__
  256. self.model._meta.object_name, self.model._meta.swapped


No doubt I've left out some needed component to show why this error is
coming up, but I'm not sure what.  I'm grateful for any pointers on where I
should be looking.

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




Re: django-registration vs Django 1.5

2013-03-09 Thread James Bennett
I plan to work on it at the PyCon sprints. Rejected some pull requests
lately though due to people abusing various features of bitbucket to
spam rather than to help, and my policy is not to reward that kind of
behavior.

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




Re: django-registration vs Django 1.5

2013-03-09 Thread Ernest Ezis
I setup a brand new 1.5 project today.  I had everything working fine.  Was 
using django's built in admin to test/refine and add data to my models. 
 Then I installed django-registration using the repo below, and grabbed the 
templates.  The good news is that, yes, the registration stuff works and 
allows me to add new users.  The bad news, django admin is no longer 
operable.  I have already tried 
adding 'django.contrib.auth.backends.ModelBackend', to 
AUTHTENTICATION_SETTINGS (which helped other people in prior versions). 
 But that has not worked and I cannot figure it out.  Any ideas?

On Friday, March 1, 2013 9:07:53 AM UTC-7, jompa wrote:
>
> Hi Xavi,
>
> I'm wrestling with the same problem right now. 
>
> There are a couple of pull request to solve this but until they are 
> accepted I'm using this fork:
>
> https://bitbucket.org/eire1130/django-registration
>
> pip install 
> https://bitbucket.org/eire1130/django-registration/get/tip.tar.gz
>
> /Johan
>  
>
> On Mar 1, 2013, at 4:53 PM, Xavier Pegenaute wrote:
>
> Hi,
>
> seems django-registration doesn't support properly the new user model from 
> Django 1.5, any one know how to work around it, or at least some other 
> application able to deal with Django 1.5?
>
> Thanks,
> Xavi
>
> -- 
> 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...@googlegroups.com .
> To post to this group, send email to django...@googlegroups.com
> .
> Visit this group at http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>

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




Re: django-registration vs Django 1.5

2013-03-01 Thread william ratcliff
I believe that my patched version should also work:

https://github.com/williamratcliff/django-registration

Please let me know if there are problems--I should issue a pull request
(the patch is minor)


On Fri, Mar 1, 2013 at 11:07 AM, Johan Kock  wrote:

> Hi Xavi,
>
> I'm wrestling with the same problem right now.
>
> There are a couple of pull request to solve this but until they are
> accepted I'm using this fork:
>
> https://bitbucket.org/eire1130/django-registration
>
> pip install
> https://bitbucket.org/eire1130/django-registration/get/tip.tar.gz
>
> /Johan
>
>
> On Mar 1, 2013, at 4:53 PM, Xavier Pegenaute wrote:
>
> Hi,
>
> seems django-registration doesn't support properly the new user model from
> Django 1.5, any one know how to work around it, or at least some other
> application able to deal with Django 1.5?
>
> Thanks,
> Xavi
>
> --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>
>  --
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

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




Re: django-registration vs Django 1.5

2013-03-01 Thread Johan Kock
Hi Xavi,

I'm wrestling with the same problem right now. 

There are a couple of pull request to solve this but until they are accepted 
I'm using this fork:

https://bitbucket.org/eire1130/django-registration

pip install https://bitbucket.org/eire1130/django-registration/get/tip.tar.gz

/Johan
 

On Mar 1, 2013, at 4:53 PM, Xavier Pegenaute wrote:

> Hi,
> 
> seems django-registration doesn't support properly the new user model from 
> Django 1.5, any one know how to work around it, or at least some other 
> application able to deal with Django 1.5?
> 
> Thanks,
> Xavi
> 
> -- 
> 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 http://groups.google.com/group/django-users?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
> 
> 

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




django-registration vs Django 1.5

2013-03-01 Thread Xavier Pegenaute

Hi,

seems django-registration doesn't support properly the new user model 
from Django 1.5, any one know how to work around it, or at least some 
other application able to deal with Django 1.5?


Thanks,
Xavi

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




Re: django-registration-template

2013-01-23 Thread Pankaj Singh
Hey Sameer,

His project uses twitter bootstrap forms in templates. That's the only
unique thing about this project.

If you are looking for an email based registration app in django which
uses bootstrap forms then you can use this one.

--
Pankaj Singh
http://about.me/psjinx


On Wed, Jan 23, 2013 at 2:21 PM, SameerOak  wrote:
> Hello,
>
> Sorry if you find my question too foolish or naive. Actually, I don't have
> any web development experience and this is the first time I'm trying to
> learn django and twitter-bootstrap. While searching on the forum for a
> solution about how to use twitter-bootstrap on the client side while django
> as MVC engine, I found link to your project. It isn't very clear to me as to
> what exactly your project is about? But my gut feel is this is something
> what I'm looking for.
>
> Please provide some more details.
>
> Regards,
> - sameer oak.
>
>
> On Friday, November 4, 2011 9:41:54 AM UTC+5:30, Ezequiel Bertti wrote:
>>
>> Hi,
>>
>> I just release a project on github with bootstrap from twitter v1.4 form
>> django-registration.
>>
>> Is a simple use of bootstrap just using template for render with css. No
>> python code need.
>>
>> Its is perfect sample for designers to know how to use bootstrap without
>> asking to programmer to do some fix in their code.
>>
>> https://github.com/ebertti/django-registration-bootstrap
>>
>> It is my first of many github public projects.
>>
>> --
>> Ezequiel Bertti
>> E-Mail: ebe...@gmail.com
>> From Brazil
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/hXQfJECymeUJ.
> 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: django-registration-template

2013-01-23 Thread SameerOak
Hello,

Sorry if you find my question too foolish or naive. Actually, I don't have 
any web development experience and this is the first time I'm trying to 
learn django and twitter-bootstrap. While searching on the forum for a 
solution about how to use twitter-bootstrap on the client side while django 
as MVC engine, I found link to your project. It isn't very clear to me as 
to what exactly your project is about? But my gut feel is this is something 
what I'm looking for.

Please provide some more details.

Regards,
- sameer oak.


On Friday, November 4, 2011 9:41:54 AM UTC+5:30, Ezequiel Bertti wrote:
>
> Hi, 
>
> I just release a project on github with bootstrap from twitter v1.4 form 
> django-registration.
>
> Is a simple use of bootstrap just using template for render with css. No 
> python code need.
>
> Its is perfect sample for designers to know how to use bootstrap without 
> asking to programmer to do some fix in their code.
>
> https://github.com/ebertti/django-registration-bootstrap 
>
> It is my first of many github public projects.
>
> -- 
> Ezequiel Bertti
> E-Mail: ebe...@gmail.com 
> From Brazil
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/hXQfJECymeUJ.
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: django-registration fork for 1.5?

2012-12-16 Thread Detectedstealth
You really don't need a fork I am using the latest dev build of django and 
the only thing you need to change is the direct_to_template in the urls.py 
to use the new class based views and everything else works as is, I even 
have a custom user.

On Wednesday, December 12, 2012 2:44:53 PM UTC-8, mikegolf wrote:
>
> Hi,
> is there any django-registration fork that works on Django 1.5?
>
> thanks,
> mg
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/bN0cgBMx-FUJ.
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: django-registration customization

2012-12-14 Thread sri
Hi Karen,

Thanks very much for your help. It's working now after i used the 
registrationfrom in the template.

Thanks

On Friday, 14 December 2012 02:34:24 UTC, Karen Tracey wrote:
>
> On Wed, Dec 12, 2012 at 3:36 PM, sri  >wrote:
>
>> Now, when i click on the register button on the page, the form validation 
>> does not work.
>> Let's say if i enter the username that already exists on the database, it 
>> is not reporting any errors. It is just displaying the form without any 
>> error messages.
>> Can anyone help with what i am missing?
>>
>
> Sounds like the form validation is working, since you are not getting 
> redirected to next page but rather the registration page is being 
> re-displayed. The form created in the view is where the validation errors 
> have been stored, and that form thus needs to be used by the template for 
> rendering the errors. However, the template you show is not using the 
> registerform that is being passed in the context from the view, it just has 
> all the fields hard-coded. You'll need to use the registerform to render 
> the form validation errors, since that is where they've been stored. See:
>
>
> https://docs.djangoproject.com/en/1.4/topics/forms/#displaying-a-form-using-a-template
>
> Karen
> -- 
> http://tracey.org/kmt/
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/gI687IeP8_gJ.
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: django-registration customization

2012-12-13 Thread Karen Tracey
On Wed, Dec 12, 2012 at 3:36 PM, sri  wrote:

> Now, when i click on the register button on the page, the form validation
> does not work.
> Let's say if i enter the username that already exists on the database, it
> is not reporting any errors. It is just displaying the form without any
> error messages.
> Can anyone help with what i am missing?
>

Sounds like the form validation is working, since you are not getting
redirected to next page but rather the registration page is being
re-displayed. The form created in the view is where the validation errors
have been stored, and that form thus needs to be used by the template for
rendering the errors. However, the template you show is not using the
registerform that is being passed in the context from the view, it just has
all the fields hard-coded. You'll need to use the registerform to render
the form validation errors, since that is where they've been stored. See:

https://docs.djangoproject.com/en/1.4/topics/forms/#displaying-a-form-using-a-template

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



django-registration fork for 1.5?

2012-12-12 Thread mikegolf
Hi,
is there any django-registration fork that works on Django 1.5?

thanks,
mg

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/kia2ThjwpSwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django-registration customization

2012-12-12 Thread sri
Hi,

I am using django-registration 
(http://pypi.python.org/pypi/django-registration) app for my project and i 
have added an extra page which shows both login and registration forms 
together.

But on this new page, the validation for registration form does not work. 
It works if i display the page with only registration form. But if the page 
has both registration and login forms the validation does not work. 

i have added below to the urls.py

url(r'^login_register/$',   login_register,  name='login_register'),

And in views.py, i have added the following.

def login_register(request, form_class=RegistrationForm, 
profile_callback=None):

if request.method == 'POST':

if 'login_button' in request.POST:
new_user = authenticate(username=request.POST['username'],
password=request.POST['password'])

if new_user is not None:
if new_user.is_active:
login(request, new_user)
else:
state = "Your username and/or password were incorrect."
form = RegistrationForm()
return 
render_to_response('registration/register_login.html',
 {'registerform': form,
 'login_state': state},
  context_instance=RequestContext(request))

return HttpResponseRedirect(request.GET.get("next"))

elif 'register_button' in request.POST:
form = RegistrationForm(data=request.POST, files=request.FILES)

if form.is_valid():
new_user = form.save(profile_callback=profile_callback)
new_user = authenticate(username=request.POST['username'],
password=request.POST['password1'])
login(request, new_user)
return HttpResponseRedirect(request.GET.get("next"))
else:
return 
render_to_response('registration/register_login.html',
 {'registerform': form},
  context_instance=RequestContext(request))
else:
form = RegistrationForm()
return render_to_response('registration/register_login.html',
{'registerform': form},
context_instance=RequestContext(request))


And my template for register_login looks like below.

{% block main_content %}
  

   Existing Customer (Login) 
  {% if login_state %}

   *{{ login_state }}

  {% endif %}

  {% csrf_token %}

  Username*
  

  


  Password*
  

  


  
Sign 
in
  

  



   New Customer (Register for an Account) 
  {% if register_state %}

   *{{ register_state }}

  {% endif %}
  {% csrf_token %}

  Username*
  

  


  Email 
Address*
  

  


  Password*
  

  


  Password 
(again)*
  

  


  Phone. No 
(Optional)
  

  


  
Register
  

  


  
{% endblock %}

{% block sidebar %}{% endblock %}


Now, when i click on the register button on the page, the form validation 
does not work.
Let's say if i enter the username that already exists on the database, it 
is not reporting any errors. It is just displaying the form without any 
error messages.
Can anyone help with what i am missing?

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/e5M2K9Yu1mIJ.
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: How to make django-registration use Chinese as username?

2012-12-10 Thread Tomas Neme
I *think* it should work OK, data-wise. Try changing the
login/registration forms so chinese characters pass the verification
process. You can start by trying with a simple CharField with no
verification and see if it works.

On Sun, Dec 9, 2012 at 7:49 AM, Scarl  wrote:
> I am a chinese user. I want to use django-registration to make a
> user-registration application.
> But I find django-registration only support english username. And its
> help_text are also english.
> I need to use Chinese as username.
> What should I do?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/sM6wldu7pvwJ.
> 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.



-- 
"The whole of Japan is pure invention. There is no such country, there
are no such people" --Oscar Wilde

|_|0|_|
|_|_|0|
|0|0|0|

(\__/)
(='.'=)This is Bunny. Copy and paste bunny
(")_(") to help him gain world domination.

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



How to make django-registration use Chinese as username?

2012-12-09 Thread Scarl
I am a chinese user. I want to use django-registration to make a 
user-registration application. 
But I find django-registration only support english username. And its 
help_text are also english.
I need to use Chinese as username.
What should I do?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/sM6wldu7pvwJ.
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: django registration custom backend

2012-10-27 Thread Bill Freeman
If I were doing this, I would create a view, written (or decorated) to
require a new permission (or allowing superuser without the permission)
to use, containing a form to collect minimal information, certainly
email and username, probably also human name.  The form class
would have validation that attempts to create a new auth.User with
that information and an unusable password (validation failing, for
example, if the username already exists).  If the form succeeds, the
view triggers a password reset email for that user.

All the hard parts are already in there, best to use them.

Bill

On Sat, Oct 27, 2012 at 9:46 AM, Ian Foote  wrote:
> Hi,
>
> I'm trying to write a custom backend for django registration.
> (http://docs.b-list.org/django-registration/0.8/backend-api.html)
> I'm using python 2.7 and django 1.4.
>
> What I want is for an existing user with suitable permissions to be able to
> register accounts for new users. The new user will get an email with an
> activation link, which will redirect the new user to a form where they set a
> password for their account.
>
> I do not want the existing user to be required to set a password manually
> for the new user to change once they first log in.
>
> This is what I have so far:
>
> from django.conf import settings
> from django.contrib.sites.models import RequestSite
> from django.contrib.sites.models import Site
> from django.contrib.auth import login
>
> from registration import signals
> from registration.models import RegistrationProfile
> from registration.backends.default import DefaultBackend
>
> class CustomBackend(DefaultBackend):
> def register(self, request, **kwargs):
> username, email = kwargs['email'], kwargs['email']
> # username is email address
> password = '' # User will have no password set.
> if Site._meta.installed:
> site = Site.objects.get_current()
> else:
> site = RequestSite(request)
> new_user = RegistrationProfile.objects.create_inactive_user(
> username,
> email,
> password,
> site)
> signals.user_registered.send(sender=self.__class__,
>  user=new_user,
>  request=request)
> return new_user
>
> def activate(self, request, activation_key):
> activated = RegistrationProfile.objects.activate_user(
> activation_key)
> if activated:
> login(request, activated)
> signals.user_activated.send(sender=self.__class__,
> user=activated,
> request=request)
> return activated
>
> def post_activation_redirect(self, request, user):
> return ('set_password', (), {})
>
> Unfortunately, when I try to log the new user in during account activation,
> I get an AttributeError: 'User' object has no attribute 'backend'
>
> I know this is because I'm not calling authenticate before login, but
> authenticate
> (https://docs.djangoproject.com/en/1.4/topics/auth/#django.contrib.auth.authenticate)
> requires a password, which I don't want to set at this stage. I want the
> user to be logged in when they are redirected to the set_password form.
>
> Advice would be appreciated.
>
> Regards,
> Ian
>
> --
> 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.



django registration custom backend

2012-10-27 Thread Ian Foote

Hi,

I'm trying to write a custom backend for django registration. 
(http://docs.b-list.org/django-registration/0.8/backend-api.html)

I'm using python 2.7 and django 1.4.

What I want is for an existing user with suitable permissions to be able 
to register accounts for new users. The new user will get an email with 
an activation link, which will redirect the new user to a form where 
they set a password for their account.


I do not want the existing user to be required to set a password 
manually for the new user to change once they first log in.


This is what I have so far:

from django.conf import settings
from django.contrib.sites.models import RequestSite
from django.contrib.sites.models import Site
from django.contrib.auth import login

from registration import signals
from registration.models import RegistrationProfile
from registration.backends.default import DefaultBackend

class CustomBackend(DefaultBackend):
def register(self, request, **kwargs):
username, email = kwargs['email'], kwargs['email']
# username is email address
password = '' # User will have no password set.
if Site._meta.installed:
site = Site.objects.get_current()
else:
site = RequestSite(request)
new_user = RegistrationProfile.objects.create_inactive_user(
username,
email,
password,
site)
signals.user_registered.send(sender=self.__class__,
 user=new_user,
 request=request)
return new_user

def activate(self, request, activation_key):
activated = RegistrationProfile.objects.activate_user(
activation_key)
if activated:
login(request, activated)
signals.user_activated.send(sender=self.__class__,
user=activated,
request=request)
return activated

def post_activation_redirect(self, request, user):
return ('set_password', (), {})

Unfortunately, when I try to log the new user in during account 
activation, I get an AttributeError: 'User' object has no attribute 
'backend'


I know this is because I'm not calling authenticate before login, but 
authenticate 
(https://docs.djangoproject.com/en/1.4/topics/auth/#django.contrib.auth.authenticate) 
requires a password, which I don't want to set at this stage. I want the 
user to be logged in when they are redirected to the set_password form.


Advice would be appreciated.

Regards,
Ian

--
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: Django-registration tutorial + code

2012-07-09 Thread Dhilip Sivaramakrishnan
Hello,

i think the major issue is with your db query, this issue is happened while
entering data to db. So try to check with your registration module.




-- Dhilip S

On Tue, Jul 10, 2012 at 5:01 AM, Jeff Silverman wrote:

> I'm new as well, but I have run into similar issues when I don't have the
> environment settings assigned properly.
>
>
> On Mon, Jul 9, 2012 at 12:03 AM, scoop  wrote:
>
>> i installed registration, added registration to installed apps and used
>> your
>> templates.
>>
>> i nav to accounts/register , enter the info and as i continue it breaks
>> with
>> the following:
>>
>> DoesNotExist at /accounts/register/
>> Site matching query does not exist.
>> Request Method: POST
>> Request URL:http://spenv.local/accounts/register/
>> Django Version: 1.4
>> Exception Type: DoesNotExist
>> Exception Value:
>> Site matching query does not exist.
>> Exception Location:
>> /usr/lib/python2.7/site-packages/django/db/models/query.py in get, line
>> 366
>>
>> I'm pretty new to django so I'm slightly confused. I looked at the
>> documentation and there doesn't seem to be anything that I understand to
>> fix
>> this.
>>
>> --
>> View this message in context:
>> http://python.6.n6.nabble.com/Django-registration-tutorial-code-tp4974793p4981365.html
>> Sent from the django-users mailing list archive at Nabble.com.
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>  --
> 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: Django-registration tutorial + code

2012-07-09 Thread Jeff Silverman
I'm new as well, but I have run into similar issues when I don't have the
environment settings assigned properly.

On Mon, Jul 9, 2012 at 12:03 AM, scoop  wrote:

> i installed registration, added registration to installed apps and used
> your
> templates.
>
> i nav to accounts/register , enter the info and as i continue it breaks
> with
> the following:
>
> DoesNotExist at /accounts/register/
> Site matching query does not exist.
> Request Method: POST
> Request URL:http://spenv.local/accounts/register/
> Django Version: 1.4
> Exception Type: DoesNotExist
> Exception Value:
> Site matching query does not exist.
> Exception Location:
> /usr/lib/python2.7/site-packages/django/db/models/query.py in get, line 366
>
> I'm pretty new to django so I'm slightly confused. I looked at the
> documentation and there doesn't seem to be anything that I understand to
> fix
> this.
>
> --
> View this message in context:
> http://python.6.n6.nabble.com/Django-registration-tutorial-code-tp4974793p4981365.html
> Sent from the django-users mailing list archive at Nabble.com.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
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: Django-registration tutorial + code

2012-07-09 Thread scoop
i installed registration, added registration to installed apps and used your
templates.

i nav to accounts/register , enter the info and as i continue it breaks with
the following:

DoesNotExist at /accounts/register/
Site matching query does not exist.
Request Method: POST
Request URL:http://spenv.local/accounts/register/
Django Version: 1.4
Exception Type: DoesNotExist
Exception Value:
Site matching query does not exist.
Exception Location:
/usr/lib/python2.7/site-packages/django/db/models/query.py in get, line 366

I'm pretty new to django so I'm slightly confused. I looked at the
documentation and there doesn't seem to be anything that I understand to fix
this.

--
View this message in context: 
http://python.6.n6.nabble.com/Django-registration-tutorial-code-tp4974793p4981365.html
Sent from the django-users mailing list archive at Nabble.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: UserProfile.user" must be a "User" instance. django-registration

2012-07-04 Thread Melvyn Sopacua
On 2-7-2012 15:17, Nikhil Verma wrote:

> Traceback:-
> 
> 
> Exception Type: ValueError at /myprofile/completingprofile/
> Exception Value: Cannot assign " object at 0x3487c10>": "UserProfile.user" must be a "User" instance.
> 

> user = request.user,# here i am trying to add user from
> request who is coming from RegistrationForm from django -registration
># I am getting the error in this above line

If request.user.is_anonymous() is True you have your answer. If not,
figure out what kind of stuff is in that object by printing it's __dict__.
-- 
Melvyn Sopacua


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



  1   2   3   4   5   >