#20576 closed Uncategorized (invalid)

Adding a script to django view

Reported by: alex.szilagyi@… Owned by: nobody
Component: Generic views Version: 1.4
Severity: Normal Keywords: django, raspberrypi, rpi.gpio
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

While trying to find a workaround for my this issue I want to know if you're aware of this.

The steps that I've proceed were:

  1. Installed django 1.4.5
  2. Created a project
  3. Created an app
  4. Specified an class which uses RPi.GPIO - https://dpaste.de/qWLad/
  5. Trying to use it in django gives me this error - https://dpaste.de/BvmyF/ and http://severo.ro/RaspberryPi/ModuleNotImportedCorrectly.png

Note: Views.py file - https://dpaste.de/eGKZ4/ and https://dpaste.de/ezeof/ - urls.py

Thank you!

Change History (1)

comment:1 Changed 23 months ago by bmispelon

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

Hi,

The error does not seem to be coming from django (see the last two lines of the traceback you posted), so I'm marking this as invalid.

Also note that the file you posted (the one called alarm.py I think) looks very wrong.
For one, putting print statements and while loops in a class declaration is technically correct but it's not going to do what you want.

I humbly suggest that you get more familiar with the python language.
The official tutorial [1] is a good introduction and should help you get a better grasp on how python works.
If you need more help with python, check the help page on the official site [2].

[1] http://docs.python.org/2/tutorial/index.html
[2] http://python.org/about/help/

Note: See TracTickets for help on using tickets.
Back to Top