Validators and django.contrib.postgres.fields JSONField

2016-08-21 Thread Ryan Causey
define __eq__ for migration purposes, but I tried defining it and it didn't seem to make a difference. Any help is appreciated. Thanks, -Ryan Causey -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this g

Re: Validators and django.contrib.postgres.fields JSONField

2016-08-27 Thread Ryan Causey
nstructed rather than entering the __call__() method of the class. I can't see a reason for this to happen, so what am I doing wrong here? Thanks, -Ryan Causey On Sunday, August 21, 2016 at 9:32:50 PM UTC-7, Ryan Causey wrote: > > Hello, > > I've stumbled upon an issue whe

Re: Validators and django.contrib.postgres.fields JSONField

2016-08-28 Thread Ryan Causey
t way to go. I based this off things like the Regex validator in django.core.validators found here: https://docs.djangoproject.com/en/1.10/_modules/django/core/validators/#RegexValidator. Perhaps this wasn't the right approach? Thanks for your help! -Ryan Causey On Sunday, August 28, 2016

Having trouble understanding Timezone

2016-01-06 Thread Ryan Causey
when dealing with end users. I take this to mean that in any code I write I should set tzinfo = UTC for all datetime objects I create programmatically and let Django translate them in forms and views to the end user's timezone automatically. Is this correct? Thank you in

Re: Having trouble understanding Timezone

2016-01-07 Thread Ryan Causey
Thank you everyone for your responses. I believe I have a clear understanding of how it all interacts and what I need to do on my end. -Ryan Causey -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Understanding timezone with queryset day lookups

2020-06-09 Thread Ryan Causey
this is pointing to UTC "today" is the "wrong" way to do it? Is this queryset behavior due to the way timezone aware inputs in forms works? I.E. Naive datetime in form -> made aware in currently active timezone -> converted to UTC and stored in database if I understand

Atomic IntegerField increment based on another model instance

2019-06-01 Thread Ryan Causey
Assume the following models for this question: class Jurisdiction(models.Model): name = models.CharField(max_length = 100) class Account(models.Model): account_number = models.PositiveIntegerField(blank = True) jurisdiction = models.ForeignKey("Jurisdiction", on_delete = models. CASCA

Re: Atomic IntegerField increment based on another model instance

2019-06-02 Thread Ryan Causey
ues( "account_number", )[:1] ) + models.Value(1), ), default = 1, ) ) # Since we did an update we need to refresh ourselves from the db. self.refresh_from_db() On Saturday, June 1, 2019 at 8:44:29 PM UTC-7, Ryan Causey wrote: > > Ass

Reusable apps that support being nested wihin other apps

2019-08-11 Thread Ryan Causey
Is it possible in Django to reverse URLs within a reusable app such that the reversing will still work if the app is nested with another? It's essentially the same question as this stack overflow question