Channels: can I run a worker in the same process?

2019-06-07 Thread Chris
I'm getting started with Channels 2.x. In my web app, certain actions take more than 30 seconds to complete, so rather than doing it synchronously in the request, we do the processing in the background. It seems that any background task requires ChannelNameRouter and a separate runworker

Re: my file uploads missing/deleted

2019-06-07 Thread Joe Reitman
Omar, I use Dropbox which is free up to 2GB. I installed django-storages library to make setting up Dropbox easy. On Friday, June 7, 2019 at 6:32:21 PM UTC-5, omar ahmed wrote: > > hii .. > i deployed my first django app on Heroku https://arena3.herokuapp.com/ > but my media files ( like club

my file uploads missing/deleted

2019-06-07 Thread omar ahmed
hii .. i deployed my first django app on Heroku https://arena3.herokuapp.com/ but my media files ( like club logo ) disappear or deleted ... i found this article on Heroku https://help.heroku.com/K1PPS2WM/why-are-my-file-uploads-missing-deleted that means The Heroku filesystem is ephermal and

Re: Form with CheckBoxSelectMultiple not validating

2019-06-07 Thread Joe Reitman
Can you show the code? On Friday, June 7, 2019 at 1:57:23 PM UTC-5, Dube Software wrote: > > I have a form with a CheckBoxSelectMultiple widget. When I select choices > and submit the form, `is_valid()` returns False. What could be the cause? > > Kind regards, > Lloyd > > *Sent with Shift >

Re: DateInput not accepting format argument

2019-06-07 Thread Joe Reitman
Or a better option is to use a third party app such as https://django-bootstrap-datepicker-plus.readthedocs.io/en/latest/index.html On Friday, June 7, 2019 at 1:05:04 PM UTC-5, Joe Reitman wrote: > > Try this: > > in settings.py > > USE_L10N = False > > USE_TZ = True > > DATE_INPUT_FORMATS =

Form with CheckBoxSelectMultiple not validating

2019-06-07 Thread Sithembewena L. Dube
I have a form with a CheckBoxSelectMultiple widget. When I select choices and submit the form, `is_valid()` returns False. What could be the cause? Kind regards, Lloyd *Sent with Shift

Re: DateInput not accepting format argument

2019-06-07 Thread Joe Reitman
Try this: in settings.py USE_L10N = False USE_TZ = True DATE_INPUT_FORMATS = ['%B %d, %Y'] In forms.py start_date = forms.DateField( widget=forms.DateInput(attrs={'placeholder': 'October 24, 2019'}), ) On Friday, June 7, 2019 at 5:36:30 AM UTC-5, Dube Software wrote: > > Hi, > > I

Re: user Form error

2019-06-07 Thread anchal agarwal
Thanks Chetan ...It worked !! On 07-Jun-2019 1:23 am, "Chetan Ganji" wrote: Hi Anchal PFA https://stackoverflow.com/questions/9061846/attributeerror-at- registration-userform-object-has-no-attribute-save .save() method is available on forms.ModelForm; not on forms.Form Regards, Chetan Ganji

Re: Periodic tasks set through django admin is not working exactly at given interval.

2019-06-07 Thread Gil Obradors
Paste code! One thing is every 30 minutes, Another at 30minute for each hour, May be you have the second El dv., 7 de juny 2019, 16:48, srikanth kadiyala < srikanthkadiyal...@gmail.com> va escriure: > Hi, > I set my periodic tasks in django admin to run for every 30 minutes > through

Re: Orm Query for this type of situation

2019-06-07 Thread Devender Kumar
Hi, On this question only I took some step deep and able to find out one part and need your help on the second half. This requires a good understanding of Django annotation and subquery features If you have this thank for reading and helping me in advance I am facing problem to filter calls on

Re: Import circular

2019-06-07 Thread 'Alex Mesias Diaz Toro' via Django users
Thanks for the information. El jue., 6 jun. 2019 a las 16:29, Fabio O da silva () escribió: > not > > > > [image: Mailtrack] > > Remetente > notificado por > Mailtrack >

Periodic tasks set through django admin is not working exactly at given interval.

2019-06-07 Thread srikanth kadiyala
Hi, I set my periodic tasks in django admin to run for every 30 minutes through Crontab, but tasks are running for every 1hour 30 minutes. Can anyone help me to solve this issue. I set my timezone to TIME_ZONE = Asia/kolkata USE_TZ = True -- You received this message because you are

Re: Annotations as models fields

2019-06-07 Thread Devender Kumar
Hi, You can use Django annotation feature which will add a field to your queryset objects and that field can behve like any real field On Thu, Jun 6, 2019 at 8:22 PM Chetan Ganji wrote: > Yes Olivier, You are right :P > > If I understand the problem correctly this time, you want the field >

Re: Redirect on POST

2019-06-07 Thread Aldian Fazrihady
How does your client call your POST API? Via AJAX (assuming, CORS header properly set), or via action attribute of the form? If it is called via action attribute, then there should be no problem with HTTPResponseRedirect. You probably need a bug fixing. If it is called via Ajax, then, IMO, there

Redirect on POST

2019-06-07 Thread Mark Davies Tan
Hi all, I have this scenario. I have a client who wants to call a POST API of mine which then redirects to my site. So client has his own site which has a button that does a POST to my registration API to register a user onto my site and should automatically redirect to my site without the

Re:

2019-06-07 Thread Jithendra Kumar
Hi Pradeep, You need ti add the default value for the image other wise you get that error. EX: profile_pic = models.ImageField(upload_to='uploads/',default= 'defaults/no-img.png') Regards, Jithendra Kumar U , PYTHON, PHP & UI Developer 9666 544 180, 6300 639 675 On Tue, Jun 4, 2019

Re: How to fix: Django forms: {{ form }} is not working in a dynamic html page

2019-06-07 Thread Delcy John
i think the error is in form.py,you must put indentation in class On Fri, Jun 7, 2019 at 9:37 AM Joe Reitman wrote: > Interesting problem. It won't display because the form is inside a > for-loop. Django Template language looks at variables inside a for-loop > differently. Basically it looks

DateInput not accepting format argument

2019-06-07 Thread Sithembewena L. Dube
Hi, I have a form with a start_date field of type DateField (widget is DateInput). When I specify a format argument, the input does not render as specified. The format is always -MM-DD. My code is as follows: ``` start_date = forms.DateField( label='Start date',

Re: Deployments

2019-06-07 Thread Chetan Ganji
You should follow each and every step of the tutorial. Once you can get an empty django project up and running, you can swap that project with yours. git clone the repo to the above projects folder location and make the changes (e.g. rename project name in config files, etc.) as required.