You need to create that tables at your database.
Please run:
python manage.py makemigrations
python manage.py migrate
Try it!
--
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, s
In your template put in your form:
{% csrf_token %}
example:
{% csrf_token %}
--
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...@
Put this code on first line in your files.py:
# -*- coding: utf-8 -*-
Maybe work!
--
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...@g
I don't used mysql,but in postgres for you write in a database your user db
needs permission to write.
Check that!
--
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
Other way is use sessions!
Django provide session midleware.
You can get the session dict out of the view!
Sorry my english, I am a Brazilian guy!
>
>
>
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop
Maybe a global state? Yes!
https://docs.djangoproject.com/en/1.7/topics/http/middleware/#init
I never did that, but you can try!
--
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
You can use middlewares!!! It is a way...
--
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
Can you give a example? be more especific, post some code.
--
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
I will give you one more complete example:
Custom a User is not easy you need to do many things:
In that link django-docs explain all for you and there is an example with
email field.
https://docs.djangoproject.com/en/1.7/topics/auth/customizing/#a-full-example
My tip is: In the docs there is
You can inheriant of AbstractBaseUser and define your field:
from django.contrib.auth.models import AbstractBaseUser
class MyCustomUser(AbstractBaseUser):
mail = models.EmailField(max_lenght=254)
REQUIRED_FIELDS = ['mail']
# more code
Please sorry about my english, I'm a Brazili
Em production you need to run the command: python manage.py collectstatic
and you need configure your production serve like "apache" to read the
'static' folder in you root project.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscrib
No, the user class uses 75. You need to change to 254.
models.EmailField(max_lenght=254)
>
>
--
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+unsub
Change your method:
def ask_number(self,question,low,high):
response=None
while response not in range(low,high):
response=int(input(question))
change self to class:
This way you can call the method directly from Hand.
@classmethod
def ask_number(class,question,l
13 matches
Mail list logo