Re: MongoDB connection with django

2022-01-17 Thread Sai Kiran Mekala
Yes , I was notified with the same error but I was unable to connect
MongoDB , djongo isn't available . I already installed djongo ( module)
using pip.please suggest I was assigned a task to connect MongoDB with
django.

Thanks
Saikiran

On Mon, 17 Jan 2022, 23:02 Kasper Laudrup,  wrote:

> On 17/01/2022 12.09, Sai Kiran Mekala wrote:
> > Hi All,
> >
> > Can someone please assist to connect mongodb with django where I was
> > notified an error
> >
> > django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available
> > database backend or couldn't be imported. Check the above exception. To
> > use one of the built-in backends, use 'dja
> > ngo.db.backends.XXX', where XXX is one of:
> >  'mysql', 'oracle', 'postgresql', 'sqlite3'
> >
>
> Did you check the above exception as the error messages suggests you
> should do?
>
> Kind regards,
>
> Kasper Laudrup
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/pR2XA4P7g-c/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e2fd9595-a5f1-d7fe-8384-52d39038269f%40stacktrace.dk
> .
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CADE%3D2u%3DGXx3HNdanK8kjhDds%2BR8a3Q2XsFTgVFi5ck%3DmSyKgkg%40mail.gmail.com.


When I redirect to a previously used view old data is used

2022-01-17 Thread lone...@gmail.com
Hello all,

I have a redirect that redirects to a previously used view.  The data 
in the view should change, and does, once I reload the page.  How can I get 
the new page without reloading the page first?  For clarity, here is the 
basic process I have defined so far.

1. View is loaded and everything looks great.
2. Eventually, the user goes through a redirect that points to the original 
view in step 1.
3. Once they are on the same view as step 1, the old data is present.  I 
have a to right-click and reload the page for the new data to appear on the 
view.

What am I missing?

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c2a02648-8f76-40d7-b39e-66c4c83429d8n%40googlegroups.com.


Re: Django sever for andriod

2022-01-17 Thread Chukwu George
Please help! I am trying to access django login page but it keep tell me "A 
server error occurred. Please contact the administrator" what do I do? 
Please help.

On Wednesday, January 28, 2015 at 3:35:54 AM UTC-10 Andreas Kuhne wrote:

> 2015-01-28 6:45 GMT+01:00 suhail areekkan :
>
>> I am new in django how i start a django server for an android application.
>>
> -- 
>> 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...@googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at http://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/39810ddc-abaf-4411-9c54-e22698fb188b%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
> Hi Suhail,
>
> That would probably be exactly like starting a normal django server. You 
> will have to be a bit more specific with what you want the server to do? 
>
> If you are thinking about holding information in a django server online 
> and communicating with it from an android app, I think something like the 
> django rest framework would help you a bit (
> http://www.django-rest-framework.org/).
>
> Regards,
>
> Andréas
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7ac83794-d05c-4bcd-86fe-e213a8535492n%40googlegroups.com.


Re: request.POST.getlist('xxx') only has one value in ajax request for many2many

2022-01-17 Thread Julio Cojom
I remember having a problem like that once, in your views print the hole
dictionary "print(request.POST)", you should see all the values of the
field you want as list, not just one.

Then instead of getlist try just get, request.POST.get('field_here')

Let me know how it goes

El lun., 17 de enero de 2022 11:52 a. m., Campbell McKilligan <
campb...@dxclabs.com> escribió:

> Yeah - I am looping.  I just get one iteration which is the last item even
> though the request body has the same key repeated.
>
> For example, this code only prints one item, whereas for a different form
> elsewhere, it would iterate through all the identical keys:
>print(self.request.__dict__)
>   for pool in self.request.POST.getlist('pool_list'):
>   print(f"form pool_list item: {pool}")
>
> The main difference to when it works is that this form is submitted via
> ajax; and uses UpdateView.
>
> On Monday, 17 January 2022 at 01:34:18 UTC Jason wrote:
>
>> https://code.djangoproject.com/ticket/1130
>>
>> Essentially, this is expected behavior, and previous comment is correct.
>> Need to loop through the items in the list
>>
>> On Sunday, January 16, 2022 at 5:42:45 PM UTC-5 richy...@gmail.com wrote:
>>
>>> You might want to loop through the list
>>> Example:
>>> Lists = request.getlist('item')
>>> For list in Lists:
>>> .
>>>
>>>
>>> On Sun, Jan 16, 2022, 9:30 PM Campbell McKilligan 
>>> wrote:
>>>
 Hi,

 Using Django 3.2 and Py 3.9

 I have an ajax request which submits multiple values for a field to an
 UpdateView.

 In the request dict body I see both values (in this case, for the
 pool_list column):

 '_body':
 b"csrfmiddlewaretoken=z...h&...=..._datetime==555&
 *pool_list=507_list=499*&...

 Later in the request dict, I only see one of the values in the _post:
 '_post': * 'pool_list': ['499'],*

 This means that in request.POST.getlist('pool_list'), I'm only getting
 one result in the list object.

 Any idea why it's only the last value being populated in the getlist?

 --
 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...@googlegroups.com.
 To view this discussion on the web visit
 https://groups.google.com/d/msgid/django-users/bf3a5e3b-4e8c-4a73-8647-d494bedbdf90n%40googlegroups.com
 
 .

>>> --
> 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...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/6fc15142-4650-4bac-a3f9-efd411f3813an%40googlegroups.com
> 
> .
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHRQUHmdG15CO6b7hh5JFyGLZytm11wPsQC-j-V_jRqpakaywA%40mail.gmail.com.


Re: request.POST.getlist('xxx') only has one value in ajax request for many2many

2022-01-17 Thread Campbell McKilligan
Yeah - I am looping.  I just get one iteration which is the last item even 
though the request body has the same key repeated.

For example, this code only prints one item, whereas for a different form 
elsewhere, it would iterate through all the identical keys:
   print(self.request.__dict__)
  for pool in self.request.POST.getlist('pool_list'):
  print(f"form pool_list item: {pool}")

The main difference to when it works is that this form is submitted via 
ajax; and uses UpdateView. 

On Monday, 17 January 2022 at 01:34:18 UTC Jason wrote:

> https://code.djangoproject.com/ticket/1130
>
> Essentially, this is expected behavior, and previous comment is correct.  
> Need to loop through the items in the list
>
> On Sunday, January 16, 2022 at 5:42:45 PM UTC-5 richy...@gmail.com wrote:
>
>> You might want to loop through the list 
>> Example:
>> Lists = request.getlist('item')
>> For list in Lists:
>> .
>>
>>
>> On Sun, Jan 16, 2022, 9:30 PM Campbell McKilligan  
>> wrote:
>>
>>> Hi,
>>>
>>> Using Django 3.2 and Py 3.9
>>>
>>> I have an ajax request which submits multiple values for a field to an 
>>> UpdateView.
>>>
>>> In the request dict body I see both values (in this case, for the 
>>> pool_list column):
>>>
>>> '_body': 
>>> b"csrfmiddlewaretoken=z...h&...=..._datetime==555&
>>> *pool_list=507_list=499*&...
>>>
>>> Later in the request dict, I only see one of the values in the _post:
>>> '_post': * 'pool_list': ['499'],*
>>>
>>> This means that in request.POST.getlist('pool_list'), I'm only getting 
>>> one result in the list object.
>>>
>>> Any idea why it's only the last value being populated in the getlist?
>>>
>>> -- 
>>> 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...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/django-users/bf3a5e3b-4e8c-4a73-8647-d494bedbdf90n%40googlegroups.com
>>>  
>>> 
>>> .
>>>
>>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6fc15142-4650-4bac-a3f9-efd411f3813an%40googlegroups.com.


Re: MongoDB connection with django

2022-01-17 Thread Kasper Laudrup

On 17/01/2022 12.09, Sai Kiran Mekala wrote:

Hi All,

Can someone please assist to connect mongodb with django where I was 
notified an error


django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available 
database backend or couldn't be imported. Check the above exception. To 
use one of the built-in backends, use 'dja

ngo.db.backends.XXX', where XXX is one of:
     'mysql', 'oracle', 'postgresql', 'sqlite3'



Did you check the above exception as the error messages suggests you 
should do?


Kind regards,

Kasper Laudrup

--
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e2fd9595-a5f1-d7fe-8384-52d39038269f%40stacktrace.dk.


OpenPGP_0xE5D9CAC64AAA55EB.asc
Description: OpenPGP public key


OpenPGP_signature
Description: OpenPGP digital signature


Re: Django, Docker & SaaS Multi-Tenant Architecture

2022-01-17 Thread Bernard Mallala
Btw contact form on your website does not show on mobile.

On Monday, January 17, 2022 at 12:41:44 AM UTC-7 in...@lyntree.io wrote:

> Hi,
>
> Thank you for this, I've just joined! I tried looking before but couldn't 
> find but i'll sure be on it now :)
>
> Thanks again
>
> On Fri, 14 Jan 2022 at 16:57, MR INDIA  wrote:
>
>>
>> A official discord channel has been released recently follow Django 
>> newsletter for such updates :
>>
>> https://discord.com/invite/TP9yQBwyxF?utm_campaign=Django%2BNewsletter_medium=email_source=Django_Newsletter_110
>> On Friday, 14 January 2022 at 02:12:38 UTC+5:30 ber...@autofyle.com 
>> wrote:
>>
>>> I second the suggestion to have a discord channel versus async/email
>>>
>>> On Thursday, January 13, 2022 at 1:41:14 PM UTC-7 Bernard Mallala wrote:
>>>
 I will paraphrase and feel free to correct.
 You have an image that when deployed results in a django application 
 that can be accessed but without a specific app that is built to work 
 within this image.

1. Let' presume that you working on a Tutorial App and you complete 
this to taste
2. Now you only want to configure everything including nginx such 
that when this is deployed then a user will be able to access the 
 django 
instance without issue
3. Thereafter, you want to be able to add the isolated Tutorial app 
so that it works without issue on this Django instance. I do not know 
 that 
you can point django to an app or the Tutorial app if it existed 
 somewhere 
else within the cloud, I have not seen this.
But, to simply add the Tutorial app within this Django instance.I 
would perhaps have run a script to apply all required to get the 
 Tutorial 
App running. E.g add to settings file, run migrations etc

 On Thursday, January 13, 2022 at 7:47:26 AM UTC-7 in...@lyntree.io 
 wrote:

> Hello,
>
> I'm looking at building and deploying either a SaaS / PaaS or CaaS but 
> what I'm struggling to figure out is how I can deploy an image of django 
> (without its app server)  into a container probably using nginx and 
> docker 
> to work between them. 
>
> e.g Django you have the ability to create additional apps within 
> Django but app I'm building inside at the moment, Ideally I want to 
> isolate 
> that app and deploy that app but ensure its connected to the main django 
> app within the cloud and i'm not sure if its possible like this?
>
> Anyone have any advice on this? p.s also is there a django instant 
> chat channel we can speak on as could not connect on the irc one? Discord 
> & 
> Slack is becoming more popular these days for devs for open questions.
>
> Kindest Regards,
>
> Bridget
>
 -- 
>> You received this message because you are subscribed to a topic in the 
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit 
>> https://groups.google.com/d/topic/django-users/-_kM4rWLdhw/unsubscribe.
>> To unsubscribe from this group and all its topics, send an email to 
>> django-users...@googlegroups.com.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/0197d516-aad3-4dc5-970f-ede5f50e6fefn%40googlegroups.com
>>  
>> 
>> .
>>
>
>
> -- 
>
> Bridget
>
>
> Kindest Regards,
>
>
> *Lyntree Web Studio *
>
> Website Design | Website Hosting | Mobile Applications
>
> *Full Stack App|Web|Mobile Developer*
>
>
> *Website:* https://lyntree.co.uk | https://lyntree.io tbc
>
> *Phone */ *WhatsApp*: 07761 308429
>
> *Email:* in...@lyntree.io / in...@lyntree.co.uk
>
>

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6f22fcd7-7ad4-4ce4-a1ee-76fec136afc8n%40googlegroups.com.


Re: ModelMultipleChoiceField - different number of values in request _body and _post

2022-01-17 Thread Campbell McKilligan
Here's the parsed POST payload (I've trimmed all the HTML in the payload 
since it's repetitive).  Below is the non-parsed non-trimmed POST payload.

   1. csrfmiddlewaretoken: 
   FmbcJ2t1RV6rMSf4TJzzPOe8Zm1yzXx7Jh3mdfSK1TTMEdBCKs5VIWhICBbbPNn6
   2. key: 
   acme-seoul-2022-cast
   3. expiry_datetime: 
   4. pool: 
   519
   5. overflow_pool: 
   520
   6. pool_list: 
   507
   7. pool_list: 
   497
   8. talent_engagement_status: 
   1
   9. title: 
   Seoul Environment Expo 2022 Cast Sign-Up
   10. thank_you_text: 
   Congratulations!
   


MongoDB connection with django

2022-01-17 Thread Sai Kiran Mekala
Hi All,

Can someone please assist to connect mongodb with django where I was 
notified an error 

django.core.exceptions.ImproperlyConfigured: 'djongo' isn't an available 
database backend or couldn't be imported. Check the above exception. To use 
one of the built-in backends, use 'dja
ngo.db.backends.XXX', where XXX is one of:
'mysql', 'oracle', 'postgresql', 'sqlite3'

[image: error snap.PNG]

-- 
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...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d374fa60-f56c-4dee-aa58-09123a2c84a7n%40googlegroups.com.