On Thu, Nov 12, 2015 at 5:10 AM, Jose Paul wrote:
> I am just running DJango 1.8 test cases ,here is start of the error trace .
>
> =
> ERROR: test_load06 (template_tests.syntax_tests.test_load.LoadTagTests)
> ---
Andrew;
I forgot all about the process tables. Thanks. Interesting though,
systemctl and mod_wsgi both start a root instance and then fork off 3-4
www-data instances. I assume that this is normal. The python manage.py
runserver on the other hand doesn't even show up in the process table. I
On Thu, Nov 12, 2015 at 2:34 PM, Gary Roach
wrote:
> Setup for Django development system
>
> OS Debian Linux 8 (jessie) using systemd, not init.d
> Python 3.4.2
> Django 1.8.5
> Apache2 2.4.10 Debian (mmm-worker)
> mod_wsgi 4.3.0
> Postgresql 9.4.5
>
> Two virtual environments: archive (actual pr
Others on here should jump in with help with your other questions but I
think you should find the answers to your first and third by running `ps
aux | grep apache` and looking at the first column. You might also find it
enlightening to run `ps auxf | grep apache -B 2`.
On Thu, Nov 12, 2015 at 4:34
Setup for Django development system
OS Debian Linux 8 (jessie) using systemd, not init.d
Python 3.4.2
Django 1.8.5
Apache2 2.4.10 Debian (mmm-worker)
mod_wsgi 4.3.0
Postgresql 9.4.5
Two virtual environments: archive (actual project) and mysite (django
tutorial). Setup done with python3 -m venv
--template-
{% extends 'base.html' %}
{% load staticfiles %}
{% block head_title %}
{% endblock %}
Soni Compañia
{% block style %}
h1 {
text-transform: uppercase;
}
hr {
background-color: black;
height: 5px;
}
body{
margin: 0;
padding: 0;
}
a{
text-decoration:
Try to debug and check what your password value is after the set_password()
statement. Also have you checked the database after trying to create a
user with the new method? It should be hashed in the database. This is
stuff that should "just work" in django (it's regulated by the
AbstractBaseUser
I have changed user.set_password(self.cleaned_data["password"]) to
user.set_password(password).
But I am getting the same result.
On Thu, Nov 12, 2015 at 8:57 PM, Andreas Kuhne
wrote:
> As aRkadeFR says, you seam to have mixed code there
>
> The row:
> user.set_password(self.cleaned_data["pa
No me queda ..
El miércoles, 11 de noviembre de 2015, 13:34:13 (UTC-6), alan.avalosh
escribió:
>
> En el método del view, no estás regresando la colección de objetos tipo
> Medio.
>
> Sent from my iPhone
>
> On Nov 11, 2015, at 12:19 PM, miguel angel lopez mendo > wrote:
>
> vi
As aRkadeFR says, you seam to have mixed code there
The row:
user.set_password(self.cleaned_data["password"])
is taken from a form somewhere and won't work. It should instead be :
user.set_password(password)
I suppose the password is going through to the create method via the kwargs
argument
If you wanna set the password yourself you need to generate it:
https://docs.djangoproject.com/en/1.8/topics/auth/passwords/
scroll down to the bottom and have a lookt at make_password
Am 12.11.2015 um 16:11 schrieb Benjamin Smith:
I have my own custom User model, and its own Manger too.
Mo
Hello,
I don't quite get the code in your method: 'MyUserManager.create_user':
user.set_password(self.cleaned_data["password"])
You're in your Manager method but call self.cleaned_data ?
You can set a breakpoint inside your method with pdb to see
what's going on with your fields?
On 11/12
I have my own custom User model, and its own Manger too.
Models:
class MyUser(AbstractBaseUser, PermissionsMixin):
email = models.EmailField(max_length=255, unique=True)
first_name = models.CharField(max_length=35)
last_name = models.CharField(max_length=35)
username = models.Char
Great!
If you prefer to write some code and not implement new class. What you
thing to override the *get_form *method on model admin?
https://docs.djangoproject.com/en/1.8/ref/contrib/admin/#django.contrib.admin.ModelAdmin.get_form
def get_form(self, request, obj=None, **kwargs):
form = supe
Yes, and you should.
Note the "domain objects" cited from the book doesn't mean "model objects".
In an active record model (as in Django) it can be a bit confusing, but you
should have the so called Business Objects. It is what the book calls
"domain objects". They are objects that map the "pro
Hi Ezequeil,
Thanks for the explanation! This worked, but defining a new widget from scratch
meant that I lost the other helpful attributes (length, class etc.) that the
admin adds for me. Instead, in the DRY spirit, I opted to just add this one
extra attribute. Here's the relevant code:
class
I am just running DJango 1.8 test cases ,here is start of the error trace .
=
ERROR: test_load06 (template_tests.syntax_tests.test_load.LoadTagTests)
--
Traceback
I am getting several TemplateDoesNotExist .like below .
==
ERROR: test_pickling
(template_tests.test_response.SimpleTemplateResponseTest)
--
Traceback (most rece
In html:
Um django you need to create a form for your model and set a field to
username. In this field, set a widget like this:
username = forms.CharField(widget=forms.TextInput(attrs={'autocomplete':
'off'}))
Now you set a form on your model admin, like this example
https://docs.djangoproje
Hello,
I have multiple databases, so in my queries I must exploit the `using`
keyword (even if here I consider only **one** of them).
Now in `MY_DB`, I want to create a `User` that has a reference to a
`People` entry - a different table in the **same** database. I do
person = People(firstn
Thanks for both advice. I am not advanced programmer sow I use the simplest
solution on this moment this first one Andréas Kühne. Thanks it works!
W dniu czwartek, 12 listopada 2015 08:46:06 UTC+1 użytkownik Dariusz Mysior
napisał:
>
> I am using Django 1.8 with Python 3.4 I had no idea why my t
Hello,
I have a model with a CharField named "username". When I edit a model instance
in the admin, my browser likes to autocomplete the contents of the "username"
field with my username for the Django site, regardless of what was entered
previously.
Is there anything I can do to disable this
> File
"/usr/local/lib/python2.7/dist-packages/django/db/models/query.py", line
334, in get
>
> self.model._meta.object_name
>
> DoesNotExist: Group matching query does not exist.
>
>
> Can someone help me ?
>
BTW, this is a standard exception raised by Django for queryset operations
that ac
I would recommend using allauth
http://django-allauth.readthedocs.org/en/latest/templates.html. It has
template tags for adding all that info, creates pages for logging in, picks
up your base template etc etc.
Dan
On 12 November 2015 at 08:57, Andreas Kuhne
wrote:
> Hi,
>
> First of all, you ar
Hi,
First of all, you are using request.user.username and not username in your
template. If you want the username to be accessed via the "username"
variable. You should write this in your view:
def profile(request):
return render_to_response('accounts/profile.html', {'username':
request.user.
Thanks for your reply,
It was in the DB but, I don't know why, I had this issue. I made the
migration a second time and this time, it worked.
Thanks,
Robin.
-- Solved.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this g
26 matches
Mail list logo