Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Mike Dewhirst

On 12/02/2019 4:54 pm, Victor H. Velasquez Rizo wrote:

Hi Mike.
I have spend hours trying to get the code where all this crazyness is 
happening with no good luck.
I would like to ask you if there is any posibility you can access my 
computer trhoug TEAMVIWER and guide me on this.


I would love to help except I am under time pressure myself. I am a 
procrastinator and frequently do small things to postpone doing my own 
hard things. That's why I responded to your original email.


Let me recommend that you start a new thread with a new subject line to 
seek fresh assistance. Write a detailed description of your problem 
including what you have done to track it down. It might take you some 
hours to edit it and get it exactly right. I have found nine times out 
of ten doing that forces me to do extra research so my request for help 
doesn't look too half-baked. Usually I end up needing to check things in 
the docs and that frequently solves my problem.


A fresh and well researched request for help will attract support from 
people much more expert than me.


In this thread you didn't reveal everything you had tried and you didn't 
reveal the entire error trace nor any source which you suspected. I just 
saw what the error said and pointed that out. The actual error is your 
best lead. Try and follow that to write your story.


Good luck

Mike



On Mon, Feb 11, 2019 at 9:40 PM Mike Dewhirst > wrote:


On 12/02/2019 2:19 pm, Victor H. Velasquez Rizo wrote:
> Hello mike.
> Thank you for all this information.
>
> I've been checking the migrations but I don't see anything with the
> *sort_value*

In that case you have asked for gallery_photos.sort_value
somewhere in
your code and that is being interpreted by the Admin as a field and
because it doesn't exist is calling it a programming error.

Certainly easier to find/fix than cheating migrations!

Cheers

Mike

>
> Photologue Galleries  
     Add
> Change
> Photo effects         Add     Change
> Photo sizes   Add     Change
> Photos        Add     Change
> Watermarks
>
>
> When I get into Photos, I see the whole list of pictures that
has been
> created, but once I *delete selected items, *the error comes up.
>
>
>   Select photo to change
>
>   * Add photo 
>   * Upload a zip archive
>     
>
> Search
>
>
>
> Action: Go 0 of 10 selected
>
> Title 
>
> Date taken 
>
> Date added 
>
> Is public 
>
> View count 
>
> Thumbnail
>       Paris 
     (None)
> Feb. 11, 2019, 10:02 p.m.     True    0
> 
>       VICTOR 
    (None)
> Jan. 21, 2019, 11:50 a.m.     True    0
> 
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> On Mon, Feb 11, 2019 at 8:23 PM Mike Dewhirst
mailto:mi...@dewhirst.com.au>
> >>
wrote:
>
>     On 12/02/2019 11:47 am, Victor H. Velasquez Rizo wrote:
>     > Yes Mike.
>     > I have done both:
>
>     In that case, you need to inspect the database itself using
>     PGAdmin (or
>     similar for other databases) and confirm that the gallery_photos
>     table
>     does indeed have a sort_value column.
>
>     If not - as the error message says - then the database might
have
>     been
>     rebuilt from a dump taken prior the migration which added
>     sort_value. Or
>     perhaps restored from an earlier backup. In any case, if it
doesn't
>     exist you have to make it exist.
>
>     I'm assuming this is a development database not in production so
>     one way
>     is to cheat.  If anyone else reading this notices a mistake
please
>     jump
>     in and correct it.
>
>     Look through the migrations and find the one which first added
>     sort_value. Delete the migrations.AddField() call for
sort_value from
>     that migration. Look for any mentions of sort_value in other
>     migrations
>     and get rid of them too. There will also be an AlterTable or
Options
>     line refer

Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Victor H. Velasquez Rizo
Hi Mike.
I have spend hours trying to get the code where all this crazyness is
happening with no good luck.
I would like to ask you if there is any posibility you can access my
computer trhoug TEAMVIWER and guide me on this.

On Mon, Feb 11, 2019 at 9:40 PM Mike Dewhirst  wrote:

> On 12/02/2019 2:19 pm, Victor H. Velasquez Rizo wrote:
> > Hello mike.
> > Thank you for all this information.
> >
> > I've been checking the migrations but I don't see anything with the
> > *sort_value*
>
> In that case you have asked for gallery_photos.sort_value somewhere in
> your code and that is being interpreted by the Admin as a field and
> because it doesn't exist is calling it a programming error.
>
> Certainly easier to find/fix than cheating migrations!
>
> Cheers
>
> Mike
>
> >
> > Photologue Galleries
>  Add
> > Change
> > Photo effects Add Change
> > Photo sizes   Add Change
> > PhotosAdd Change
> > Watermarks
> >
> >
> > When I get into Photos, I see the whole list of pictures that has been
> > created, but once I *delete selected items, *the error comes up.
> >
> >
> >   Select photo to change
> >
> >   * Add photo 
> >   * Upload a zip archive
> > 
> >
> > Search
> >
> >
> >
> > Action: Go 0 of 10 selected
> >
> > Title 
> >
> > Date taken 
> >
> > Date added 
> >
> > Is public 
> >
> > View count 
> >
> > Thumbnail
> >   Paris 
>  (None)
> > Feb. 11, 2019, 10:02 p.m. True0
> > 
> >   VICTOR 
> (None)
> > Jan. 21, 2019, 11:50 a.m. True0
> > 
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Feb 11, 2019 at 8:23 PM Mike Dewhirst  > > wrote:
> >
> > On 12/02/2019 11:47 am, Victor H. Velasquez Rizo wrote:
> > > Yes Mike.
> > > I have done both:
> >
> > In that case, you need to inspect the database itself using
> > PGAdmin (or
> > similar for other databases) and confirm that the gallery_photos
> > table
> > does indeed have a sort_value column.
> >
> > If not - as the error message says - then the database might have
> > been
> > rebuilt from a dump taken prior the migration which added
> > sort_value. Or
> > perhaps restored from an earlier backup. In any case, if it doesn't
> > exist you have to make it exist.
> >
> > I'm assuming this is a development database not in production so
> > one way
> > is to cheat.  If anyone else reading this notices a mistake please
> > jump
> > in and correct it.
> >
> > Look through the migrations and find the one which first added
> > sort_value. Delete the migrations.AddField() call for sort_value from
> > that migration. Look for any mentions of sort_value in other
> > migrations
> > and get rid of them too. There will also be an AlterTable or Options
> > line referring to sort_value which needs to have sort_value removed.
> >
> > That will trick the migration system into thinking it doesn't
> > exist. The
> > next time you run makemigrations it will discover a new field
> > sort_value
> > and add it.
> >
> > There is a potential problem here. If migrations from other apps
> > depend
> > on sort_value things may come unstuck. However, it is a good bet that
> > sort_value was added to adjust a display sequence and won't have
> > wider
> > impact.
> >
> > This is tricky territory so you should do nothing until you have
> > dumped
> > your database and proved you can restore it. Keep your dump as a
> > pre-sort_value backup.
> >
> > Go carefully
> >
> > Good luck
> >
> > Mike
> >
> > >
> > > *python manage.py makemigrations*
> > >
> >
>  
> /home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
> >
> > > RemovedInDjango19Warning: Passing callable argumentsto queryset is
> > > deprecated.
> > >   value, lookups, used_joins = self.prepare_lookup_value(value,
> > > lookups, can_reuse,allow_joins)
> > >
> > > *No changes detected*
> > >
> > > *python manage.py migrate*
> > >
> >
>  
> /home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
> >
> > > RemovedInDjango19Warning: Passing callable argumentsto queryse

Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Mike Dewhirst

On 12/02/2019 2:19 pm, Victor H. Velasquez Rizo wrote:

Hello mike.
Thank you for all this information.

I've been checking the migrations but I don't see anything with the 
*sort_value*


In that case you have asked for gallery_photos.sort_value somewhere in 
your code and that is being interpreted by the Admin as a field and 
because it doesn't exist is calling it a programming error.


Certainly easier to find/fix than cheating migrations!

Cheers

Mike



Photologue Galleries 	Add 
Change

Photo effects   Add Change
Photo sizes Add Change
Photos  Add Change
Watermarks


When I get into Photos, I see the whole list of pictures that has been 
created, but once I *delete selected items, *the error comes up.



  Select photo to change

  * Add photo 
  * Upload a zip archive


Search



Action: Go 0 of 10 selected

Title 

Date taken 

Date added 

Is public 

View count 

Thumbnail
	Paris  	(None) 
Feb. 11, 2019, 10:02 p.m. 	True 	0 

	VICTOR  	(None) 
Jan. 21, 2019, 11:50 a.m. 	True 	0 
























On Mon, Feb 11, 2019 at 8:23 PM Mike Dewhirst > wrote:


On 12/02/2019 11:47 am, Victor H. Velasquez Rizo wrote:
> Yes Mike.
> I have done both:

In that case, you need to inspect the database itself using
PGAdmin (or
similar for other databases) and confirm that the gallery_photos
table
does indeed have a sort_value column.

If not - as the error message says - then the database might have
been
rebuilt from a dump taken prior the migration which added
sort_value. Or
perhaps restored from an earlier backup. In any case, if it doesn't
exist you have to make it exist.

I'm assuming this is a development database not in production so
one way
is to cheat.  If anyone else reading this notices a mistake please
jump
in and correct it.

Look through the migrations and find the one which first added
sort_value. Delete the migrations.AddField() call for sort_value from
that migration. Look for any mentions of sort_value in other
migrations
and get rid of them too. There will also be an AlterTable or Options
line referring to sort_value which needs to have sort_value removed.

That will trick the migration system into thinking it doesn't
exist. The
next time you run makemigrations it will discover a new field
sort_value
and add it.

There is a potential problem here. If migrations from other apps
depend
on sort_value things may come unstuck. However, it is a good bet that
sort_value was added to adjust a display sequence and won't have
wider
impact.

This is tricky territory so you should do nothing until you have
dumped
your database and proved you can restore it. Keep your dump as a
pre-sort_value backup.

Go carefully

Good luck

Mike

>
> *python manage.py makemigrations*
>

/home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:

> RemovedInDjango19Warning: Passing callable argumentsto queryset is
> deprecated.
>   value, lookups, used_joins = self.prepare_lookup_value(value,
> lookups, can_reuse,allow_joins)
>
> *No changes detected*
>
> *python manage.py migrate*
>

/home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:

> RemovedInDjango19Warning: Passing callable argumentsto queryset is
> deprecated.
>   value, lookups, used_joins = self.prepare_lookup_value(value,
> lookups, can_reuse,allow_joins)
>
> Operations to perform:
>   Synchronize unmigrated apps: anymail, filebrowser, staticfiles,
> admindocs, model_utils, tinymce, messages, widget_tweaks, sitemaps,
> humanize, django_extensions, rest_framework, storages,
debug_toolbar,
> admin_reorder
>   Apply all migrations: invoices, general, chunks, makeaword,
> accounts, images, comic, orders, illustrate, pressroom, sites,
write,
> contenttypes, book, thumbnail, django_comments, tellinstories,
> sessions, cart, auth, definition, admin, gift_cards, photologue,
> wordsearch, stationary
> Synchronizing apps without migrations:
>   Creatin

Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Victor H. Velasquez Rizo
Hello mike.
Thank you for all this information.

I've been checking the migrations but I don't see anything with the
*sort_value*

Photologue 
Galleries Add Change
Photo effects Add Change
Photo sizes Add Change
Photos Add Change
Watermarks

When I get into Photos, I see the whole list of pictures that has been
created, but once I *delete selected items, *the error comes up.

Select photo to change

   - Add photo 
   - Upload a zip archive
   

[image: Search]

Action:  - Delete selected photos  Go 0 of 10 selected
Title 
Date taken 


Date added 
Is public 
View count 
Thumbnail
Paris  (None) Feb. 11,
2019, 10:02 p.m. [image: True] 0

VICTOR  (None) Jan. 21,
2019, 11:50 a.m. [image: True] 0






















On Mon, Feb 11, 2019 at 8:23 PM Mike Dewhirst  wrote:

> On 12/02/2019 11:47 am, Victor H. Velasquez Rizo wrote:
> > Yes Mike.
> > I have done both:
>
> In that case, you need to inspect the database itself using PGAdmin (or
> similar for other databases) and confirm that the gallery_photos table
> does indeed have a sort_value column.
>
> If not - as the error message says - then the database might have been
> rebuilt from a dump taken prior the migration which added sort_value. Or
> perhaps restored from an earlier backup. In any case, if it doesn't
> exist you have to make it exist.
>
> I'm assuming this is a development database not in production so one way
> is to cheat.  If anyone else reading this notices a mistake please jump
> in and correct it.
>
> Look through the migrations and find the one which first added
> sort_value. Delete the migrations.AddField() call for sort_value from
> that migration. Look for any mentions of sort_value in other migrations
> and get rid of them too. There will also be an AlterTable or Options
> line referring to sort_value which needs to have sort_value removed.
>
> That will trick the migration system into thinking it doesn't exist. The
> next time you run makemigrations it will discover a new field sort_value
> and add it.
>
> There is a potential problem here. If migrations from other apps depend
> on sort_value things may come unstuck. However, it is a good bet that
> sort_value was added to adjust a display sequence and won't have wider
> impact.
>
> This is tricky territory so you should do nothing until you have dumped
> your database and proved you can restore it. Keep your dump as a
> pre-sort_value backup.
>
> Go carefully
>
> Good luck
>
> Mike
>
> >
> > *python manage.py makemigrations*
> >
> /home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
>
> > RemovedInDjango19Warning: Passing callable argumentsto queryset is
> > deprecated.
> >   value, lookups, used_joins = self.prepare_lookup_value(value,
> > lookups, can_reuse,allow_joins)
> >
> > *No changes detected*
> >
> > *python manage.py migrate*
> >
> /home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
>
> > RemovedInDjango19Warning: Passing callable argumentsto queryset is
> > deprecated.
> >   value, lookups, used_joins = self.prepare_lookup_value(value,
> > lookups, can_reuse,allow_joins)
> >
> > Operations to perform:
> >   Synchronize unmigrated apps: anymail, filebrowser, staticfiles,
> > admindocs, model_utils, tinymce, messages, widget_tweaks, sitemaps,
> > humanize, django_extensions, rest_framework, storages, debug_toolbar,
> > admin_reorder
> >   Apply all migrations: invoices, general, chunks, makeaword,
> > accounts, images, comic, orders, illustrate, pressroom, sites, write,
> > contenttypes, book, thumbnail, django_comments, tellinstories,
> > sessions, cart, auth, definition, admin, gift_cards, photologue,
> > wordsearch, stationary
> > Synchronizing apps without migrations:
> >   Creating tables...
> > Running deferred SQL...
> >   Installing custom SQL...
> > *Running migrations:*
> > *  No migrations to apply.*
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Feb 11, 2019 at 5:42 PM Mike Dewhirst  > > wrote:
> >
> > On 12/02/2019 10:23 am, Victor H. Velasquez Rizo wrote:
> > > Hello Mike.
> > > I have ran the migrations for PHOLOGUE:
> > > *Running migrations:*
> > > *  No migrations to apply.*
> >

Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Mike Dewhirst

On 12/02/2019 11:47 am, Victor H. Velasquez Rizo wrote:

Yes Mike.
I have done both:


In that case, you need to inspect the database itself using PGAdmin (or 
similar for other databases) and confirm that the gallery_photos table 
does indeed have a sort_value column.


If not - as the error message says - then the database might have been 
rebuilt from a dump taken prior the migration which added sort_value. Or 
perhaps restored from an earlier backup. In any case, if it doesn't 
exist you have to make it exist.


I'm assuming this is a development database not in production so one way 
is to cheat.  If anyone else reading this notices a mistake please jump 
in and correct it.


Look through the migrations and find the one which first added 
sort_value. Delete the migrations.AddField() call for sort_value from 
that migration. Look for any mentions of sort_value in other migrations 
and get rid of them too. There will also be an AlterTable or Options 
line referring to sort_value which needs to have sort_value removed.


That will trick the migration system into thinking it doesn't exist. The 
next time you run makemigrations it will discover a new field sort_value 
and add it.


There is a potential problem here. If migrations from other apps depend 
on sort_value things may come unstuck. However, it is a good bet that 
sort_value was added to adjust a display sequence and won't have wider 
impact.


This is tricky territory so you should do nothing until you have dumped 
your database and proved you can restore it. Keep your dump as a 
pre-sort_value backup.


Go carefully

Good luck

Mike



*python manage.py makemigrations*
/home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156: 
RemovedInDjango19Warning: Passing callable argumentsto queryset is 
deprecated.
  value, lookups, used_joins = self.prepare_lookup_value(value, 
lookups, can_reuse,allow_joins)


*No changes detected*

*python manage.py migrate*
/home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156: 
RemovedInDjango19Warning: Passing callable argumentsto queryset is 
deprecated.
  value, lookups, used_joins = self.prepare_lookup_value(value, 
lookups, can_reuse,allow_joins)


Operations to perform:
  Synchronize unmigrated apps: anymail, filebrowser, staticfiles, 
admindocs, model_utils, tinymce, messages, widget_tweaks, sitemaps, 
humanize, django_extensions, rest_framework, storages, debug_toolbar, 
admin_reorder
  Apply all migrations: invoices, general, chunks, makeaword, 
accounts, images, comic, orders, illustrate, pressroom, sites, write, 
contenttypes, book, thumbnail, django_comments, tellinstories, 
sessions, cart, auth, definition, admin, gift_cards, photologue, 
wordsearch, stationary

Synchronizing apps without migrations:
  Creating tables...
    Running deferred SQL...
  Installing custom SQL...
*Running migrations:*
*  No migrations to apply.*







On Mon, Feb 11, 2019 at 5:42 PM Mike Dewhirst > wrote:


On 12/02/2019 10:23 am, Victor H. Velasquez Rizo wrote:
> Hello Mike.
> I have ran the migrations for PHOLOGUE:
> *Running migrations:*
> *  No migrations to apply.*
>

Ok, have you done manage.py makemigrations followed by manage.py
migrate?

>
>
>
>
>
>
> On Mon, Feb 11, 2019 at 4:02 PM Mike Dewhirst
mailto:mi...@dewhirst.com.au>
> >>
wrote:
>
>     On 12/02/2019 4:31 am, victor rizo wrote:
>>     Hello everyone.
>>
>>     I am desperate trying to find a solution for this issue...
>>
>>
>>       ProgrammingError at /admin/photologue/photo/
>>
>>     column photologue_gallery_photos.sort_value does not exist
>
>     This says the column "sort_value" does not exist in the table
>     "gallery_photos".
>
>     Column is database-speak for a model field. Your software thinks
>     the column exists therefore it is a programming error. My best
>     guess is that you need to do a migration.
>
> https://docs.djangoproject.com/en/1.11/topics/migrations/
>
>     Cheers
>
>     Mike
>
>
>>     LINE 1: ...lery_id", "photologue_gallery_photos"."photo_id",
>>     "photologu...
>>
>>     It is happening every time I try to delete a photo from
>>     *admin/photologue/photo.*
>>     *
>>     *
>>     *Any help you can provided?*
>>     *
>>     *
>>     *Thank you in advance.*
>>     --
>>     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

>> 

Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Victor H. Velasquez Rizo
Yes Mike.
I have done both:

*python manage.py makemigrations*
/home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
RemovedInDjango19Warning: Passing callable argumentsto queryset is
deprecated.
  value, lookups, used_joins = self.prepare_lookup_value(value, lookups,
can_reuse,allow_joins)

*No changes detected*

*python manage.py migrate*
/home/vic/dev/scribblitt/scribblitt-app/.env/local/lib/python2.7/site-packages/django/db/models/sql/query.py:1156:
RemovedInDjango19Warning: Passing callable argumentsto queryset is
deprecated.
  value, lookups, used_joins = self.prepare_lookup_value(value, lookups,
can_reuse,allow_joins)

Operations to perform:
  Synchronize unmigrated apps: anymail, filebrowser, staticfiles,
admindocs, model_utils, tinymce, messages, widget_tweaks, sitemaps,
humanize, django_extensions, rest_framework, storages, debug_toolbar,
admin_reorder
  Apply all migrations: invoices, general, chunks, makeaword, accounts,
images, comic, orders, illustrate, pressroom, sites, write, contenttypes,
book, thumbnail, django_comments, tellinstories, sessions, cart, auth,
definition, admin, gift_cards, photologue, wordsearch, stationary
Synchronizing apps without migrations:
  Creating tables...
Running deferred SQL...
  Installing custom SQL...
*Running migrations:*
*  No migrations to apply.*







On Mon, Feb 11, 2019 at 5:42 PM Mike Dewhirst  wrote:

> On 12/02/2019 10:23 am, Victor H. Velasquez Rizo wrote:
> > Hello Mike.
> > I have ran the migrations for PHOLOGUE:
> > *Running migrations:*
> > *  No migrations to apply.*
> >
>
> Ok, have you done manage.py makemigrations followed by manage.py migrate?
>
> >
> >
> >
> >
> >
> >
> > On Mon, Feb 11, 2019 at 4:02 PM Mike Dewhirst  > > wrote:
> >
> > On 12/02/2019 4:31 am, victor rizo wrote:
> >> Hello everyone.
> >>
> >> I am desperate trying to find a solution for this issue...
> >>
> >>
> >>   ProgrammingError at /admin/photologue/photo/
> >>
> >> column photologue_gallery_photos.sort_value does not exist
> >
> > This says the column "sort_value" does not exist in the table
> > "gallery_photos".
> >
> > Column is database-speak for a model field. Your software thinks
> > the column exists therefore it is a programming error. My best
> > guess is that you need to do a migration.
> >
> > https://docs.djangoproject.com/en/1.11/topics/migrations/
> >
> > Cheers
> >
> > Mike
> >
> >
> >> LINE 1: ...lery_id", "photologue_gallery_photos"."photo_id",
> >> "photologu...
> >>
> >> It is happening every time I try to delete a photo from
> >> *admin/photologue/photo.*
> >> *
> >> *
> >> *Any help you can provided?*
> >> *
> >> *
> >> *Thank you in advance.*
> >> --
> >> 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 email to
> >> django-users@googlegroups.com  >.
> >> Visit this group at https://groups.google.com/group/django-users.
> >> To view this discussion on the web visit
> >>
> https://groups.google.com/d/msgid/django-users/86a16f8d-1680-4418-9f00-d9eb41312dd7%40googlegroups.com
> >> <
> https://groups.google.com/d/msgid/django-users/86a16f8d-1680-4418-9f00-d9eb41312dd7%40googlegroups.com?utm_medium=email&utm_source=footer
> >.
> >> For more options, visit https://groups.google.com/d/optout.
> >
> >
> >
> > --
> >
> >
> >
> > Atte...,.
> > Vìctor Hugo Velàsquez Rizo
> > Cali - Colombia
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/3ca7d1f7-a15b-03d5-6514-716c397e235f%40dewhirst.com.au
> .
> For more options, visit https://groups.google.com/d/optout.
>


-- 



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAFCXTzimx%2BnMPz3-gYgohEsJay5coBrFwOsGPrVG

Re: Password Policy Adherence. Cannot use the passwords used before

2019-02-11 Thread Simon A
Yes that's very true. I guess I acquired a phobia for diving into the 
source code because of my first programming language (J**A) because it felt 
like I was reading cryptic stuff. But not with Python.

On Monday, February 11, 2019 at 9:08:35 PM UTC+8, Jason wrote:
>
> Sometimes going through the source code is the easiest way to figuring out 
> the problem :-)
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c47c8ef8-bd80-4d1e-a717-12f8520529f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


class view with filter on form input

2019-02-11 Thread Bob Bobsled
Hi,
I have form on a search page  called SearchForm where the user selects
items to search.
The rest part creates a URI which appears as below from the selected items
to search.

http://archive/ephemera/searchresult/?choose_collection=Macmillan&user_input=GuitarBuilder&choose_item=title

I'm trying to write a classview in views.py to get the URI parameters, then
fashion a query to place those in an object_list for viewing in a search
results template.

views.py
class SearchResultsView(django.views.generic.ListView):
template_name = 'ephemera/searchresults.html'
model = Item  #my model class

def get_queryset(self, **kwargs):

form = SearchForm()
choose_collection = self.request.GET.get('choose_collection')
user_input = self.request.GET.get('user_input')
choose_item = self.request.GET.get('choose_item')

object_list =
self.model.objects.filter(collection__icontains =
choose_collection).filter(choose_item__icontains = user_input)   #XXX

return object_list

I can't seem to figure out how to pass the choose_item get variable to the
filter.  Django complains cannot resolve keyword 'choose_item' into field.
The correct field is 'title' but I won't know that until the user selects
one of the choices from the form pull down menu.

The following query works fine directly on sqlite, but I can't seem to
figure out how to do it in the class view.

select * from ephemera_item where collection = 'MACMILLAN' AND title =
'Guitar Builder';

Could be my basic approach is bad too, because I'm only just starting out
with this.

Thank you for any advice.

Regards,
Bob

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALWZDaPAr0VYra-HazcwCXcvmh%3DYY9O9m1e6oKBTrxF9ouRz6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Mike Dewhirst

On 12/02/2019 10:23 am, Victor H. Velasquez Rizo wrote:

Hello Mike.
I have ran the migrations for PHOLOGUE:
*Running migrations:*
*  No migrations to apply.*



Ok, have you done manage.py makemigrations followed by manage.py migrate?








On Mon, Feb 11, 2019 at 4:02 PM Mike Dewhirst > wrote:


On 12/02/2019 4:31 am, victor rizo wrote:

Hello everyone.

I am desperate trying to find a solution for this issue...


  ProgrammingError at /admin/photologue/photo/

column photologue_gallery_photos.sort_value does not exist


This says the column "sort_value" does not exist in the table
"gallery_photos".

Column is database-speak for a model field. Your software thinks
the column exists therefore it is a programming error. My best
guess is that you need to do a migration.

https://docs.djangoproject.com/en/1.11/topics/migrations/

Cheers

Mike



LINE 1: ...lery_id", "photologue_gallery_photos"."photo_id",
"photologu...

It is happening every time I try to delete a photo from
*admin/photologue/photo.*
*
*
*Any help you can provided?*
*
*
*Thank you in advance.*
-- 
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 email to
django-users@googlegroups.com .
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit

https://groups.google.com/d/msgid/django-users/86a16f8d-1680-4418-9f00-d9eb41312dd7%40googlegroups.com

.
For more options, visit https://groups.google.com/d/optout.




--



Atte...,.
Vìctor Hugo Velàsquez Rizo
Cali - Colombia


--
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3ca7d1f7-a15b-03d5-6514-716c397e235f%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


pip install vs apps in folder

2019-02-11 Thread tech tech
Hi, all,

I am interested in this project:
https://github.com/mbraak/django-file-form

I run "pip install django-file-form" and everything works fine.
But, I want to change some behaviors of this upload package.
I feel this link
https://github.com/mbraak/django-file-form/tree/master/django_file_form
has all the source code and I can change some code in this link.
However, after I run "pip uninstall django-file-form" does not work.
So, my question is why it does not work after I uninstall it.
I downloaded the whole software. Why doesn't the project use the
source of django-file-form in the folder?

Thanks,

Tom

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF35gg2CwfbM28_LA-gbeebwSfikh7hg_cknYv3zq9tefD%3DTYQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Django-Photologue - error deleting a photo

2019-02-11 Thread Mike Dewhirst

On 12/02/2019 4:31 am, victor rizo wrote:

Hello everyone.

I am desperate trying to find a solution for this issue...


  ProgrammingError at /admin/photologue/photo/

column photologue_gallery_photos.sort_value does not exist


This says the column "sort_value" does not exist in the table 
"gallery_photos".


Column is database-speak for a model field. Your software thinks the 
column exists therefore it is a programming error. My best guess is that 
you need to do a migration.


https://docs.djangoproject.com/en/1.11/topics/migrations/

Cheers

Mike



LINE 1: ...lery_id", "photologue_gallery_photos"."photo_id", "photologu...

It is happening every time I try to delete a photo from 
*admin/photologue/photo.*

*
*
*Any help you can provided?*
*
*
*Thank you in advance.*
--
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 email to django-users@googlegroups.com 
.

Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/86a16f8d-1680-4418-9f00-d9eb41312dd7%40googlegroups.com 
.

For more options, visit https://groups.google.com/d/optout.


--
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/bd07614e-f32c-88d6-30b1-5917caffd3e7%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.


Django-Photologue - error deleting a photo

2019-02-11 Thread victor rizo
Hello everyone.

I am desperate trying to find a solution for this issue...

ProgrammingError at /admin/photologue/photo/

column photologue_gallery_photos.sort_value does not exist
LINE 1: ...lery_id", "photologue_gallery_photos"."photo_id", "photologu...


It is happening every time I try to delete a photo from 
*admin/photologue/photo.*

*Any help you can provided?*

*Thank you in advance.*

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/86a16f8d-1680-4418-9f00-d9eb41312dd7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Detail view + filter

2019-02-11 Thread Thibaud MONTAGNON
Hello,

I would like to know if it is posible to join a filter in a detail view ?

I want to put this :

def index(request):
model_list = Model.objects.all()
model_filter = ModelFilter(request.GET, queryset=model_list)

return render(request, 'model/index.html', {'filter': model_filter})

in this :

class DetailView(generic.DetailView):
model = Event
template_name = 'event/detail.html'

def get_queryset(self):
return Event.objects.filter()




-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/525bd4c1-7137-4551-b69e-f82abd8dcaf0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Django bugfix releases: 2.1.7, 2.0.12 and 1.11.20

2019-02-11 Thread Carlton Gibson
Updated releases correcting a packaging issue from this morning are now 
available for the 2.1, 2.0 and 1.11 release branches. 

https://www.djangoproject.com/weblog/2019/feb/11/bugfix-releases/ 



-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4FDCEA5F-D8BC-4F9C-8B0B-FB6F02DDEE59%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django 1.11.19 .whl failing with error

2019-02-11 Thread Kevin Carrogan
The Django 1.11.19 .whl release file appears to erroneously contain a file 
that appears to be from the 2.x release (it contains Py3 only code).

The file in question is django.contrib.admin.templatetags.base which 
shouldn't exist in the 1.11.19 release.

This file doesn't appear to exist in the .tar.gz file.

I'm downloading from https://pypi.org/project/Django/1.11.19/#files and the 
link for the bad .whl 
is 
https://files.pythonhosted.org/packages/6b/2a/6625366e0e26fcc638c76d1a8b63d8d24a99d129cfebf8b101aaab0327fd/Django-1.11.19-py2.py3-none-any.whl

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/50d61d22-0601-49a5-857a-5dd3db8ea90a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: The database driver doesn't support modern datatime types.

2019-02-11 Thread Ivan Martić
resolved.

Microsoft ODBC driver was missing, download it from MS official web page 
and all is working perfect now

On Monday, February 11, 2019 at 11:21:37 AM UTC+1, Ivan Martić wrote:
>
> Hi all, 
>
> I am migrating to from development to prod server and getting this error 
> app.
>
> Error started to show after installation of allauth library.
> I cant find anything on google related to this topic so I hope you can 
> help me out.
>
> Traceback is saying:
> Exception Type: ImproperlyConfigured at /accounts/login/
> Exception Value: The database driver doesn't support modern datatime types.
>
> DB is MSSQL and I should have all neccesery installation because it worked 
> previously (on local server - pyodbc, azure...)
>
> Thank you in advance
>
>
>

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f46f35b0-0dcf-4355-bc40-64f5463465d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Composite Primary / Foreign Key support

2019-02-11 Thread Michal Petrucha
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512

On Mon, Feb 11, 2019 at 01:08:41AM -0800, 'Lance Ellinghaus' via Django users 
wrote:
> I have seen references to people adding the support of composite primary 
> keys to Django for years, but it does not look like it has been added.
> 
> I have a number of legacy databases that I cannot add fields to but need to 
> be able to be queried through Django. They are read-only tables.
> A number of the tables are also related through Composite Foreign Keys and 
> I have seen some addons but not sure what is fully supported.
> 
> I am trying to use Django 2.1.5.
> 
> Any help or ideas would be appreciated, and saying  "Add a field to your 
> tables" is not an option.
> 
> Thank you.

Hi Lance,

I haven't been on top of this in recent years, but let me try.

When it comes to just composite primary keys, as long as you only need
read access, you might be able to get away with marking an arbitrary
field as the primary key. Using a non-unique field as the primary key
would make any writes to the database dangerous, but that's not your
case here. However, you also lose the invariant that filtering on the
“pk” field alias will match at most one row, which means the admin
would probably be off the table, too – since that assumes the “pk” is,
in fact, unique, and the same holds for any other package that makes
use of “pk”. You should still be okay in your own code, though.

For composite foreign keys, there is nowadays a private, undocumented
API, ForeignObject, which is what ForeignKey builds on. The general
ForeignObject lets you specify multiple fields that make up the
relation, you should be able to find some examples in the test suite
(there is a foreign_object package in there). Keep in mind that this
is an internal API, so it might change without warning.

Good luck,

Michal
-BEGIN PGP SIGNATURE-
Version: GnuPG v1

iQIcBAEBCgAGBQJcYXniAAoJEHA7T/IPM/kl8EAP/Rzaxqe0bDO6vkxb4/Mmmj5S
62t6Cfm3VqqK6NxYjRXG904jKwDI4HMH1SAs5fdVMh9vf+VBj/S5bcIpQbesqXbh
wbkcIn+mmnfhLDaHOGunYqp76tscBJv/rtxJZaX5NRLp7OraCWtbjRBtiw1fJ/tl
iJD0HRIk9zn0pqyX8GjeAyM0UR+uL1wwrvz8Ur85ASsc8pFThTP6ZMQoaEIgo9D+
HB3XfrhiOMd5Nb2SbjG4KCRe7alpFx83nuY53YVsv+8X+Nqp4Ndi7ch2Ni3jxxHf
R7qVJYsMp/l72CNb6KiT85sb6PwQyeVdvU78cXKjkIKDirskGgQIEW2OvK+ZXC3B
Aj4I+AMFXEKje8ITfW3/s/v+UNvVTNZHYC5NPZ6o50+YJFDoiwb0mpQMdUredWZk
nT2cYMgyPQA/XKN9w5vUCNbTebPG/AA7yCthXbOrHn9Xl+kICkXRjjl9fHRUs55Q
wgPqz0CFXPKaE+JFt/NABJzdSrki1y587GHsOb7hKFiQwS8DHU8WOMXkR3BGKEtN
q0gebcqKvVnjRwLLsBvB0h3uI/yifgBTp8G8/+tZ0WuNdongTe+yPzchxuRjgx10
e70xtBjgsyCQGRB3CPsgR2UelQOtAEt8ZyYwyPF5sQYOvQg1xjcYp87FqfqflSTE
6aQIMkXhKjKazmc/ew9F
=Ji5Z
-END PGP SIGNATURE-

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/20190211133426.GV10973%40konk.org.
For more options, visit https://groups.google.com/d/optout.


Re: Google+ shutdown and replacement for login

2019-02-11 Thread Manas Nikam
Have you tried Google login using Javascript send the user token you
receive at the front end to the backend and get user details through their
API

On Mon, Feb 11, 2019 at 6:49 PM Jason  wrote:

> Would it be better for you to reach out to whatever package you're using
> for login with the G+ API?  If this were strictly Django related, you would
> probably get help here.  However, since I imagine you're using a third
> party package, not sure if this is the best place for you to find answers.
>
> --
> 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 email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/af20bd1b-a95e-4e09-a71f-127c7dd486ce%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>


--

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAF%2BYYc6KZm2kNtQ%3DMyoi2Buj5%3D50c0%3DaR1Q87%3DdFJxeooKUw8g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Exception happened during processing of request from ...

2019-02-11 Thread Jon bae


Am Freitag, 8. Februar 2019 13:24:01 UTC+1 schrieb Pedram Badakhchani:
>
> I am getting similar errors, also running Django 2.15 with python 3.72, 
> would be very interested if you have found a solution
>
> No, sadly I did not found a solution. Maybe django is not 100% compatible 
with python 3.7.2. At the moment I hope that my project runs later on the 
target (Linux) system, with a lower python version, normal... 

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2a2d9cad-da8d-4d4b-927e-de9d04e6192b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Google+ shutdown and replacement for login

2019-02-11 Thread Jason
Would it be better for you to reach out to whatever package you're using 
for login with the G+ API?  If this were strictly Django related, you would 
probably get help here.  However, since I imagine you're using a third 
party package, not sure if this is the best place for you to find answers.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/af20bd1b-a95e-4e09-a71f-127c7dd486ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Password Policy Adherence. Cannot use the passwords used before

2019-02-11 Thread Jason
Sometimes going through the source code is the easiest way to figuring out 
the problem :-)

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/39ed403f-b43b-4814-ac1e-09e9eedb97df%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Composite Primary / Foreign Key support

2019-02-11 Thread 'Lance Ellinghaus' via Django users
I have seen references to people adding the support of composite primary 
keys to Django for years, but it does not look like it has been added.

I have a number of legacy databases that I cannot add fields to but need to 
be able to be queried through Django. They are read-only tables.
A number of the tables are also related through Composite Foreign Keys and 
I have seen some addons but not sure what is fully supported.

I am trying to use Django 2.1.5.

Any help or ideas would be appreciated, and saying  "Add a field to your 
tables" is not an option.

Thank you.

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7138daca-8393-4431-9c91-6e4fb83dfb7c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Google+ shutdown and replacement for login

2019-02-11 Thread Onkar Narkar
Hello,
We in our organisation have deployed many projects and for login purpose 
,we used Google+ API. But as the G+ API won't be available after shutdown 
of the same,we need to have a replacement for G+ login. We have already 
tried with Google Login, but no success as there is no complete/clear 
documentation for migrating from G+ to Google login with django platform. 
Please help with useful link ,so that the migration won't be a hectic task 
as the projects are already live for users. 

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1cc3e047-4c81-4419-a874-2e57b075fb12%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


pymongo

2019-02-11 Thread B.navya spoorthi Sweety
hi all,
i am trying to update all documents in collection using pymongo
here is my update function,

def update():
  for doc in mycol.find():
 mycol.update({},{"$set":{"status":"approved"}})

but using above code i am able to update only one document,what i am doing
wrong here

thanks in advance

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOdZuzzc%2B8Cb%2BJgjmXwzvsUswdLrJ8cZDwVgunaJD%2BEnpeSh3w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django 2.2 beta 1 released

2019-02-11 Thread Carlton Gibson
We've made the second release on the way to Django's next major 
release, Django 2.2! With less than two months until the final release, 
we'll need timely testing from the community to ensure a stable 
release. Check out the blog post: 

https://www.djangoproject.com/weblog/2019/feb/11/django-22-beta-1-released/


-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7A5024B3-17A8-44F6-9784-4FAE0733C1F2%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Django security releases issued: 2.1.6, 2.0.11, and 1.11.19

2019-02-11 Thread Carlton Gibson
Today the Django team issued 2.1.6, 2.0.11, and 1.11.19 as part of our security 
process. These releases address a security issue, and we encourage all users to 
upgrade as soon as possible: 

https://www.djangoproject.com/weblog/2019/feb/11/security-releases/

-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1EB1699A-228E-4151-9726-50042904A4CE%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


The database driver doesn't support modern datatime types.

2019-02-11 Thread Ivan Martić
Hi all, 

I am migrating to from development to prod server and getting this error 
app.

Error started to show after installation of allauth library.
I cant find anything on google related to this topic so I hope you can help 
me out.

Traceback is saying:
Exception Type: ImproperlyConfigured at /accounts/login/
Exception Value: The database driver doesn't support modern datatime types.

DB is MSSQL and I should have all neccesery installation because it worked 
previously (on local server - pyodbc, azure...)

Thank you in advance


-- 
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7a36a458-7a3e-446a-b224-a5b2d4cd0ff8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Upgrading project from Django 1.11 to 2.1

2019-02-11 Thread Mike Dewhirst

On 11/02/2019 6:00 pm, PARTH PATIL wrote:

Six.text_types is used to represent unicode() in python2 and str in python3.
And now you are only using python3, it would be safe to replace it with str()



Thank you kind Sir!

Mike

--
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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/b12b089d-25e0-0d98-3749-7f9027130c85%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.