Re: could not translate host name "postgres" to address: Name does not resolve [Docker swarm]

2018-02-23 Thread twinmegami
Ok, I found the problem is depends_on not work on swarm mode -- 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

Re: help with the poll application." Writing your first Django app".

2018-02-23 Thread Andy
thx :) Am Freitag, 23. Februar 2018 22:16:12 UTC+1 schrieb Haven McConnell: > > This is very good explaintaion > > On Wednesday, February 21, 2018 at 7:17:48 AM UTC-5, Sebastian Saade wrote: >> >> >>

Re: Channels worker and call_later

2018-02-23 Thread Ken Whitesell
Andrew, Thanks for the quick reply! Yea, I kinda guessed I was overthinking this. Your solution works 100% for exactly what I'm trying to do. Sorry about the confusion regarding my reference to Twisted, it's no part of this particular project - I only mentioned it to state that while it

Re: Channels worker and call_later

2018-02-23 Thread Andrew Godwin
Hi Ken, You should write asyncio code, rather than Twisted code - we have Twisted running on it asyncio reactor so both are available, and asyncio is the only thing you're guaranteed from the spec/other future servers. Given that, I would recommend making a separate asyncio Task that has an

Channels worker and call_later

2018-02-23 Thread Ken Whitesell
TLDR: Is there a way to use the call_later function within a worker task? (Or am I just looking at this issue the wrong way?) Software - Python 3.6, Django 2.0.2, Channels 2.0.2, trying to run this on either / both Windows 10 and Ubuntu 17.10 if it matters Longer version - I'm having

could not translate host name "postgres" to address: Name does not resolve [Docker swarm]

2018-02-23 Thread twinmegami
I am using docker swarm to set env ``` - DATABASE_URL=postgres://basin:basin_pa44@postgres:5432/demo ``` I confirmed two host can reach each other. And directly using psycopg2 was fine: ``` >>> import psycopg2

Re: Hello

2018-02-23 Thread khaled.kachkorian
welcome haven On Friday, February 23, 2018 at 4:16:12 PM UTC-5, Haven McConnell wrote: > > *Hello my name is haven * > -- 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

Re: Question about dot notation syntax (Django source)

2018-02-23 Thread drone4four
Hi Andreas! Thank you for your reply. You said: The dot notation (as you call it) references a class that you can find if > you look in the django package, under folder contrib, folder auth, file > password_validation.py you will find a class class > UserAttributeSimilarityValidator. See

Re: help with the poll application." Writing your first Django app".

2018-02-23 Thread Sebastian Saade
thanks for the reply El miércoles, 21 de febrero de 2018, 9:17:48 (UTC-3), Sebastian Saade escribió: > > > > >

Re: soy nuevo como inicio Django para desarollar con oracle

2018-02-23 Thread Gerardo Palazuelos Guerrero
hola Dimitri, Te sugiero, si puedes, que escribas en Inglés... casi no hay gente que responda en Español... Yo soy nuevo en Django también, y si lo eres tú, te sugiero iniciar el tutorial en el sitio de django ó el djangogirls Saludos, Gerardo -- Gerardo Palazuelos Guerrero On Fri, Feb 23,

Re: UUIDs eventually choke as primary key

2018-02-23 Thread M Mackey
Not to belabor the point, but this is the part that I find weird. This is down in the "During handling of the above exception ('UUID' object has no attribute 'replace'), another exception occurred" section. /usr/local/venvs/attrack/lib/python3.6/site-packages/django/db/models/fields/__init__.py

Re: help with the poll application." Writing your first Django app".

2018-02-23 Thread 'Haven McConnell' via Django users
This is very good explaintaion On Wednesday, February 21, 2018 at 7:17:48 AM UTC-5, Sebastian Saade wrote: > > > > >

soy nuevo como inicio Django para desarollar con oracle

2018-02-23 Thread Dimitri Garcia
soy nuevo como inicio Django para desarollar con oracle -- 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

Hello

2018-02-23 Thread 'Haven McConnell' via Django users
*Hello my name is haven * -- 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

Re: Issues with french accents

2018-02-23 Thread 'Haven McConnell' via Django users
I've never heard of a sandwich flicker On Thursday, February 22, 2018 at 6:55:22 AM UTC-5, sbrunel62 wrote: > > Hi, > > Context: > > Django 1.11.x > Python 3.4.5 > PostgreSQL 9.6 > > Database informations : > > data=> \l > List of databases >Name| Owner

Re: UUIDs eventually choke as primary key

2018-02-23 Thread M Mackey
Adding details I seem to have left out. The id is defined like this: id = models.UUIDField(primary_key=True, default=uuid.uuid1, editable=False) and I'm running on PostgreSQL. I'm pretty sure I never create a row without already having the key. On Monday, February 12, 2018 at 1:00:53 PM UTC-8, M

StaticLiveServerTestCase: database emptied after first test after upgrading to Django 1.11

2018-02-23 Thread Simon McConnell
Nothing to do with this? https://docs.djangoproject.com/en/2.0/releases/1.11.2/ -- 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

Re: UUIDs eventually choke as primary key

2018-02-23 Thread M Mackey
My notes don't say I did that, and I tried a new env and sys.path still shows /usr/local/lib/python3.6. Maybe that's just a red herring. But I don't have any other good explanation for the UUID getting passed to the UUID __init__. On Friday, February 23, 2018 at 9:12:33 AM UTC-8, Tom Evans

Re: object_list in html

2018-02-23 Thread Dylan Reinhold
I would add an is_running flag into the context_data def get_context_data(self, **kwargs): data = super().get_context_data(**kwargs) data['is_running'] = Submission.objects.filter(juser=self.request.user jstatus='Running').exists() return data Then in your template

Re: UUIDs eventually choke as primary key

2018-02-23 Thread 'Tom Evans' via Django users
On Fri, Feb 23, 2018 at 4:20 PM, M Mackey wrote: > I have noticed in the python > path that there are two paths to .../lib/python3.6. One from my virtualenv, > and one at /usr/local/. Not sure where to clear that up, since I don't > believe I've got my apache env set up to pull

Re: DjangoUnleashed-2.0

2018-02-23 Thread Andrew Pinkham
Hi, I'm the author of Django Unleashed. A second edition is in the works, but it is taking some time (I'm also working on a video series). Django 2.0 introduced a simplified system for URLs. https://docs.djangoproject.com/en/2.0/releases/2.0/#simplified-url-routing-syntax If you want wish to

Re: UUIDs eventually choke as primary key

2018-02-23 Thread M Mackey
The thing that gets me is this part: .../django/db/models/fields/__init__.py in to_python > return uuid.UUID(value) ... > /usr/local/lib/python3.6/uuid.py in __init__ > hex = hex.replace('urn:', '').replace('uuid:', '') ... > > During handling of the above exception

Re: object_list in html

2018-02-23 Thread Alan
Hi Constantine, from my views.py: class status(ListView): model = Submission template_name = 'status.html' def get_queryset(self): return Submission.objects.filter(juser=self.request.user). exclude(jstatus='Deleted') If I could create a parameter say runFlag (True of

StaticLiveServerTestCase: database emptied after first test after upgrading to Django 1.11

2018-02-23 Thread 'Tom Evans' via Django users
Hi all We have a bunch of functional tests derived from StaticLiveServerTestCase using selenium that have started failing after upgrading from Django 1.8 to Django 1.11. The database is initially populated via data migrations, but after running one test it all the data loaded via migrations has

Re: Getting complex query set with a many to many relationship in django

2018-02-23 Thread Andy
If you want to have Articles then get Article.objects.filter(section=xy).oder_by('section__order') Am Donnerstag, 22. Februar 2018 20:47:31 UTC+1 schrieb James Farris: > > I am trying to *get all article objects that are part of a section* in an > edition that is in an issue. I am stumped, even