Website is running in Django and also clients want to make the Mobile APP.

2018-11-22 Thread Pravin Yadav
Hello Everyone, Good Morning, I have created the website in Django + Python3. Website is running. But I want to make the Mobile App. Can anyone guide me how will i work. Thanks & Regards, Pravin Kr Yadav -- You received this message because you are subscribed to the Google Groups "Django us

Re: URL path not working with Django ver 2.1.2

2018-11-22 Thread Yavin Aalto Arba
Path is not using regular expressions. Use empty quotes and it should work. On Fri, Nov 23, 2018, 5:28 AM Ben Hamlitsch This is the message I get when I run python manage.py runserver > > [image: Screen Shot 2018-11-22 at 7.18.58 PM.png] > > > This is my setup in Atom > > > [image: Screen Shot 20

Re: Working with kronos

2018-11-22 Thread Joel
Thanks for the advise regarding understanding the issue in depth. My initiation to python has been all of three months, and to django since two. So far, I'd been scared to look under the hood, and any further than the documentation. But I realize that it's not as daunting now add it used to be. And

Re: Working with kronos

2018-11-22 Thread Joel
Yes, the language of the documentation certainly needs tweaking. I had done the installtasks and it did work. Thank you very much for your help. Now, I can have my app check for upcoming appointments and send reminders. It was a much needed functionality. On Fri, 23 Nov, 2018, 9:06 AM Jason the d

Re: how to send data from form site page

2018-11-22 Thread Jason
https://stackoverflow.com/help/how-to-ask how to ask a good question is one of the most valuable skills you can learn. if you do so, you won't have several people asking for more clarifications to broad, imprecise queries and struggling to give any meaningful help -- You received this messag

Re: How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-22 Thread Jason
on_delete is a required parameter now in django 2.0 https://docs.djangoproject.com/en/2.0/releases/2.0/#features-removed-in-2-0 - The on_delete argument for ForeignKey and OneToOneField is now required in models and migrations. Consider squashing migrations so that you have fewer of t

Re: Working with kronos

2018-11-22 Thread Jason
the documentation is ambiguous in that regard. that said, I feel it says you can register the cron tasks either way, but it doesn't do anything to actually install the commands. you can see the code of the installtasks management command: https://github.com/jgorset/django-kronos/blob/v1.0/kro

URL path not working with Django ver 2.1.2

2018-11-22 Thread Ben Hamlitsch
This is the message I get when I run python manage.py runserver [image: Screen Shot 2018-11-22 at 7.18.58 PM.png] This is my setup in Atom [image: Screen Shot 2018-11-22 at 7.22.10 PM.png] ANY help you can provide much appreciated. -- You received this message because you are subscribed t

Re: mail sending

2018-11-22 Thread Joel
django-kronos is probably the easiest to do this. As mentioned, you could create a management command to check a database or file for the time when you want to run this, with any other data, then you'd set an interval at which you want to check if mails need be sent, and then execute your mail send

Re: email

2018-11-22 Thread Ryan Nowakowski
On Thu, Nov 22, 2018 at 02:59:02PM +0530, Tushar Nadkar wrote: > i have email id of multiple user , so how can i send mail after 3 days when > he click a button .or checkout button in django I record the timestamp of the button click in a model then I run cron or celery periodically to query the m

Re: Is Django and DjangoRestAPI's the correct framework for my project?

2018-11-22 Thread Ryan Nowakowski
Django can definitely do what you want. It just sounds like you won't be using very many of it's built-in features. - Ryan On Thu, Nov 22, 2018 at 07:40:55AM -0800, Andy Gardner wrote: > I am new to Django, Python and Rest API's and have been learning it over > the last few weeks with a view to

Re: How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-22 Thread vineeth sagar
For a foreign keys you have to specify an on_delete attribute, food=models.ForiegnKey(Food,on_delete=models.CASCADE) If a row in the parent table(food for example) is deleted this will cause the row/s that refers to that particular food item in your Restraunt model be deleted. on_delete can be g

How to fix TypeError: __init__() missing 1 required positional argument: 'on_delete'

2018-11-22 Thread Abba Haruna
from django.db import models class Food(models.Model): name = models.CharField(max_length=30) picture = models.ImageField(upload_to='images/', null=True) def __unicode__(self): return self.name class Town(models.Model): name = models.CharField(max_length=30) def __unicode__(self): return self.nam

Re: Is Django and DjangoRestAPI's the correct framework for my project?

2018-11-22 Thread Andy Gardner
Essentially I want to end up with a set of API's that will send a JSON encoded request along with data parameters to a middleware process and pass out the returning JSON encoded replies, either as a single string or a set of extracted data parameters. I have about 50+ CLI calls to represent in

Re: Is Django and DjangoRestAPI's the correct framework for my project?

2018-11-22 Thread TimT Vogt
What problem are you trying to solve? What reason do You use djanfo now for? And what do You want with the json? Stored? Displayed? Or put trough as other apps might use the data? Tim Verstuurd vanaf mijn iPhone > Op 22 nov. 2018 om 16:40 heeft Andy Gardner het > volgende geschreven: > > I a

Re: how to send data from form site page

2018-11-22 Thread Jani Tiainen
Hi, If I understood correctly you want to render form with plain HTML. That is completely possible and it's not even hard. You just can do and it will work Only important thing is to match "some_field_name" with field name in the django form. You still should Django form in a view to do very im

Re: how to send data from form site page

2018-11-22 Thread Thiago Oliveira
I don't know if i understand, but if you make html html and put tag name with same name that form field... you can get the information like from = MyForm(request.POST) because, the tag name always send to back-end with the value of field Em qui, 22 de nov de 2018 às 13:19, Gear Crew

Is Django and DjangoRestAPI's the correct framework for my project?

2018-11-22 Thread Andy Gardner
I am new to Django, Python and Rest API's and have been learning it over the last few weeks with a view to generating REST API's to control an engine process. Currently I have an engine process running in the background, and a python based test harness, which takes JSON encoded requests contain

Re: unable to create modelform object in views

2018-11-22 Thread Thiago Oliveira
what was the except is generator ? Em qui, 22 de nov de 2018 às 13:38, shiva kumar < kannamshivakumar...@gmail.com> escreveu: > views file > > from django.core.mail import send_mail > from django.http import HttpResponse > # Create your views here. > from django.shortcuts import render,redirect >

unable to create modelform object in views

2018-11-22 Thread shiva kumar
views file from django.core.mail import send_mail from django.http import HttpResponse # Create your views here. from django.shortcuts import render,redirect from django.urls import include import datetime from .forms import loginform,modelform def hidemelogin(request): if request.method == 'P

Re: how to send data from form site page

2018-11-22 Thread Gear Crew
I want to edit style for form model like changing in default HTML tags On Thursday, 22 November 2018 16:53:54 UTC+2, Jani Tiainen wrote: > > Hi. > > I've really hard time to understand what you want to achieve. Could you > please give an example what you're after? > > Gear Crew > kirjoitti to 22

Re: how to send data from form site page

2018-11-22 Thread Jani Tiainen
Hi. I've really hard time to understand what you want to achieve. Could you please give an example what you're after? Gear Crew kirjoitti to 22. marrask. 2018 klo 16.48: > how to send data from form site page that has html form to model without > using form model because I want to use HTML elem

Re: mail sending

2018-11-22 Thread Jani Tiainen
Hi. Essentially you need to record the time you want your mail to be sent and then you need some kind of background worker to check (periodically) if there are any mails to be sent. Celery is one tool that can do that. I personally use simple cron job that uses django management command to achie

how to send data from form site page

2018-11-22 Thread Gear Crew
how to send data from form site page that has html form to model without using form model because I want to use HTML elements instead of elements in form model -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and

Re: Working with kronos

2018-11-22 Thread Joel Mathew
I understood the documentation to mean that either we can create management commands and register with cronos, or create cron.py. Sincerely yours, Joel G Mathew On Thu, 22 Nov 2018 at 18:42, Jason wrote: > https://github.com/jgorset/django-kronos/tree/v1.0#register-tasks-with-cron > > sounds

Re: Using Django Channels to subscribe to a Redis channel

2018-11-22 Thread Yavin Aalto Arba
You need to set up the consumer to perform this task. cf. https://github.com/justdjango/justchat/blob/master/src/chat/consumers.py this corresponds to the following video tutorial which might be useful to you: https://www.youtube.com/watch?v=Wv5jlmJs2sU On Thu, 22 Nov 2018 at 15:34, Nasir Sh wr

Re: mail sending

2018-11-22 Thread Hari
Please check below link.It may help you..Basically you need to set up celery. https://stackoverflow.com/questions/9982486/django-sending-email-x-days-later On Thu, Nov 22, 2018, 12:23 PM Tushar Nadkar wrote: > when a button is clicked , i want to send specific mail after 3 days ? how > can i do

Re: Using Django Channels to subscribe to a Redis channel

2018-11-22 Thread Nasir Sh
Thanks Yyavin, the problem is that in my management command I don't have access to `self` to send it. Is it possible to get access to a consumer from outside or how should my data producer relay the messages to channel in an async way? On Wednesday, November 21, 2018 at 8:47:07 PM UTC+1, Yavin

Re: Using Django Channels to subscribe to a Redis channel

2018-11-22 Thread Nasir Shadravan
Thanks Yyavin, the problem is that in my management command I don't have access to `self` to send it. Is it possible to get access to a consumer from outside or how should my data producer relay the messages to channel in an async way? On Wed, Nov 21, 2018 at 8:46 PM Yavin Aalto Arba wrote: > tr

Re: email

2018-11-22 Thread Yavin Aalto Arba
https://docs.python.org/3/library/sched.html ? On Thu, 22 Nov 2018 at 11:29, Tushar Nadkar wrote: > i have email id of multiple user , so how can i send mail after 3 days > when he click a button .or checkout button in django > > -- > You received this message because you are subscribed to the G

Re: Working with kronos

2018-11-22 Thread Jason
https://github.com/jgorset/django-kronos/tree/v1.0#register-tasks-with-cron sounds like you need to run a register management command first. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving email

Re: difference between class based view and function based view

2018-11-22 Thread Jason
Interesting, because I'm the entire opposite because I find myself rewriting lots of code when using FBVs compared to (G)CBVs. And then if one thing changes, that often precipitates a much larger PR than if I were using equivalent classes. There's no magic involved in them, just regular objec

Re: difference between class based view and function based view

2018-11-22 Thread Yavin Aalto Arba
I have to +1 Carstens answer. In short, I too find CB views to be too "magical". =) On Thu, 22 Nov 2018 at 11:53, Carsten Fuchs wrote: > Hi Andrew, > > many thanks for your clear and detailed explanation! > > Having used Django for several years, FVs are still my favorite approach > over CBVs

Re: MULTIPLE IMAGES UPLOAD FOR A POST

2018-11-22 Thread Pacôme Avahouin
Thank you mazz ahmed for your answer, but i still don't see how to use that with my forms.py and views.py? Le jeudi 22 novembre 2018 10:49:02 UTC+3, Pacôme Avahouin a écrit : > > Please help me. I am new to Django, cannot undertsand the following. I > have subclass of CreateView for creating a p

Re: difference between class based view and function based view

2018-11-22 Thread Carsten Fuchs
Hi Andrew, many thanks for your clear and detailed explanation! Having used Django for several years, FVs are still my favorite approach over CBVs and GCBVs. In the past, I made several starts with CBVs, but never found or understood why CBVs and GCBVs seem to be in many people's center of at

email

2018-11-22 Thread Tushar Nadkar
i have email id of multiple user , so how can i send mail after 3 days when he click a button .or checkout button in django -- 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: difference between class based view and function based view

2018-11-22 Thread Andréas Kühne
Great write up! :-) And you are totally right - I tend to think of the CBV's and GCBV's in the same thought - and use them interchangeably, because I NEVER use FV Regards Andréas Den ons 21 nov. 2018 kl 21:39 skrev Andrew Pinkham : > Django developers talk about three kinds of views: > >

Re: please i need assistance with mine css file .Mine base.html file failed to load my style.css.

2018-11-22 Thread Mohan Goud
If u r using pycharm free version. It doesn't support css files. kindly check that On Wed, Nov 21, 2018 at 10:34 PM Yavin Aalto Arba wrote: > It might help to create a link to the static file and then check the error > upon reaching the url. I also recommend using the django debugging tool > bar

Re: MULTIPLE IMAGES UPLOAD FOR A POST

2018-11-22 Thread mazz ahmed
https://django-filer.readthedocs.io/en/latest/ On Thu, Nov 22, 2018 at 12:49 PM Pacôme Avahouin wrote: > Please help me. I am new to Django, cannot undertsand the following. I > have subclass of CreateView for creating a post. I'm creating a rental site > project where people can post their apar