Jump to content

Recommended Posts

Posted

While trying python + Django, I kind of think that krydos might be using more than one folder level configurations.

 

for example.

 

http://krydos.heliohost.org/ ---> don't know which technology he is using.

 

https://krydos.heliohost.org/djangotest/ ---> Django

 

https://krydos.heliohost.org/cgi-bin/modules36.py ---> cgi (I don't know what is that and how to do)

 

 

so I tried from the tutorial in django wik (and edited it) and come to know that I can configure more than one django projects on heliohost.

 

I it ok to do that for normal user?

 

I have no plans to have thousands but one for root level and couple inside.

Posted

It's just a bunch of folders inside public_html. You can put as many projects as you wish on your account, just put the entire thing inside its own folder instead of directly in public_html.

  • Like 1
Posted

http://krydos.heliohost.org/ ---> don't know which technology he is using.

HTML with the word 'Blank.' in index.html.

 

Yep.

 

https://krydos.heliohost.org/cgi-bin/modules36.py ---> cgi (I don't know what is that and how to do)

CGI is really easy. Here's a simple example:

#!/usr/bin/python3.6
print("Content-Type: text/html\n\n")
print("HelioHost rules!")
The first line says which language the rest of the code is written in. The second line sets the headers so a browser can understand the data that is being sent. The third line is just a simple print comnmand, but since this is cgi the output goes to a browser instead of the command line.

 

If you're curious here's the actual code for https://krydos.heliohost.org/cgi-bin/modules36.py

#!/usr/bin/python3.6

print("Content-Type: text/html\n\n")

import pip
installed_packages = pip.get_installed_distributions()
installed_packages_list = sorted(["<td>%s</td><td>%s</td>" % (i.key, i.version) for i in installed_packages])
print("Tommy /usr/bin/python3.6 installed modules:<br><br>")
print("<table><tr><th align='left'>Module</th><th align='left'>Version</th></tr>")
print("</tr><tr>".join(installed_packages_list))
print("</tr></table>")
It just shows all of the modules that have been installed with pip. It doesn't show the default modules that came with python though.
  • Like 1
Posted (edited)

https://krydos.heliohost.org/cgi-bin/modules36.py ---> cgi (I don't know what is that and how to do)

CGI is really easy. Here's a simple example:

#!/usr/bin/python3.6
print("Content-Type: text/html\n\n")
print("HelioHost rules!")

 

 

Is there any server configuration required? I made demo.py in cgi-bin but it says internal server error while visiting patents.heliohost.org/cgi-bin/demo.py.

Edited by patents
Posted

Your file has dos line endings. It's running on linux so it needs linux line endings. The easiest way to do this is to go to file manager in cpanel, create a new file, and copy/paste the code in. The default settings in file manager will work on linux. Another option is you could download an editor like notepad++ that is capable of writing files with the proper line endings.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...