How I can display please enter the same password. if both password is
different in django inbuilt auth forms.
--
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 dja
Where is your meta class ?
It is not in __init__() function, is it?
if it is then problem is there.
class Meta:
> model = CustomUser
> fields = ['email',]
>
del self.fields['username']
>
this is wrong, use exclude in Meta class to remove fields
--
"La utopía sirve para caminar" Fernando
n render(request, 'register.html', args)
And finally my register.html is this -
{% extends "base.html" %}
{% block content %}
Register
{% for field in form %}
{{field.error}}
{% endfor %}
{% csrf_token %}
{{form.as_p}}
{% endblock %}
Des
All good - that's how I build too. The slug/get_absolute_url will blow
your mind. Makes everything easier.
L.
On 2 December 2014 at 15:10, JJ Zolper wrote:
> Lachlan,
>
> Oh I absolutely understand. Don't get me wrong I prefer Django to be as
> lightweight as possible, and leave out things that
Lachlan,
Oh I absolutely understand. Don't get me wrong I prefer Django to be as
lightweight as possible, and leave out things that aren't really that
necessary. I'm with you. I have
also seen some ideas that I have turn into something people like and wish
to pursue (rare but it has happened) s
Carl,
Thanks so much for your help, this suggestion will help a lot.
I actually wasn't really aware that this was even possible until now. Would
explain why I wasn't sure if it could be done.
Thanks again,
JJ
--
You received this message because you are subscribed to the Google Groups
"Djan
Hi JJ,
To make a form for users to add/remove emails with a linked model
approach, you'll need an inline model formset:
https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets
Carl
On 12/01/2014 07:47 PM, JJ Zolper wrote:
> Carl,
>
> I went ahead and tried your implementa
ies.Community',
> blank=True, null=True)
>
> athletecolleges = models.ManyToManyField('colleges.College', blank=True,
> null=True)
>
> athletetwitterscreenname = models.CharField(max_length=30, blank=True)
>
> isVerified = models.BooleanField(default=False)
Carl,
I went ahead and tried your implementation suggestion and I am at a point
now that I am not sure what to do next:
# Athlete Email
class AthleteEmail(models.Model):
athlete = models.ForeignKey(Athlete)
email = models.EmailField(unique=True)
verified = models.BooleanField(def
x27;colleges.College',
blank=True, null=True)
athletetwitterscreenname = models.CharField(max_length=30, blank=True)
isVerified = models.BooleanField(default=False)
User.profile = property(lambda u:
Athlete.objects.get_or_create(athleteuser=u)[0])
Certainly because Django is so flex
Hi JJ,
On 12/01/2014 05:58 PM, JJ Zolper wrote:
> I'm just curious if anyone around the community has an interest in
> discussing the possibility of adding a "MultiEmailField" to Django?
>
> Here is what I found when roaming the internet:
>
> https://github
e internet:
>
> https://github.com/fle/django-multi-email-field
>
> Basically, the reason I care is because on my website I'm building the
> ability to manage multiple e-mails on the user's profile. So on sites of the
> caliber of facebook, google, twitter, and so on
Hey everyone,
I'm just curious if anyone around the community has an interest in
discussing the possibility of adding a "MultiEmailField" to Django?
Here is what I found when roaming the internet:
https://github.com/fle/django-multi-email-field
Basically, the reason I care i
Thanks. That helps. At least I know someone else is facing the same
thing.
On Apr 21, 2:20 pm, Tom Evans wrote:
> On Wed, Apr 21, 2010 at 6:22 PM, CrabbyPete wrote:
> > Yes, but my problem is its defined in contrib.auth.User with no
> > length, which I assume defaults to 60. Facebook proxy emai
I think i ran into this issue before. I don't think they define a
max_length anywhere, the restriction is just on the database. Just
increase the field size in the database and you should be good.
On Apr 21, 2:20 pm, Tom Evans wrote:
> On Wed, Apr 21, 2010 at 6:22 PM, CrabbyPete wrote:
> > Yes,
On Wed, Apr 21, 2010 at 6:22 PM, CrabbyPete wrote:
> Yes, but my problem is its defined in contrib.auth.User with no
> length, which I assume defaults to 60. Facebook proxy email address
> can be 90 characters long.
>
http://lmgtfy.com/?q=django+auth.User+email+truncating&l=1
Funnily, the OP the
Yes, but my problem is its defined in contrib.auth.User with no
length, which I assume defaults to 60. Facebook proxy email address
can be 90 characters long.
On Apr 20, 11:03 am, "ge...@aquarianhouse.com"
wrote:
> did you try:
>
> email = models.EmailField(max_length=60)
>
> On Apr 20, 5:00 pm,C
http://code.djangoproject.com/browser/django/trunk/django/db/models/fields/__init__.py
If it's in models (django.db.models) then it's not in django.contrib, just FYI.
As for overriding it, you can subclass it, for a start.
Shawn
On Apr 20, 2010, at 11:00 AM, CrabbyPete wrote:
> Where in th
did you try:
email = models.EmailField(max_length=60)
On Apr 20, 5:00 pm, CrabbyPete wrote:
> Where in the django.contrib is the models.EmailField defined? I have
> email address that are longer than 60 characters and I want to see if
> I can override it.
>
> --
> You received this message becau
Where in the django.contrib is the models.EmailField defined? I have
email address that are longer than 60 characters and I want to see if
I can override it.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
On Jan 24, 1:32 am, Bhaskar Gara wrote:
> I am getting error for only emailfield remaining string fields are
> working fine the Error is
>
> DEBUG:root:
>
That's not the error. The error page usefully comes with a complete
traceback, plus a link to 'switch to copy and paste view' so you can
copy
I am getting error for only emailfield remaining string fields are
working fine the Error is
DEBUG:root:
I am new to django, I am not sure why I am getting that above error.
Please help to fix the issue.
model.py
class Nomination(models.Model):
yourname = models.CharField(max_length=30)
To reply to my own question...I've extended UserCreationForm as
follows:
==
class UserCreationFormExtended(UserCreationForm):
def __init__(self, *args, **kwargs):
super(UserCreationFormExtended, self).__init__(*args,
**kwargs)
self.fields['first_name'].require
Hi,
I'm using the UserCreationForm for creating users, but I would like to
show the email, firstname and lastname fields as well (and they should
be required). Much like the view you get when adding a user through
the admin interface. What's the best way to do this? Extend
UserCreationForm? Or cr
Thanks Alex, that worked.
Alex Koshelev wrote:
> Hi, Vasil!
>
> `Field.unique` is the read only property. If you want to set
> uniqueness you have to assign field's `_unique` attribute to True.
>
> ---
> Alex Koshelev
>
>
> On Wed, Aug 5, 2009 at 12:54 AM, Vasil Vangelovski
> mailto:vvangelov..
Hi, Vasil!
`Field.unique` is the read only property. If you want to set uniqueness you
have to assign field's `_unique` attribute to True.
---
Alex Koshelev
On Wed, Aug 5, 2009 at 12:54 AM, Vasil Vangelovski
wrote:
>
> Having this line of code:
>
> User._meta.get_field('is_staff').default = Tr
Having this line of code:
User._meta.get_field('is_staff').default = True
in the models.py for one of my apps works without problems.
I wonder if it's possible to make email unique and first_name,last_name
unique_together by using this technique.
This:
User._meta.get_field('email').unique = Tr
It's amazing for me, But I found a best solution!
django-registration have form with checking unique email:
RegistrationFormUniqueEmail
http://bitbucket.org/ubernostrum/django-registration/issue/13/password-reset-issues-emails-should-be#comment-15422
On 26 июл, 15:09, ramusus wrote:
> Thanks,
Thanks, Andy and Parag!
Validate email field via AJAX - very good idea.
Could you describe case with pre-save signal in more detail, please!
If I understand correctly, you are offering to use pre-save signal
and raise ValidationError if email of new User exists in DB or smthing
else?
Could
Yes that is also a good idea. Validate the form with an AJAX call when the
user enters the email addr (or clicks on Submit)
--
Thanks & Regards
Parag Shah
http://blog.adaptivesoftware.biz
On Wed, Jul 22, 2009 at 11:21 AM, Andy McKay wrote:
>
> Use a pre-save signal, but also validate your forms
Use a pre-save signal, but also validate your forms correctly.
On 21-Jul-09, at 12:33 PM, ramu...@gmail.com wrote:
> Another idea may be to open a new ticket and upload a patch with new
> parameter inside settings.py:
>
> AUTH_USER_EMAIL_UNIQUE = True
You could do that, but if I had anything to
ib.auth by ensuring
> the email field entry is unique:
>
> User._meta.fields[4].unique = True
>
> Where is best place in code to do that?
>
> I want to avoid using the number fields[4]. It's better to user fields
> ['email'], but fields is not dictionary, only list.
I need to patch the standard User model of contrib.auth by ensuring
the email field entry is unique:
User._meta.fields[4].unique = True
Where is best place in code to do that?
I want to avoid using the number fields[4]. It's better to user fields
['email'], but fields is not d
On Jul 18, 3:54 pm, Asinox wrote:
> Hi guys, im new with Django, i want to know how ill add a email field
> to the registration form from the User model.
>
> thanks
please, give some more details, as there is no "registration form from
the User model", AFAIK
for registrat
Hi guys, im new with Django, i want to know how ill add a email field
to the registration form from the User model.
thanks
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to
> registerResponse5 = UserCreationFormExtended(request.POST)
>
> if registerResponse1.is_valid() and registerResponse5.is_valid():
> userObject = registerResponse1.save(commit = False)
> userObject.email = registerResponse5 -> how can i access the
> email field value?
eationForm(request.POST)
registerResponse5 = UserCreationFormExtended(request.POST)
if registerResponse1.is_valid() and registerResponse5.is_valid():
userObject = registerResponse1.save(commit = False)
userObject.email = registerResponse5 -> how c
37 matches
Mail list logo