Render Javascript code

2017-09-01 Thread Ahmed Ablak
Hello, I am using Django and have an expensive computing process that takes about 12 or 13 hours and generates javascript charts. I did the computing using the management command and stored the charts in the models as TextField. My question is how to display this javascript code on the

Dynamodb backed application

2017-09-01 Thread Zain Ali
i am wondering how to make a web app with nosql db as pynamodb is orm support i didnot get any good todo app example for dynamodb app or using other library let me know i am newbie to django want to make app backed by dynamodb -- You received this message because you are subscribed to the

Re: Channels - Forward messages from a third party async source.

2017-09-01 Thread Andrew Godwin
Hey, You can send onto Channels from anywhere, event loop or no, but if you want a background process that monitors an external source and forwards events from it you will need to write that yourself (I usually suggest management commands for this purpose). I'm working on hopefully making it

deploying django project

2017-09-01 Thread k2527806
I want deploying my django project on ubuntu 16.04 with nginx and uwsgi i need some Tips step by step from zero -- 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

Channels - Forward messages from a third party async source.

2017-09-01 Thread Roger Gammans
Hi all, I'm trying to build a system with a Django frontend which displays live information from other services on the backend (eg, the one running python - not the browser) host. To keep my dependencies as light as possibly I'm trying to avoid import the settings file for django and channel

Re: Bizarre URL behaviour after deploying

2017-09-01 Thread mohammad k
when you use the url tage in templates you have to used like that {% url 'polls:edit' parameters %}: polls is the app or controller and the edit is view or method On Thu, Aug 31, 2017 at 4:46 PM, Melvyn Sopacua wrote: > You may have a reverse proxy on port 80 that

Clipping the raster

2017-09-01 Thread Ahmet Temiz
Hi, Is it possible to clip a raster from another raster using a polygon vector? Regards -- 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: Testing file upload via a form?

2017-09-01 Thread Derek
Thanks Melvyn I already have tests for the processing of data when it has been uploaded - which is actually the critical issue for the application. The "view" is just really a thin wrapper around the two steps : form display & upload and then the file processing itself : and those are the parts

Re: trying to create allauth SignupForm subclass for customization....

2017-09-01 Thread Alexander Joseph
Thanks Melvyn! On Thu, Aug 31, 2017 at 9:44 AM, Melvyn Sopacua wrote: > The answer lies in the fact that you are getting a Django configuration > exception and not an ImportError. > > The solution: https://github.com/pennersr/django-allauth/issues/826 > > The reason:

Re: Testing file upload via a form?

2017-09-01 Thread Melvyn Sopacua
You're not using the test **Client** at all. You're testing the value of a form.Form instance. The difference is that the test client constructs an actual request, using the known URLs. So you'd need a view and url as well. But these can exist only in the test and to be honest, especially with

RE: Annotating a query with comparison result e.g. F('foo') == F('bar')

2017-09-01 Thread Matthew Pava
I would approach your problem differently, though I don’t see why Django shouldn’t support such a construct in the future. I would use a Case…When construct. Status.objects.annotate(mine=Case(When(user_id=7,then=True), default=False, output_field=BooleanField()).order_by(‘-mine’) From:

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

Re: Testing file upload via a form?

2017-09-01 Thread Derek
Thanks James, I will try that. On 1 September 2017 at 09:27, James Schneider wrote: > > > On Aug 29, 2017 11:49 AM, "Derek" wrote: > > (Python 3.5 and Django 1.10) > > I am trying to test a Django form that enables a required file upload. > > The

Re: Link to download a file

2017-09-01 Thread James Schneider
On Aug 31, 2017 8:57 AM, "giuseppe ricci" wrote: Hi guys, I need some help to insert a link to download a file. In a view I read data from a csv file and I show them in a table in a template. Under the table I need to insert, when there are data, a link similar as

Annotating a query with comparison result e.g. F('foo') == F('bar')

2017-09-01 Thread Daniel Hepper
I'm looking for a way to build a query that resembles this: select id, user_id, user_id=7 as mine from app_status order by mine desc; (This question originally comes from a thread on Reddit). My first instinct was that it should be possible with an F expression:

Re: Testing file upload via a form?

2017-09-01 Thread James Schneider
On Aug 29, 2017 11:49 AM, "Derek" wrote: (Python 3.5 and Django 1.10) I am trying to test a Django form that enables a required file upload. The form is very simple and includes a field that looks like: upload_file = forms.FileField() The corresponding test to try

Re: Testing file upload via a form?

2017-09-01 Thread Derek
Thanks Melvyn I thought my code did follow that approach - but it does not seem to work. So either I have not understood the docs (in which case, a point to the specific item is what I need) or there is some other factor at work. On 31 August 2017 at 16:47, Melvyn Sopacua

Re: Weird date math bug?

2017-09-01 Thread James Schneider
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 responsibilities and liabilities will skyrocket. I'm not a lawyer, so I

Re: Weird date math bug?

2017-09-01 Thread Melvyn Sopacua
A few tips on your code: def get_latest_chemo(self): chemo = ChemoRegime.objects.filter(patient=self).latest('stop_date') class ChemoRegime(models.Model): patient = models.ForeignKey(Patient, on_delete=models.CASCADE) Use the related manager here. To make it readable,