Monday, September 30, 2019

Re: Database connection closed after each request?

Hi Mike,
I tried with custom persistent connection, but results in same error. My environment is Django + postgres + nginx + gunicorn

On Saturday, August 29, 2009 at 5:38:58 PM UTC+5:30, Mike wrote:
Hi,

I made some small custom psycopg2 backend that implements persistent
connection using global variable. With this I was able to improve the
amount of requests per second from 350 to 1600 (on very simple page
with few selects) Just save it in the file called base.py in any
directory (e.g. postgresql_psycopg2_persistent) and set in settings:

DATABASE_ENGINE to projectname.postgresql_psycopg2_persistent

Here is a source: http://dpaste.com/hold/86948/

# Custom DB backend postgresql_psycopg2 based
# implements persistent database connection using global variable

from django.db.backends.postgresql_psycopg2.base import DatabaseError,
DatabaseWrapper as BaseDatabaseWrapper, \
    IntegrityError
from psycopg2 import OperationalError

connection = None

class DatabaseWrapper(BaseDatabaseWrapper):
    def _cursor(self, *args, **kwargs):
        global connection
        if connection is not None and self.connection is None:
            try: # Check if connection is alive
                connection.cursor().execute('SELECT 1')
            except OperationalError: # The connection is not working,
need reconnect
                connection = None
            else:
                self.connection = connection
        cursor = super(DatabaseWrapper, self)._cursor(*args, **kwargs)
        if connection is None and self.connection is not None:
            connection = self.connection
        return cursor

    def close(self):
        if self.connection is not None:
            self.connection.commit()
            self.connection = None

--
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/00ae685a-16c9-443e-92be-5150eddbf27a%40googlegroups.com.

Re: Django Register form

Docs.djangoproject.com. the best way to start.

Em ter, 1 de out de 2019 01:21, Abu Yusuf <yusuf@binate-solutions.com> escreveu:
Share me more about your project. Can you share with me the project? 



photo
Abu Yusuf
Jr. Software Engineer at  Binate Solutions Ltd.
Dhaka, Bangladesh
01828689381 
revelyusuf109@gmail.com 
https://yusuff.dev 
Linkedin https://www.linkedin.com/in/yusuf-dev/
live:9151cfda40e05eef

On Mon, Sep 30, 2019 at 6:40 PM ODII DANIEL <odiidaniel5@gmail.com> wrote:
Thank you for this opportunity. I have a website that I want to add user dashboard to but i don't know how to go about it. please help me I've in stall Django but I don't know how to use it.

On Sun, Sep 29, 2019 at 10:22 AM Abu Yusuf <yusuf@binate-solutions.com> wrote:
What's the Issue?



photo
Abu Yusuf
Jr. Software Engineer at  Binate Solutions Ltd.
Dhaka, Bangladesh
01828689381 
revelyusuf109@gmail.com 
https://yusuff.dev 
Linkedin https://www.linkedin.com/in/yusuf-dev/
live:9151cfda40e05eef

On Thu, Sep 26, 2019 at 4:51 PM ODII DANIEL <odiidaniel5@gmail.com> wrote:
Please I'm having issues integrating Django into my website

--
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/9355ce4e-6466-4f7d-b3f5-23c2ed276658%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/CACNsr297-fZ6WTgmJ8Vu3HKE%3DkbT5MLiE06cgAjJUDGh4NMcKA%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAVwfF%3DJMxqsTT9dhWEzzN5tz%3Dj9Kg%2BNakMBRa-T9Kyti8KUvA%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACNsr29EsN_ZdZuFrCAGmuKOGBk%2BjAjnm9%2BO98ZPWHQFJLQSUQ%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJPi9yG-8XRuCP%3DB0tCSGaLq65RdoPJ%2Bp_Sj8x26ikYh5SER5g%40mail.gmail.com.

Re: Django Register form

Share me more about your project. Can you share with me the project? 



photo
Abu Yusuf
Jr. Software Engineer at  Binate Solutions Ltd.
Dhaka, Bangladesh
01828689381 
revelyusuf109@gmail.com 
https://yusuff.dev 
Linkedin https://www.linkedin.com/in/yusuf-dev/
live:9151cfda40e05eef

On Mon, Sep 30, 2019 at 6:40 PM ODII DANIEL <odiidaniel5@gmail.com> wrote:
Thank you for this opportunity. I have a website that I want to add user dashboard to but i don't know how to go about it. please help me I've in stall Django but I don't know how to use it.

On Sun, Sep 29, 2019 at 10:22 AM Abu Yusuf <yusuf@binate-solutions.com> wrote:
What's the Issue?



photo
Abu Yusuf
Jr. Software Engineer at  Binate Solutions Ltd.
Dhaka, Bangladesh
01828689381 
revelyusuf109@gmail.com 
https://yusuff.dev 
Linkedin https://www.linkedin.com/in/yusuf-dev/
live:9151cfda40e05eef

On Thu, Sep 26, 2019 at 4:51 PM ODII DANIEL <odiidaniel5@gmail.com> wrote:
Please I'm having issues integrating Django into my website

--
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/9355ce4e-6466-4f7d-b3f5-23c2ed276658%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/CACNsr297-fZ6WTgmJ8Vu3HKE%3DkbT5MLiE06cgAjJUDGh4NMcKA%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAVwfF%3DJMxqsTT9dhWEzzN5tz%3Dj9Kg%2BNakMBRa-T9Kyti8KUvA%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACNsr29EsN_ZdZuFrCAGmuKOGBk%2BjAjnm9%2BO98ZPWHQFJLQSUQ%40mail.gmail.com.

I'm just started with Django, I'm getting this error after even following the steps provided for RHEL OS?


--
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/f937a1d3-6b40-4b05-babe-210a8fd8610c%40googlegroups.com.

Re: Django FastCGI and static files

you can collect your static files into 1 folder after deployment into server, and you can set it in base.py. then on webserver settings you can set only one static path.
OR
you can split  static files into many folder, but in your base.py setting you put all static path using STATICFILES_DIRS  then you SET STATIC_URL and STATIC_ROOT to your physical path on webserver settings.
STATIC_ROOT = os.getenv(
    'STATIC_ROOT', os.path.join(BASE_DIR, 'collected_static'))
STATIC_URL = '/static/'

Hope you understand it.

Rgrds,
HRM 

On Tue, Sep 17, 2019 at 11:16 PM Martin Jaan Leesment <martinjaan11@gmail.com> wrote:
Hey

I'm new to serving Django website on a shared server as well as using fastcgi and .htaccess so this might be a basic question. Namely I'm having difficulties serving static content. I've tried playing with htaccess rules, but no luck yet. My project structure:

myproject/
├── myapp
│   ├── admin.py
│   ├── apps.py
│   ├── models.py
│   ├── static
│   │   └── myapp
│   │       ├── css
│   │       │   ├── bootstrap.min.css
│   │       │   ├── bootstrap.min.min_myproject.css
│   │       │   └── proj.css
│   │       ├── fonts
│   │       ├── images
│   │       │   ├── logo.png
│   │       └── scripts
│   │           ├── bootstrap.bundle.min.js
│   │           └── bootstrap.min.js
│   ├── templates
│   │   └── myapp
│   │       ├── base.html
│   │       ├── footer.html
│   │       ├── header.html
│   │       ├── index.html
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── manage.py
├── myproject
│   ├── __init__.py
│   ├── locale
│   ├── media
│   ├── settings
│   │   ├── base.py
│   │   ├── dev.py
│   │   ├── __init__.py
│   │   ├── prod.py
│   ├── static
│   ├── templates
│   │   └── base.html
│   ├── urls.py
│   └── wsgi.py
├── requirements
└── test.py

My htaccess

Options +ExecCGI
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^(/static.*)$ /static//$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ cgi-bin/mydjangapp.fcgi/$1 [QSA,L]


If anybody can help me figure out how to solve it, would really appreciate.

Thanks!

Best
MJ

--
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/80c1e98b-8a0a-482c-a20f-29b4c7afdcab%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/CAHGmjWW8d%2Bk6an50622N8CWv5nPnqYxt%3DTgg_AUfE7r71Zcc0w%40mail.gmail.com.

Re: Problem with safedelete implementation

On 30/09/2019 11:33 pm, Jérôme Le Carrou wrote:
> Hi
>
> I am new on this forum and very, very new user of Django so hope you
> will be uncensorious
>
> I need to implement the safedelete application
> (https://buildmedia.readthedocs.org/media/pdf/django-safedelete/latest/django-safedelete.pdf)
> for my project but I should have miss something in the documentation
> because I did non manage tu use it correctly
>
> I will expose you briefly my problem
> I have 2 classes BiologyAssessment and BiologyExam linked with a
> foreignKey: a biologicalassessment is linked with multiple biologicalexam
>
> When I delete a biologicalassessment, I want related biologicalexamn
> to be 'delete' (but soft delete)
> When I delete a biologicalexam, I want biologicalexam to be delete
> (soft delete)
>
> I have implemented in my project but unfortunetly, when I delete a
> biologicalexam, the linked biologicalasessment is also delete
> I have try different to use _safedelete_policy = SOFT_DELETE for my
> BiologicalExam class but it does not chage anything
>
> could you help me ?
>
> models.py
>
> class BiologicalAssessment(SafeDeleteModel):
>
>     _safedelete_policy = SOFT_DELETE_CASCADE
>     ide = models.AutoField(primary_key=True)
>     vis_ref = models.ForeignKey(Visite, verbose_name='Visite',
> related_name='bilan', on_delete=models.CASCADE)

models.CASCADE will persuade Django to delete related child instances in
a cascade. It means if you delete the parent all related model instances
"below" it will also be deleted.

https://docs.djangoproject.com/en/2.1/ref/models/fields/#django.db.models.CASCADE

I don't know what SOFT_DELETE_CASCADE is all about but it is possible
your on_delete choice is defeating it.

Mike

>     bio_prv_dat = models.DateField("Date de prélèvement")
>
> class BiologicalExam(SafeDeleteModel):
>
>     _safedelete_policy = SOFT_DELETE_CASCADE
>     ide = models.AutoField(primary_key=True)
>     bio_ref = models.ForeignKey(BiologicalAssessment,
> verbose_name='Bilans', related_name='examen', on_delete=models.CASCADE)
>     bio_exa_cod = models.CharField("Type d'examen", max_length=3)
>     bio_exa_val = models.FloatField("Résultat de l'examen")
>     bio_exa_uni = models.CharField("Unité", max_length=50)
>     bio_exa_val_inf = models.FloatField("Limite inférieure")
>     bio_exa_val_sup = models.FloatField("Limite supérieure")
> --
> 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
> <mailto:django-users+unsubscribe@googlegroups.com>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/0e88df26-bd24-430d-a432-7094a194183d%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/0e88df26-bd24-430d-a432-7094a194183d%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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/8937dc44-a242-75ab-2e09-7b4fadfc368f%40dewhirst.com.au.

Re: Request to provide the details of how to integrate django app with selenium chrome web driver

What exactly do you want to use celery for?

Using selenium webdriver the regular way should suffice here.
Regarding copying from one field and pasting into another, you might be able to work with .get_text() method in selenium to read text from one field, store it in a variable and then .send_keys() to write that text into another field.

Note: This is a good question for selenium community and you should consider posting it there or on Stack overflow with selenium webdriver tag

On Mon, Sep 30, 2019, 21:29 Dilipkumar Noone <n.dilipk@gmail.com> wrote:


On Monday, September 30, 2019 at 9:22:16 PM UTC+5:30, Dilipkumar Noone wrote:
I am new to Django.

I  have a requirement to develop a django application with the requirement as stated below:

1.Under one tab ,provide a button name "ApplyGSP"
2.click on "ApplyGSP" button should open a form ,which required below input from the user.

   a)model_no b)model_name c)os_version d)requested_time e)user f)from_sas_url g) to_sas_url etc.

3.once the user submitted the FORM with all the fields from step2, your app should open a browser with the user specified URL from f)from_sas_url field in step2.
4.Perform few click operations using selenium webdriver.
   5.copy the list of records from f) to g)

Please provide your suggestion how to perform this task in a better way.

can i use celery application and launch the browser and perform the click operations using selenium webdriver ?
Is there any better way please suggest me.

Regards,
N.Dilip Kumar.   


 

--
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/87eaa9b9-eccb-4f7c-87b3-3a6a2d6ee8b7%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/CAEMqiPc%3D2z5-LZNAKSAmrhOWB%3DV_mJhA2R2%2BzMRzt9CTjs5OOw%40mail.gmail.com.

Re: Request to provide the details of how to integrate django app with selenium chrome web driver



On Monday, September 30, 2019 at 9:22:16 PM UTC+5:30, Dilipkumar Noone wrote:
I am new to Django.

I  have a requirement to develop a django application with the requirement as stated below:

1.Under one tab ,provide a button name "ApplyGSP"
2.click on "ApplyGSP" button should open a form ,which required below input from the user.

   a)model_no b)model_name c)os_version d)requested_time e)user f)from_sas_url g) to_sas_url etc.

3.once the user submitted the FORM with all the fields from step2, your app should open a browser with the user specified URL from f)from_sas_url field in step2.
4.Perform few click operations using selenium webdriver.
   5.copy the list of records from f) to g)

Please provide your suggestion how to perform this task in a better way.

can i use celery application and launch the browser and perform the click operations using selenium webdriver ?
Is there any better way please suggest me.

Regards,
N.Dilip Kumar.   


 

--
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/87eaa9b9-eccb-4f7c-87b3-3a6a2d6ee8b7%40googlegroups.com.

Request to provide the details of how to integrate django app with selenium chrome web driver

I am new to Django.

I  have a requirement to develop a django application with the requirement as stated below:

1.Under one tab ,provide a button name "ApplyGSP"
2.click on "ApplyGSP" button should open a form ,which required below input from the user.

   a)model_no b)model_name c)os_version d)requested_time e)user f)from_sas_url g) to_sas_url etc.

3.once the user submitted the FORM with all the fields from step2, your app should open a browser with the user specified URL from f)from_sas_url field in step2.



 

--
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/486e33ab-3a3d-467c-af57-4e3bed108aec%40googlegroups.com.

Re: Stop executing certain py files or delay in loading python files until Django server is up and runnning

Thanks Deep

On Mon, Sep 30, 2019 at 8:12 PM Deep Sukhwani <deepsukhwani@gmail.com> wrote:
What you are looking for is readiness check. Basically readiness is a concept wherein something reports to be ready to handle requests (this something could be a web server, a docker container, a kubernetes pod, a database, etc.)

You can custom define an API endpoint that returns 200 OK when your Django server is ready to handle the requests, and internally make a request to that API endpoint and only execute your file once the endpoint returns 200 OK.

Alternatively, there are third-party packages (a quick google search revealed django-probes) that might assist you in implementing something similar.

Logically, at a primitive level, your flow would be something along the lines of:
  • Define an API endpoint:
    • This should return a custom response WHILE it is YET to be ready to start taking requests
    • This should return a different custom response WHEN it is ready to start taking requests
  • Once you have the desired "ready" response, you go on invoking the file, until then you keep delaying it by adding a second's sleep or something.
Sample code

  1. import requests
  2.  
  3. """
  4. api_endpoint is the custom endpoint that returns your desired
  5. response based on whether or not Django Server is ready to take
  6. on requests
  7. """
  8. response = requests.get(api_endpoint)
  9.  
  10. while response.status_code != 200:
  11.     time.sleep(1) # Sleep for 1 second
  12.     response = requests.get(api_endpoint)
  13.  
  14. # Once this while loop breaks, this indicates we are good to proceed
  15.  
  16. if response.status_code == 200:
  17.     # Do rest of your job here

Pastebin link to above: https://pastebin.com/G3G41Xmb

--
Regards
Deep L Sukhwani


On Mon, 30 Sep 2019 at 16:12, Sampath Reddy <sampath.nandyala@gmail.com> wrote:
Hey All,

Using DRF for developing backend api end points for the application, I want to run a python module, only when we are sure Django server is up and running As I am calling the api end in that module.

So need to be sure Django server is up and running, before I can call the same server API end point.

Precisely What I am looking for is, how django loads files and starts executing them when I run "python manage.py runserver 0.0.0.0:8084" from command line. I want to delay some files execution if possible.

Any leads are much appreciated.

Thanks,
Sampath

--
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/CAErixQ3%3D_ms9y-RtHa89LMtgFvHBN2sQ32GJ1yef0MCtx7HT%3Dw%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEMqiPc_-kkbZbxiw9Ui7-NDb3kMb9Gv9vryoXh8wJLZkexHeA%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAErixQ2keY_N6CeD2tccq63eMpqKu2wGsVfd%2Bz8qx%3DswaEx-qg%40mail.gmail.com.

Re: Stop executing certain py files or delay in loading python files until Django server is up and runnning

What you are looking for is readiness check. Basically readiness is a concept wherein something reports to be ready to handle requests (this something could be a web server, a docker container, a kubernetes pod, a database, etc.)

You can custom define an API endpoint that returns 200 OK when your Django server is ready to handle the requests, and internally make a request to that API endpoint and only execute your file once the endpoint returns 200 OK.

Alternatively, there are third-party packages (a quick google search revealed django-probes) that might assist you in implementing something similar.

Logically, at a primitive level, your flow would be something along the lines of:
  • Define an API endpoint:
    • This should return a custom response WHILE it is YET to be ready to start taking requests
    • This should return a different custom response WHEN it is ready to start taking requests
  • Once you have the desired "ready" response, you go on invoking the file, until then you keep delaying it by adding a second's sleep or something.
Sample code

  1. import requests
  2.  
  3. """
  4. api_endpoint is the custom endpoint that returns your desired
  5. response based on whether or not Django Server is ready to take
  6. on requests
  7. """
  8. response = requests.get(api_endpoint)
  9.  
  10. while response.status_code != 200:
  11.     time.sleep(1) # Sleep for 1 second
  12.     response = requests.get(api_endpoint)
  13.  
  14. # Once this while loop breaks, this indicates we are good to proceed
  15.  
  16. if response.status_code == 200:
  17.     # Do rest of your job here

Pastebin link to above: https://pastebin.com/G3G41Xmb

--
Regards
Deep L Sukhwani


On Mon, 30 Sep 2019 at 16:12, Sampath Reddy <sampath.nandyala@gmail.com> wrote:
Hey All,

Using DRF for developing backend api end points for the application, I want to run a python module, only when we are sure Django server is up and running As I am calling the api end in that module.

So need to be sure Django server is up and running, before I can call the same server API end point.

Precisely What I am looking for is, how django loads files and starts executing them when I run "python manage.py runserver 0.0.0.0:8084" from command line. I want to delay some files execution if possible.

Any leads are much appreciated.

Thanks,
Sampath

--
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/CAErixQ3%3D_ms9y-RtHa89LMtgFvHBN2sQ32GJ1yef0MCtx7HT%3Dw%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEMqiPc_-kkbZbxiw9Ui7-NDb3kMb9Gv9vryoXh8wJLZkexHeA%40mail.gmail.com.

Re:

Probably a good question for Django CMS community, mind posting it there?


--
Regards
Deep L Sukhwani


On Sat, 28 Sep 2019 at 22:30, Perceval Maturure <drperceval@gmail.com> wrote:
dear team
my django cms is refusing to take in other templates when i select a different template, what could be the problem?

i am on django cms 3.7.0 , django 2.1 and python 3
regards


--
Perceval Maturure
083 303 9423

--
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/CAFZtZmCJzJOfCfOGNm%2B3bep%3DaiJxep%2BgfXC8Yg_5tYmifnXG_A%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEMqiPdaVGyOrkNRCpkqMDz7Cy%3Dp6RNv%3Dx0b_u6VSGMPRfXhLA%40mail.gmail.com.

Re: Django FastCGI and static files

At the end of every email, the instructions are clearly mentioned - Here it is:

To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.

Hope this helps.

--
Regards
Deep L Sukhwani


On Sat, 28 Sep 2019 at 22:17, Sipum <sipum14@gmail.com> wrote:
Block or mark as spam.
I think it will work. Give it a try

On Sat, 28 Sep, 2019, 7:30 PM Anike Sadia, <anikesadia01@gmail.com> wrote:
Hi pls how to leave this group 


On Tue, 17 Sep 2019 at 17:16, Martin Jaan Leesment <martinjaan11@gmail.com> wrote:
Hey

I'm new to serving Django website on a shared server as well as using fastcgi and .htaccess so this might be a basic question. Namely I'm having difficulties serving static content. I've tried playing with htaccess rules, but no luck yet. My project structure:

myproject/
├── myapp
│   ├── admin.py
│   ├── apps.py
│   ├── models.py
│   ├── static
│   │   └── myapp
│   │       ├── css
│   │       │   ├── bootstrap.min.css
│   │       │   ├── bootstrap.min.min_myproject.css
│   │       │   └── proj.css
│   │       ├── fonts
│   │       ├── images
│   │       │   ├── logo.png
│   │       └── scripts
│   │           ├── bootstrap.bundle.min.js
│   │           └── bootstrap.min.js
│   ├── templates
│   │   └── myapp
│   │       ├── base.html
│   │       ├── footer.html
│   │       ├── header.html
│   │       ├── index.html
│   ├── tests.py
│   ├── urls.py
│   └── views.py
├── manage.py
├── myproject
│   ├── __init__.py
│   ├── locale
│   ├── media
│   ├── settings
│   │   ├── base.py
│   │   ├── dev.py
│   │   ├── __init__.py
│   │   ├── prod.py
│   ├── static
│   ├── templates
│   │   └── base.html
│   ├── urls.py
│   └── wsgi.py
├── requirements
└── test.py

My htaccess

Options +ExecCGI
AddHandler fcgid-script .fcgi
RewriteEngine On
RewriteRule ^(/static.*)$ /static//$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ cgi-bin/mydjangapp.fcgi/$1 [QSA,L]


If anybody can help me figure out how to solve it, would really appreciate.

Thanks!

Best
MJ

--
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/80c1e98b-8a0a-482c-a20f-29b4c7afdcab%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/CADi3MtsqOtuN%2BEuArMCZSJBuW-AYgvqDkDU4RsP3Y%2BF62SC_bQ%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAGHZBzzeObUv0vLdoU4arPb8iYz1pGYSKEUSopC7nX7Fz_YAcw%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAEMqiPfvh%3DNpye%2BsV2-zfjJgYhCzh5%3Dii_GQd%2Bt3sEu9NPkm3Q%40mail.gmail.com.

Problem with safedelete implementation

Hi

I am new on this forum and very, very new user of Django so hope you will be uncensorious

I need to implement the safedelete application (https://buildmedia.readthedocs.org/media/pdf/django-safedelete/latest/django-safedelete.pdf) for my project but I should have miss something in the documentation because I did non manage tu use it correctly

I will expose you briefly my problem
I have 2 classes BiologyAssessment and BiologyExam linked with a foreignKey: a biologicalassessment is linked with multiple biologicalexam

When I delete a biologicalassessment, I want related biologicalexamn to be 'delete' (but soft delete)
When I delete a biologicalexam, I want biologicalexam to be delete (soft delete)

I have implemented in my project but unfortunetly, when I delete a biologicalexam, the linked biologicalasessment is also delete
I have try different to use _safedelete_policy = SOFT_DELETE for my BiologicalExam class but it does not chage anything

could you help me ?

models.py

class BiologicalAssessment(SafeDeleteModel):

    _safedelete_policy = SOFT_DELETE_CASCADE
    ide = models.AutoField(primary_key=True)
    vis_ref = models.ForeignKey(Visite, verbose_name='Visite', related_name='bilan', on_delete=models.CASCADE)
    bio_prv_dat = models.DateField("Date de prélèvement")

class BiologicalExam(SafeDeleteModel):

    _safedelete_policy = SOFT_DELETE_CASCADE
    ide = models.AutoField(primary_key=True)
    bio_ref = models.ForeignKey(BiologicalAssessment, verbose_name='Bilans', related_name='examen', on_delete=models.CASCADE)
    bio_exa_cod = models.CharField("Type d'examen", max_length=3)
    bio_exa_val = models.FloatField("Résultat de l'examen")
    bio_exa_uni = models.CharField("Unité", max_length=50)
    bio_exa_val_inf = models.FloatField("Limite inférieure")
    bio_exa_val_sup = models.FloatField("Limite supérieure")

--
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/0e88df26-bd24-430d-a432-7094a194183d%40googlegroups.com.

Re: Django Register form

Hi Odii,

On 30/09/2019 14.37, ODII DANIEL wrote:
> Thank you for this opportunity. I have a website that I want to add user
> dashboard to but i don't know how to go about it. please help me I've in
> stall Django but I don't know how to use it.
>

Have you followed the official Django tutorial here?:

https://docs.djangoproject.com/en/2.2/intro/

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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0f93dd27-0bf7-0c42-cd79-f1067c40d5b4%40stacktrace.dk.

Re: Django Register form

Thank you for this opportunity. I have a website that I want to add user dashboard to but i don't know how to go about it. please help me I've in stall Django but I don't know how to use it.

On Sun, Sep 29, 2019 at 10:22 AM Abu Yusuf <yusuf@binate-solutions.com> wrote:
What's the Issue?



photo
Abu Yusuf
Jr. Software Engineer at  Binate Solutions Ltd.
Dhaka, Bangladesh
01828689381 
revelyusuf109@gmail.com 
https://yusuff.dev 
Linkedin https://www.linkedin.com/in/yusuf-dev/
live:9151cfda40e05eef

On Thu, Sep 26, 2019 at 4:51 PM ODII DANIEL <odiidaniel5@gmail.com> wrote:
Please I'm having issues integrating Django into my website

--
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/9355ce4e-6466-4f7d-b3f5-23c2ed276658%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/CACNsr297-fZ6WTgmJ8Vu3HKE%3DkbT5MLiE06cgAjJUDGh4NMcKA%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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAAVwfF%3DJMxqsTT9dhWEzzN5tz%3Dj9Kg%2BNakMBRa-T9Kyti8KUvA%40mail.gmail.com.