AA-2975: Bring Django project up and running

Review Request #937 — Created June 24, 2025 and submitted

apoorva.sn
AMP
amp_4_0
AA-2975
ngurunathan, pmurugaiyan, pradeep, shuinvy

Problem

Running AMP Django project was failing with error. Need to fix the errors to make it up and running.

Solution

Have installed dependencies and fixed issues to make the Django project up and running

Django project is running

[root@localhost src]# python3.13 manage.py runserver 0.0.0.0:8000
Initializing whoosh indexes...
Initializing whoosh indexes...
Performing system checks...

System check identified no issues (0 silenced).
June 24, 2025 - 04:46:42
Django version 5.2.1, using settings 'djproject.settings'
Starting development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

Curl for login is successfull

[root@AN admin]# curl -v 'http://127.0.0.1:8000/login_app' -H 'Accept: application/json, text/plain, /' -H 'Accept-Language: en-GB,en;q=0.9' -H 'Connection: keep-alive' -H 'Content-Type: application/x-www-form-urlencoded;charset=UTF-8' -H 'Origin: http://127.0.0.1:8000' -H 'Referer: http://127.0.0.1:8000/app/' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36' -H 'sec-ch-ua: "Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"' -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "macOS"' --data 'username=admin&password=admin' --insecure * Trying 127.0.0.1:8000... * Connected to 127.0.0.1 (127.0.0.1) port 8000 (#0)

POST /login_app HTTP/1.1
Host: 127.0.0.1:8000
Accept: application/json, text/plain, /
Accept-Language: en-GB,en;q=0.9
Connection: keep-alive
Content-Type: application/x-www-form-urlencoded;charset=UTF-8
Origin: http://127.0.0.1:8000
Referer: http://127.0.0.1:8000/app/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: same-origin
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/137.0.0.0 Safari/537.36
sec-ch-ua: "Google Chrome";v="137", "Chromium";v="137", "Not/A)Brand";v="24"
sec-ch-ua-mobile: ?0
sec-ch-ua-platform: "macOS"
Content-Length: 29

  • Mark bundle as not supporting multiuse
    < HTTP/1.1 200 OK
    < Date: Wed, 25 Jun 2025 05:40:45 GMT
    < Server: WSGIServer/0.2 CPython/3.13.0
    < Content-Type: application/json
    < Vary: Accept-Language
    < Content-Language: en-gb
    < X-Frame-Options: DENY
    < Content-Length: 29
    < Set-Cookie: django_language=en; Path=/; Secure
    < Set-Cookie: hive_sess=33c6a863-2b8f-4c6a-9e7d-7fc7e5f9bf27; Path=/; Secure
    <
  • Connection #0 to host 127.0.0.1 left intact
Description From Last Updated

remove this.

pmurugaiyanpmurugaiyan

Are we able to download the whl files for the newly added packages, please add the whl files also to …

pmurugaiyanpmurugaiyan

I could see .tar.gz files, how we are going to use that!

pmurugaiyanpmurugaiyan

why no-deps!, the earlier one downloads the dependency packages also which is crucial.

pmurugaiyanpmurugaiyan

platform/dependencies/python/requirements.txt Can you use this requirements.txt instead of the on under tools.

pmurugaiyanpmurugaiyan
pmurugaiyan
  1. 
      
  2. branches/amp_4_0/tools/requirements.txt (Diff revision 1)
     
     

    Are we able to download the whl files for the newly added packages, please add the whl files also to the repo.

    platform/dependencies/python/requirements.txt

    follow these steps to checkin the offline dependency packages.

    platform/dependencies/python/README.md

  3. 
      
apoorva.sn
apoorva.sn
pmurugaiyan
  1. 
      
  2. I could see .tar.gz files, how we are going to use that!

    1. For some of the files we dint get the .whl files and the command that I used was downloading the tar.gz files.. but as discussed I have removed this file and we can check if AMP works file without these dependencies

  3. why no-deps!, the earlier one downloads the dependency packages also which is crucial.

  4. 
      
apoorva.sn
pmurugaiyan
  1. 
      
  2. branches/amp_4_0/tools/requirements.txt (Diff revision 4)
     
     

    platform/dependencies/python/requirements.txt

    Can you use this requirements.txt instead of the on under tools.

  3. 
      
apoorva.sn
shuinvy
  1. Ship It!
  2. 
      
ngurunathan
  1. Ship It!
  2. 
      
apoorva.sn
Review request changed

Status: Closed (submitted)

Loading...