Sunday, September 19, 2021

Using ModelForm to get labels in a DetailView

I don't know if this is good practice, but to get field labels in a DetailView, it seems to work fine if you just add a form to the context:

views.py:

class ItemDetailView(DetailView):

    model = Item
    context_object_name = "item"

    def get_context_data(self, **kwargs):
        context_data = super().get_context_data(**kwargs)
        context_data['form'] = ItemForm # just to get the labels
        return context_data


item_detail_view.html:

<div class="label">{{ form.name.label_tag }}</div><div class="value"> {{ item.name }}</div>
<div class="label">{{ form.notes.label_tag }}</div><div class="value"> {{ item.notes }}</div>
<div class="label">{{ form.asset_number.label_tag }}</div><div class="value"> {{ item.asset_number }}</div>
<div class="label">{{ form.serial_number.label_tag }}</div><div class="value"> {{ item.serial_number }}</div>
<div class="label">{{ form.network_name.label_tag }}</div><div class="value"> {{ item.network_name }}</div>

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/e84f2b57-6e64-4801-bd0f-ff8525e93ba1n%40googlegroups.com.

Saturday, September 18, 2021

Re: need help integrating SSL with react/django web app

hey

I am with Cloudflare ssl with httpd autonomous linux with mos_wsgi. 
foe Django you need mod_wsgi with all which is tricky. 

On Sat, Sep 18, 2021 at 7:18 PM MR INDIA <buddietube123@gmail.com> wrote:
See this 
https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx Use letsencrypt if you have shell access
On Saturday, 18 September 2021 at 02:41:54 UTC+5:30 hey there wrote:

python 3.2.6
django 3.2.7
cx_oracle 8



On Sat, 18 Sep 2021, 2:25 am hey there, <c.say...@gmail.com> wrote:
hi 

i am also stuck 

On Monday, May 10, 2021 at 12:21:25 AM UTC+5:30 jmccla...@gmail.com wrote:
Hello Ammar,

we're stuck, have been for days

We have nginx set in ec2 instance but cannot get the ssl to slip in.

I copied in Divy who is also working to get this solved

any help would be appreciated


can you help me with this or provide any documentation

On Sat, 8 May 2021 at 10:16, Ammar Mohammed <amarb...@gmail.com> wrote:
I am using Nginx as a proxy for my Django app and this method is working just fine.

On Sat, May 8, 2021, 11:14 Ammar Mohammed <amarb...@gmail.com> wrote:
I think you're supposed to install the certificate in your web server (Nginx, Apache).
Follow the manual to install it to your server and everything will be fine.

On Sat, May 8, 2021, 10:35 John McClain <jmccla...@gmail.com> wrote:
Hello,

I am having difficulties connecting SSL to my React/Python webapp

I am trying to integrate the PWA and am having difficulties getting the SSL to adopt to the app.

Does anyone have experience with this?

Cheers

--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

--
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/CAN-hv_qHS2wdhuwYQLob1C_uM8vgfpbqnvxGke5oy8CyuT551g%40mail.gmail.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...@googlegroups.com.


--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

--
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/4WtsxZ6FUJo/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/1c48904e-41b0-4959-8daf-6926f7b95652n%40googlegroups.com.

--
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/4WtsxZ6FUJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fc47fc8f-2894-4869-b275-4ebe7211c2bbn%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BiAj8ibGrSeh4L5tQqhQd%2BampM3XV0yOyJ6o1N6yKy6Ku-gWA%40mail.gmail.com.

Re: need help integrating SSL with react/django web app

See this 
https://certbot.eff.org/lets-encrypt/ubuntufocal-nginx Use letsencrypt if you have shell access
On Saturday, 18 September 2021 at 02:41:54 UTC+5:30 hey there wrote:

python 3.2.6
django 3.2.7
cx_oracle 8



On Sat, 18 Sep 2021, 2:25 am hey there, <c.say...@gmail.com> wrote:
hi 

i am also stuck 

On Monday, May 10, 2021 at 12:21:25 AM UTC+5:30 jmccla...@gmail.com wrote:
Hello Ammar,

we're stuck, have been for days

We have nginx set in ec2 instance but cannot get the ssl to slip in.

I copied in Divy who is also working to get this solved

any help would be appreciated


can you help me with this or provide any documentation

On Sat, 8 May 2021 at 10:16, Ammar Mohammed <amarb...@gmail.com> wrote:
I am using Nginx as a proxy for my Django app and this method is working just fine.

On Sat, May 8, 2021, 11:14 Ammar Mohammed <amarb...@gmail.com> wrote:
I think you're supposed to install the certificate in your web server (Nginx, Apache).
Follow the manual to install it to your server and everything will be fine.

On Sat, May 8, 2021, 10:35 John McClain <jmccla...@gmail.com> wrote:
Hello,

I am having difficulties connecting SSL to my React/Python webapp

I am trying to integrate the PWA and am having difficulties getting the SSL to adopt to the app.

Does anyone have experience with this?

Cheers

--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

--
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/CAN-hv_qHS2wdhuwYQLob1C_uM8vgfpbqnvxGke5oy8CyuT551g%40mail.gmail.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...@googlegroups.com.


--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

--
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/4WtsxZ6FUJo/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/1c48904e-41b0-4959-8daf-6926f7b95652n%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/fc47fc8f-2894-4869-b275-4ebe7211c2bbn%40googlegroups.com.

Friday, September 17, 2021

Re: need help integrating SSL with react/django web app


python 3.2.6
django 3.2.7
cx_oracle 8



On Sat, 18 Sep 2021, 2:25 am hey there, <c.sayan2016@gmail.com> wrote:
hi 

i am also stuck 

On Monday, May 10, 2021 at 12:21:25 AM UTC+5:30 jmccla...@gmail.com wrote:
Hello Ammar,

we're stuck, have been for days

We have nginx set in ec2 instance but cannot get the ssl to slip in.

I copied in Divy who is also working to get this solved

any help would be appreciated


can you help me with this or provide any documentation

On Sat, 8 May 2021 at 10:16, Ammar Mohammed <amarb...@gmail.com> wrote:
I am using Nginx as a proxy for my Django app and this method is working just fine.

On Sat, May 8, 2021, 11:14 Ammar Mohammed <amarb...@gmail.com> wrote:
I think you're supposed to install the certificate in your web server (Nginx, Apache).
Follow the manual to install it to your server and everything will be fine.

On Sat, May 8, 2021, 10:35 John McClain <jmccla...@gmail.com> wrote:
Hello,

I am having difficulties connecting SSL to my React/Python webapp

I am trying to integrate the PWA and am having difficulties getting the SSL to adopt to the app.

Does anyone have experience with this?

Cheers

--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

--
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/CAN-hv_qHS2wdhuwYQLob1C_uM8vgfpbqnvxGke5oy8CyuT551g%40mail.gmail.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...@googlegroups.com.


--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

--
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/4WtsxZ6FUJo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1c48904e-41b0-4959-8daf-6926f7b95652n%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2BiAj8h8usyf0bfVU-JE6R53rtOchgdPg9xaaysaJ1F2a2T1_w%40mail.gmail.com.

Re: need help integrating SSL with react/django web app

hi 

i am also stuck 

On Monday, May 10, 2021 at 12:21:25 AM UTC+5:30 jmccla...@gmail.com wrote:
Hello Ammar,

we're stuck, have been for days

We have nginx set in ec2 instance but cannot get the ssl to slip in.

I copied in Divy who is also working to get this solved

any help would be appreciated


can you help me with this or provide any documentation

On Sat, 8 May 2021 at 10:16, Ammar Mohammed <amarb...@gmail.com> wrote:
I am using Nginx as a proxy for my Django app and this method is working just fine.

On Sat, May 8, 2021, 11:14 Ammar Mohammed <amarb...@gmail.com> wrote:
I think you're supposed to install the certificate in your web server (Nginx, Apache).
Follow the manual to install it to your server and everything will be fine.

On Sat, May 8, 2021, 10:35 John McClain <jmccla...@gmail.com> wrote:
Hello,

I am having difficulties connecting SSL to my React/Python webapp

I am trying to integrate the PWA and am having difficulties getting the SSL to adopt to the app.

Does anyone have experience with this?

Cheers

--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

--
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/CAN-hv_qHS2wdhuwYQLob1C_uM8vgfpbqnvxGke5oy8CyuT551g%40mail.gmail.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...@googlegroups.com.


--
John McClain

Cell: 085-1977-823
Skype: jmcclain0129

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1c48904e-41b0-4959-8daf-6926f7b95652n%40googlegroups.com.

Thursday, September 9, 2021

Daphne ASGI Django Long running requests cause upstream connection refused NGINX

I have a Django 3.2.4 application which I am running on Kubernetes, fronted by NGINX, served via ASGI / daphne. I have a long running API call (no longer than 30 seconds) that when running, seems to cause other requests to be refused.

In the NGINX logs I see connect() failed (111: Connection refused) while connecting to upstream and in the pods I see the liveness probe fails (because connection refused), and get Killed 8 pending application instances.

Can someone tell me what might be happening?

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/39393c07-54f0-47e7-868c-df6cf84f1709n%40googlegroups.com.

Thursday, September 2, 2021

Public IP redirects to localhost

Hi,

I am hosting Akvo RSR (https://github.com/akvo/akvo-rsr) an Open Source project on a Digital Ocean droplet. I am runing the application inside a docker container. I can access the landing page via the droplet public IP address: http://157.230.228.89/  Accessing other parts of the site, for example register redirects to localhost

What settings do i need to change so that it points to the public ip or a domain (when I do set up one)

Thanks
Ronald

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/cb287815-1572-48fc-a8d6-59e4d01e878dn%40googlegroups.com.