Weird date math bug?

2017-08-31 Thread Lachlan Musicman
Is there a weird date math bug in Django 1.11.4? I say weird because surely not? I can't see any tickets in the tracker, but I'm definitely seeing it in production. Using postgresql: class Patient(models.Model): -- "The antidote to apocalypticism is *apocalyptic civics*. Apocalyptic civic

Re: Weird date math bug?

2017-08-31 Thread Lachlan Musicman
Sorry, let me start again: Is there a weird date math bug in Django 1.11.4? I say weird because surely not? I can't see any tickets in the tracker, but I'm definitely seeing it in production. Using postgresql: models.py class ChemoType(models.Model): name = models.CharField(max_length=50

Re: Weird date math bug?

2017-08-31 Thread Lachlan Musicman
On 1 September 2017 at 14:57, James Schneider wrote: > I'm guessing that ChemoRegime.regime_age() contains line 95. > > ChemoRegime defines the stop_date field with null=True and blank=True. I'm > guessing this is because patients may not have yet stopped treatment, so > they have no stop_date. >

Re: Weird date math bug?

2017-09-01 Thread Lachlan Musicman
On 1 September 2017 at 16:37, James Schneider wrote: > Also, if you are developing this application for use within the USA, be > sure that you are not capturing or storing data that would fall under the > HIPAA definition of personal medical data. If it does, your legal > compliance responsibilit

Re: Weird date math bug?

2017-09-03 Thread Lachlan Musicman
On 1 September 2017 at 16:13, Melvyn Sopacua wrote: > A few tips on your code: > > def get_latest_chemo(self): > chemo = ChemoRegime.objects.filter(pat > ient=self).latest('stop_date') > > class ChemoRegime(models.Model): > patient = models.ForeignKey(Patient, on_delete=mo

Re: Python 2 versus 3

2017-09-03 Thread Lachlan Musicman
Bijal, Django 2.x - the next release cycle - will be Python 3.x Most major OSes will be moving to Python 3.x in their next release (eg in RedHat/CentOS 7.4 (I think))... If it's no big deal - and it really shouldn't be - you should move to Python 3.x Cheers L. -- "The antidote to apocaly

Re: AttributeError: 'Settings' object has no attribute 'SATIC_ROOT'

2017-09-21 Thread Lachlan Musicman
The problem's right there in the error. there is no satic_root. In urls.py *urlpatterns += static(settings.STATIC_URL, document_root=settings.SATIC_ROOT)* Should read *urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)* Cheers L. -- You received this messa

Re: Is it an error by Django?

2017-10-05 Thread Lachlan Musicman
I'd imagine that's the new Python3 system. content is a bytestring, not unicode? Cheers L. -- "The antidote to apocalypticism is *apocalyptic civics*. Apocalyptic civics is the insistence that we cannot ignore the truth, nor should we panic about it. It is a shared consciousness that our inst

Re: Is it an error by Django?

2017-10-05 Thread Lachlan Musicman
— and we are creative agents who can shape our destinies. Apocalyptic civics is the conviction that the only way out is through, and the only way through is together. " *Greg Bloom* @greggish https://twitter.com/greggish/status/873177525903609857 On 6 October 2017 at 09:35, Lachlan Musicman

Re: New to Django

2015-08-02 Thread Lachlan Musicman
Hi Prabath, The best place to get started if you would like to contribute is the "low hanging fruit" part of the Django codebase: https://code.djangoproject.com/query?status=!closed&easy=1 and the Django Developers email list if you want to ask for some help https://docs.djangoproject.com/en/de

Re: New to Django

2015-08-02 Thread Lachlan Musicman
> Thank you for pointing to the right direction. I know this is a long shot, > but it will be worth the time > > Thank you > Prabath > > > On Sunday, August 2, 2015 at 7:01:51 PM UTC-4, Lachlan Musicman wrote: >> >> Hi Prabath, >> >> The best place to g

Re: New User Tips?

2015-08-25 Thread Lachlan Musicman
1. Do the tutorial if you've never used Django before 2. Keep your code in a repo, have a dev site and a prod site at least 3. Use virtualenv 4. This list is a good place to come for support. Also, the IRC channel with FunkyBob. -- The most dangerous phrase in the language is, "We've always d

Re: TemplateDoesNotExist at / Error WIth Django 1.8.4 (URGENT)

2015-10-06 Thread Lachlan Musicman
do you have a template in a directory called templates? That directory should be at the same level as manage.py -- The most dangerous phrase in the language is, "We've always done it this way." - Grace Hopper On 6 October 2015 at 15:54, dannette opot wrote: > I get the above error when I tr

Re: Dashboard packages?

2015-11-10 Thread Lachlan Musicman
I'll be honest - I was intimidated at first, but eventually, the shell. Dango-extension's shell_plus is quite good as well. cheers L. -- The most dangerous phrase in the language is, "We've always done it this way." - Grace Hopper On 11 November 2015 at 15:36, Allison Ahn wrote: > I am mo

Re: New to Django

2016-02-29 Thread Lachlan Musicman
You will find there are two different pips on your computer - the default is obv 2.7. the most likely command you will need is pip3 (on ubuntu), but your best bet is to: - set up a virtualenv - set up your path to default to python 3.5.1 I would use the virtualenv solution personally. There is

Fwd: Dead code: Vulture?

2018-11-15 Thread Lachlan Musicman
Hola, I have inherited a Django 1.8 code base, which I'm updating to latest release. I was wondering if anyone has used a Dead Code or Unused Code finder, like Vulture? https://github.com/jendrikseipp/vulture and if so, what their opinions on those tools were? cheers L. -- '...postwork fu

Congratulations and thank you!

2018-11-20 Thread Lachlan Musicman
Hi All, I've used Django on and off for a long time now - eight or nine years. I've spent the last 3-4 not using Django for reasons. I've just had to update a code base that was delivered to me, from 1.8/py2 to 2.1/py3 and it was a lovely experience. The changes in Django 2.x are a joy - they ma

Re: path('posts/(?P[0-9]+)/$'

2018-12-02 Thread Lachlan Musicman
On Mon, 3 Dec 2018 at 11:51, wrote: > > > On Sunday, December 2, 2018 at 10:00:17 AM UTC-8, Jani Tiainen wrote: >> >> Hi. >> >> Path is a new url format which uses format of for >> exanple like . If you want to use regular expressions use >> re_path instead. >> >> kirjoitti su 2. jouluk. 2018

Re: PROBLEM 2

2018-12-03 Thread Lachlan Musicman
Remove the .com from the URL On Tue, 4 Dec 2018 at 11:31, David Figueroa wrote: > in the process of creating my first views I am having this problem when I > will check if everything is working well on the page > > -- > You received this message because you are subscribed to the Google Groups >

Re: PROBLEM 2

2018-12-03 Thread Lachlan Musicman
> > On Tue, 4 Dec 2018 at 11:31, David Figueroa > wrote: > >> in the process of creating my first views I am having this problem when I >> will check if everything is working well on the page >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django users" gr

<    1   2   3   4   5