Jump to content

albertoc

Members
  • Posts

    12
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

albertoc's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. 0.0.0.0/32 is a reserved IPv4 address: it allows a server listening on it to listen to all the interfaces available on the local machine. It's a little broader than 127.0.0.1 If you try to launch a "normal" python manage.py runserver, you can only browse the app on localhost or on 127.0.0.1, but you cannot visit it from any other address of the class 127.0.0.0/32. And I think it's useful even if you want to make others (on your same network) to browse your app (obviously you need to open the port 8000 though). With localhost you can't. You can change it if you prefer.
  2. Done: http://wiki.helionet.org/Django#Getting_started_with_Django_1.10 check it out, any feedback is appreciated!
  3. You guys rock! :) many thanks for all the help you gave me. I registered an account on the wiki, with username albertoc. Can you activate it, so I can write down the tutorial for the installation of a django app?
  4. I solved the problem relative to sqlite: by using curl and performing a request to the server, I saw the error: the solution is to set the permission to 770 (allowing writing to the users of my same group) to the parent folder containing the db.sqlite3 file (in my case is public_html/): http://stackoverflow.com/questions/7670289/sqlite3-operationalerror-unable-to-open-database-file/7670618#7670618 Another problem I have now is that I'm using a small python package in my project: https://github.com/Stranger6667/postmarker it's a python package that sends requests to Postmark that afterwards sends emails (according to some conditions inside my application). This package doesn't spam, since it's just a wrapper that sends requests to a third-party service, so it doesn't use tommy's IP address to send email. Could you be so kind to install it on tommy?
  5. Hi guys! I'm still trying to fully setup the website on Tommy, but I'm facing some issues.. When I run the django server locally on my computer at home and I execute some operations (POST requests from IoT devices) they are satisfied and I can see the records being added to the server. When I make the devices perform POST requests at my django app on heliohost, I cannot see any change. This made me think that it could have been a permissions problem on the sqlite Database, since I can make django read some test data from it ( http://sest.gq/1/ ) but I cannot make it write to it, and the view showing the channel/feed stays empty ( http://sest.gq/2/ ). I changed the permissions on the db.sqlite3 file to 777, but nothing changed. So I'm asking if there's any way to debug a django app on heliohost, which is not working only there, and without having access to the django logs (so I cannot insert print statements neither, while it's working on POST requests from my devices). Any hint? An other attempt would be to setup a proper DB engine, like postgresql, to work with my app.
  6. Hi Krydos! I'll definitely write a tutorial, I love helping other users and I have some experience with wikis :-) I'll do it in a couple of days, since I'm quite busy with my thesis. Thanks again!
  7. Wow Krydos, what a detailed tutorial! Again, many thanks for your work: now django is running as a charm on sest.gq :D Thanks again guys for the patience and the time you spend on this community :-)
  8. Many thanks Krydos for the time you are spending on my issue! There was an error in the second import in my settings.py file, because I was importing the file with the passwords with the dot notation in front, because I didn't place an empty __init__.to mark the folder as a package) as you did. So now there's still an error, but at least is a django error and not a meaningless 500 internal server error as before. Now the error is related to django, and in particular it states that it's not able to find the sqlite3 db file anymore: another error thrown was because it wasn't able to locate the template folder. This happens because we moved the settings.py, urls.py and the dispatch.wsgi files out from the "website settings" folder (called weather_station_website) to the root (/home/albertoc/public_html/) folder. This also means that the whole structure is now completely messed up , because django expects the config files to be in a separate folder, as specified in the manage.py file (link): weather_station_website.settings Is there a way to leave the setting and config files in the "settings" folder, and forward the requests to that setting files? something like: a request is sent to sest.gq/url /url gets processed by public_html/.htaccess public_html/.htaccess forwards this to public_html/dispatch.wsgi (or public_html/weather_station_website/dispatch.wsgi) inside public_html/dispatch.wsgi (or public_html/weather_station_website/dispatch.wsgi) sys.path is set to public_html/ (or public_html/weather_station_website/) the dispatch file starts up the normal django execution flow.and the files should be organized as follows: public_html/ |-- sest/ # app files |-- weather_station_website/ |-- __init__.py |-- settings.py |-- urls.py |-- dispatch.wsgi # here, or maybe inside the settings folder, weather_station_website/ .. ? |-- .htaccess (in the preceding paragraphs with public_html/ I mean the public_html folder of my account, located at /home/albertoc/public_html/) could this arrangement be possible (which is the "normal" layout that is set up when a new project is created with $ django-admin startproject mysite) ? otherwise I should deeply mess up with the django settings files in order to force the reading from the public_html/ folder.
  9. @byron You were right, I was pointing the wrong path in the dispatch.wsgi file, but then I changed it, as you can see in the pastebin (in the tree list in my last post). @krydos In the .htaccess ( http://pastebin.com/raw/WvqS8YNM ) I'm redirecting all the traffic to /weather_station_website/dispatch.wsgi (which is RewriteBase + the last regex that greps everything). Is it wrong? Why doesn't it still work? Many thanks
  10. Hi Byron! I changed the line in the dispatch.wsgi with my username, and djangotest is now working as Krydos' one. Now I'm trying to adapt it to my project ( https://github.com/bebosudo/sest ): my project has a folder weather_station_website, which manages django settings and configs, and an app called sest in its relative folder sest/, which contains the actual project data. I'd like to set up the server so that when I access sest.gq I'm actually being redirected by the django "router" weather_station_website/urls.py. My folder tree is now: /home/albertoc/public_html/ |-- djangotest/ |-- ... |-- media/ # an empty folder to test the .htaccess rules |-- sest/ # app data: they are the same present on github |-- weather_station_website/ |-- dispatch.wsgi |-- settings.py |-- urls.py (and other django files) |-- .htaccess |-- _index.html # a html testing file, now it can't be seen due to the htaccess rules The htaccess file seems to work, since I cannot see the _index.html file (but the djangotest/ folder is curiously still accessible). Still when I point to sest.gq I get a 500 error.
  11. Hi Krydos, thanks for your work. I'm still having troubles setting up django on my account: I set up both settings.py and dispatch.wsgi as you said (dispatch.wsgi: http://pastebin.com/HbiTwDWN , settings.py: http://pastebin.com/kd3Khpdz). sest.gq/djangotest/ doesn't work, returning a 500 internal server error. but also a simple /index.html file with an hello world doesn't work, with the same 500 error message. are there problems on tommy? or could the problem be that I'm using an external domain?
  12. Hi guys, thanks for your great work! I'd like to ask you whether there's a chance to have django on tommy, or on any other server. (I followed the instructions in the wiki to get django working, and then I discovered that isn't supported on tommy) account: albertoc site: sest.gq Cheers!
×
×
  • Create New...