remove import check for django in setup (#27)

unneeded now since the agent imports and sets up Django as part of it's
initial serving
This commit is contained in:
Josh Thomas 2024-12-12 20:03:48 -06:00 committed by GitHub
parent 9bbc2c2c3a
commit b13d19a4bf
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 21 additions and 104 deletions

View file

@ -1,7 +1,7 @@
use crate::gis::{check_gis_setup, GISError};
use djls_ipc::v1::*;
use djls_ipc::{ProcessError, PythonProcess, TransportError};
use djls_python::{ImportCheck, Python};
use djls_python::Python;
use std::fmt;
#[derive(Debug)]
@ -23,12 +23,6 @@ impl DjangoProject {
pub fn setup(mut python: PythonProcess) -> Result<Self, ProjectError> {
let py = Python::setup(&mut python)?;
let has_django = ImportCheck::check(&mut python, Some(vec!["django".to_string()]))?;
if !has_django {
return Err(ProjectError::DjangoNotFound);
}
if !check_gis_setup(&mut python)? {
eprintln!("Warning: GeoDjango detected but GDAL is not available.");
eprintln!("Django initialization will be skipped. Some features may be limited.");