Re: Data base connection problem

2016-02-13 Thread James Schneider
On Feb 13, 2016 9:42 PM, "ahmed waqas Nasir" wrote: > > i have made a model names STUDENT and when i run migrataion no migration applied but when from admin i tried to browse student i got following error Have you run 'manage.py makemigrations' to generate a new migration, and then run 'manage.p

Data base connection problem

2016-02-13 Thread ahmed waqas Nasir
i have made a model names STUDENT and when i run migrataion no migration applied but when from admin i tried to browse student i got following error OperationalError at /admin/app/student/ no such table: app_student Request Method: GET Request URL: http://127.0.0.1:8000/admin/app/student/ Djan

Re: De Morgan's Law and QuerySet semantics

2016-02-13 Thread Lucas Wiman
> > Why shouldn't test_obj be in that query result? test_obj has a m2m with > int_value 10 and a m2m (although another one) with char_value bar > The assertions are just saying what the current behavior of the ORM *is*. Under the hood, it's because Q(m2ms__int_value=10) & Q(m2ms__char_value='b

Re: User logged in at same time as admin superuser?

2016-02-13 Thread Dheerendra Rathor
Extending on monoBOT's answer, you can also use your private IP (like 192.168.x.x) for another session. Though you need to start server on 0.0.0.0 On Sun, 14 Feb 2016 at 06:10 monoBOT wrote: > You can do that... > > For one of the users go to localhost:8000 and for the other go to > 127.0.0.1:80

Re: Django is creating duplicate queries for prefetch_related

2016-02-13 Thread Dheerendra Rathor
Thanks Tim, from the ticket and Patch it looks like this was my issue. On Sun, 14 Feb 2016 at 08:20 Tim Graham wrote: > Maybe https://code.djangoproject.com/ticket/25546 fixes it? This will be > in Django 1.10. > > > On Friday, February 12, 2016 at 10:18:22 PM UTC-5, Dheerendra Rathor wrote: >>

Re: De Morgan's Law and QuerySet semantics

2016-02-13 Thread Tim Graham
I didn't read closely enough to completely understand but i'll mention that Q object behavior is one of the trickiest bits of the ORM. Some of the relevant reading might be: * https://github.com/django/django/pull/4385 * https://github.com/django/django/pull/6005 Anssi would be the person to ta

Re: Migrations in Django 1.9: verbose_name and verbose_name_plural

2016-02-13 Thread Tim Graham
The only thing that comes to mind is a paragraph in the 1.8 release notes, "When the leave_locale_alone attribute is False, translations are now deactivated instead of

Re: De Morgan's Law and QuerySet semantics

2016-02-13 Thread Vijay Khemlani
assert test_obj not in TestObj.objects.filter(Q(m2ms__int_value=10) & Q(m2ms__char_value='bar')) Why shouldn't test_obj be in that query result? test_obj has a m2m with int_value 10 and a m2m (although another one) with char_value bar On Sat, Feb 13, 2016 at 7:45 PM, Lucas Wiman wrote: > I'm wo

Re: Django is creating duplicate queries for prefetch_related

2016-02-13 Thread Tim Graham
Maybe https://code.djangoproject.com/ticket/25546 fixes it? This will be in Django 1.10. On Friday, February 12, 2016 at 10:18:22 PM UTC-5, Dheerendra Rathor wrote: > > Hello, > > Recently I was monitoring db queries created by Django and a particular > block was behaving unusual. > Here is the

Re: User logged in at same time as admin superuser?

2016-02-13 Thread monoBOT
You can do that... For one of the users go to localhost:8000 and for the other go to 127.0.0.1:8000 also on linux you can set on /etc/hosts alternative names for localhost 2016-02-13 23:18 GMT+00:00 James Schneider : > > On Feb 13, 2016 10:04 AM, "Jason" wrote: > > > > When using Django app on

Re: User logged in at same time as admin superuser?

2016-02-13 Thread James Schneider
On Feb 13, 2016 10:04 AM, "Jason" wrote: > > When using Django app on localhost (development server), can a standard user be logged in at the same time as an admin superuser? My standard user gets logged out each time I log in with the admin superuser in a separate browser window. Is this because

De Morgan's Law and QuerySet semantics

2016-02-13 Thread Lucas Wiman
I'm working on the django-predicate library, which defines in-memory evaluation semantics for Q objects. The eventual goal is to precisely match the behavior of the ORM on the subset of supported lookup types. Yesterday, I noticed a bug in that library, where there was a mismatch with the behav

Mismatch between the "date" template filter 'W' and strptime '%W'

2016-02-13 Thread Michal Petrucha
Hi folks, We just tried to use the built-in WeekArchiveView, and we hit a snag when trying to reverse URLs pointing to it from within templates using something like:: {% url "my-weekly-archive" next_week|date:"Y" next_week|date:"W" %} The docs for WeekArchiveView [1] state:: The '%W' fo

Re: Can't log in with multiple users

2016-02-13 Thread Jason
Problem solved... I just used two different browsers (Safari, Firefox, etc.) to run separate sessions of my Django app. This allows me to log in with my standard user using one browser, and I can then log in with the admin superuser using the second browser. I'm sure there is a way to workaroun

User logged in at same time as admin superuser?

2016-02-13 Thread Jason
When using Django app on localhost (development server), can a standard user be logged in at the same time as an admin superuser? My standard user gets logged out each time I log in with the admin superuser in a separate browser window. Is this because of the session management? Thank you for a

Can't log in with multiple users

2016-02-13 Thread Jason
Please help! I have a Django app that uses django-redux for registration/login/logout tasks, and I am now having a problem with only being able to sign into the app with one user account at a time. I need to be able to allow "multiple" users to log in, including the admin account, at the same t

Re: Problem installing fixtures

2016-02-13 Thread WST
Hi Carlos, Yes, I am. I would be grateful if you could point me in the direction to solve this. I have made quite a few changes to my JSON file before this error occurred. The initial error was: django.db.utils.IntegrityError: Problem installing fixture '/path/to/Backups/export_16.json': Could

Migrations in Django 1.9: verbose_name and verbose_name_plural

2016-02-13 Thread Marco Badan
Hello, I've upgraded a project to Django 1.9. I've: LANGUAGE_CODE = 'it' LANGUAGES = (('it', 'Italian'),) With Django 1.8 after running makemigrations I got the no changes detected message. On 1.9 makemigrations creates migrations for all of my apps and all third party apps. I had a look at