Pass value from view to non-model form

2018-06-22 Thread HashRocketSyntax
When I call my form in my view, I am trying to pass MY_VALUE to the form as an argument. I am doing this because I want to get my validation out of my views and into my forms. *views.py* OTHER_VALUE = "the query that i run" if request.method=='POST': form = MY_FORM(request.POST, OTHER_VALUE)

Re: prevent AppConfig.ready() from running twice

2018-06-22 Thread Mike Dewhirst
Is there a python singleton pattern which might work? Connected by Motorola Melvyn Sopacua wrote: >On donderdag 21 juni 2018 16:23:23 CEST clavierpla...@gmail.com wrote: > >> If it helps, here is the reason I need to override this multi-instantiation >> behavior: my application launches a multi

error connecting mysql 8 with django

2018-06-22 Thread saurabh kumar
Hi, I am have just started on django, and having trouble setting mysql with django. Can anyone help me by looking at following stack-overflow question https://stackoverflow.com/questions/50983902/error-connecting-mysql-8-with-django Thanks, Saurabh -- You received this message because you are

Django Postgres Intermediary doesn't set ON DELETE CASCADE

2018-06-22 Thread James Bellaby
I'm having a little trouble with my "through" table. I've set the modal to have two Foreign Key fields. Ex. below: class Person(models.Model): title = models.CharField(max_length=255) class Group(models.Model): title = models.CharField(max_length=255) members= models.ManyToManyField

Re: smtp email configuration error

2018-06-22 Thread Jason
*SMTPSenderRefused: (501, ': sender address must contain a domain', u'Your'* -- 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 django-users+unsubscr...@googlegrou

smtp email configuration error

2018-06-22 Thread Ruhia gr
when am trying to submit my contact form i am getting error please will anyone try to solve this and tell me whats is wrong here and what i actually missed out given below Internal Server Error: /contact/ Traceback (most recent call last): File "C:\Users\user\Envs\ibex\lib\site-packages\django

Re: Django Channels 2.0 - How to init and persist/communicate with only one instance of background worker for every channel_layer.send?

2018-06-22 Thread itsnate_b
I am only using one channel name and my expectation is that only one instance of the background worker class should be initiated/used. Instead, I am seeing a new class being initiated for each call routed to the background worker class. This is unexpected... On Thursday, June 21, 2018 at 3:55:

Re: Multiple image upload in Django using AJAX & jQuery

2018-06-22 Thread Jani Tiainen
I've made simple picture uploader with Django. Sources can be found at https://github.com/jtiai/picpaster pe 22. kesäk. 2018 klo 14.38 Keerthan Bhat kirjoitti: > Can someone please help me in this? This thing is literally giving me > headache from past few weeks. Please help. Please! > > > https

Re: Run server

2018-06-22 Thread Gerardo Palazuelos Guerrero
hi, I highly suggest you to check the django-girls tutorial (search for it) for newbies (at least it worked for me). It has the more detailed steps to help you understand during your initial phase. regards, Gerardo. -- Gerardo Palazuelos Guerrero On Fri, Jun 22, 2018 at 8:48 AM, Quiosa Evaristo

Re: Run server

2018-06-22 Thread Dan Nepejchal
Hi, you forgot set up your databse. Here is some documentation https://docs.djangoproject.com/en/2.0/ref/databases/ Dne pá, 22. 6. 2018 18:01 uživatel Quiosa Evaristo < evaris...@una.adventist.org> napsal: > > Hello! > > I am learning python, I have installed it in my computer it is running > ver

Run server

2018-06-22 Thread Quiosa Evaristo
Hello! I am learning python, I have installed it in my computer it is running very well. I have installed django version 1.11.13 whenever I try to run the server it triggers the error bellow: Performing system checks... System check identified no issues (0 silenced). Unhandled exception in th

Re: How to run python script by clicking a HTML button?

2018-06-22 Thread Julio Biason
Hi Subhendu, To make this all work, you'll need to do this: 1. Create a Django app 2. Add some URL to a view (any view) 3. Inside the view, run your script. 4. Change the for on the "action" to point to the URL in point 2. You may want to read the Django Tutorial[1] to grasp who those things are

Re: how to pass the ID of a slected item in a list to ORM

2018-06-22 Thread Gerald Brown
Thanks for the reply. On Tuesday, 19 June, 2018 04:17 AM, C. Kirby wrote: Yes On Friday, June 15, 2018 at 10:07:01 PM UTC-4, Gerald Brown wrote: When I inspect the object in Firefox that is what it looks like because it is generated by Django. Does the user have to select an item

Re: Invalid URLs passing validation by URLValidator

2018-06-22 Thread Melvyn Sopacua
On vrijdag 22 juni 2018 02:50:08 CEST Tim Bell wrote: > http://#FOO#/b...@example.com > > I believe that this is passing validation because "#FOO#/bar" is being > treated as a username, with "example.com" as the hostname. However, > "#FOO#/bar" shouldn't be valid as a username because the "#" and

Multiple image upload in Django using AJAX & jQuery

2018-06-22 Thread Keerthan Bhat
Can someone please help me in this? This thing is literally giving me headache from past few weeks. Please help. Please! https://stackoverflow.com/questions/50982220/multiple-image-upload-in-django-using-ajax-jquery -- You received this message because you are subscribed to the Google Groups "

Re: Invalid URLs passing validation by URLValidator

2018-06-22 Thread Jason
Interesting find.. the only time I've used that kind of URL convention is by connecting to redis with the python redis library. It also fits db url connection strings too. What's the actual use case for the URL schema? You could also report this to the https://groups.google.com/forum/#!forum/

How to access a python list or a dict variable in view after rendering it to template?

2018-06-22 Thread Utpal Brahma
views.py @login_required def user_profile(request): grp = get_user_group(request.user) # print(dlist) if grp == 'Student': return render(request, 'sorp_app/s_profile.html') else: iform = forms.StudentInfoForm() mform = forms.StudentMedicalForm() ffor

Re: How to fill latitude and longitude values from an existinglocation field in Django+Python?

2018-06-22 Thread prateek gupta
They have mentioned that it is for Django PostGIS fields. On Thursday, June 21, 2018 at 11:52:55 PM UTC+5:30, Himanshu Gamit wrote: > > Prateek, > > > > Have you tried this module? > http://django-map-widgets.readthedocs.io/en/latest/ > > > > Thanks > > Himanshu > > Sent from Mail

Re: prevent AppConfig.ready() from running twice

2018-06-22 Thread Melvyn Sopacua
On donderdag 21 juni 2018 16:23:23 CEST clavierpla...@gmail.com wrote: > If it helps, here is the reason I need to override this multi-instantiation > behavior: my application launches a multiprocessing.Process at startup to > monitor and run background tasks. Having more than one background Proce

Re: Django says a modification was made to Auth user when I didn't, and migration has a timestamp from the future. Help?

2018-06-22 Thread Melvyn Sopacua
On vrijdag 22 juni 2018 05:36:42 CEST JJ Zolper wrote: > It's Jun 21 at 11:30 pm in my world fyi. > > On Thursday, June 21, 2018 at 11:34:50 PM UTC-4, JJ Zolper wrote: And 23:30 + 4 = 27:30 = 3:30 next day. Django generates migration timestamps in UTC time. > > You'll see the timestamp on this