Re: TemplateSyntaxError: 'subpackage.echo' is not a valid tag library

2015-11-12 Thread James Schneider
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

Re: Apache2, mod_wsgi and django setup

2015-11-12 Thread Gary Roach
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

Re: Apache2, mod_wsgi and django setup

2015-11-12 Thread James Schneider
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

Re: Apache2, mod_wsgi and django setup

2015-11-12 Thread Andrew Farrell
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

Apache2, mod_wsgi and django setup

2015-11-12 Thread Gary Roach
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

Re: problema con un select

2015-11-12 Thread miguel angel lopez mendo
--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:

Re: Custom user model password is not hashed

2015-11-12 Thread Andreas Kuhne
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

Re: Custom user model password is not hashed

2015-11-12 Thread Benjamin Smith
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: >

Re: problema con un select

2015-11-12 Thread miguel angel lopez mendo
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:

Re: Custom user model password is not hashed

2015-11-12 Thread Andreas Kuhne
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

Re: Custom user model password is not hashed

2015-11-12 Thread Thorsten Sanders
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.

Re: Custom user model password is not hashed

2015-11-12 Thread aRkadeFR
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

Custom user model password is not hashed

2015-11-12 Thread Benjamin Smith
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 =

Re: Disable autocomplete in admin field

2015-11-12 Thread Ezequiel Bertti
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 =

Re: Domain Driven Development

2015-11-12 Thread Vinicius Assef
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

Re: Disable autocomplete in admin field

2015-11-12 Thread Erik Cederstrand
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:

Re: TemplateSyntaxError: 'subpackage.echo' is not a valid tag library

2015-11-12 Thread Jose Paul
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) --

TemplateDoesNotExist: first/test.html DJango 1.8

2015-11-12 Thread Jose Paul
I am getting several TemplateDoesNotExist .like below . == ERROR: test_pickling (template_tests.test_response.SimpleTemplateResponseTest) -- Traceback (most

Re: Disable autocomplete in admin field

2015-11-12 Thread Ezequiel Bertti
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

Cannot assign object: instance isn't saved in the (wrong?) database

2015-11-12 Thread Julien Delafontaine
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 =

Re: How to get logged username in template

2015-11-12 Thread Dariusz Mysior
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

Disable autocomplete in admin field

2015-11-12 Thread Erik Cederstrand
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

Re: DoesNotExist: Group matching query does not exist.

2015-11-12 Thread James Schneider
> 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

Re: How to get logged username in template

2015-11-12 Thread Dan Tagg
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: >

Re: How to get logged username in template

2015-11-12 Thread Andreas Kuhne
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':

Re: DoesNotExist: Group matching query does not exist.

2015-11-12 Thread Robin Fourcade
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