turnkeylinux / tracker

TurnKey Linux Tracker
https://www.turnkeylinux.org
71 stars 16 forks source link

When I go into the Django Administration page, I get... #182

Closed jdcrunchman closed 10 years ago

jdcrunchman commented 10 years ago

"The server encountered an internal error or misconfiguration and was unable to complete your request"

So, I checked the "File /var/log/apache2/error.log" and here are the last few lines of What I get. And yet, yesterday, I was able to get into it just fine.

By the way, I did find the earlier issue of why I couldn't do "synchdb", it turned out there was a hidden obscure place, not very well

[Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] Traceback (most recent call last): [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line 241, in call [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] response = self.get_response(request) [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 153, in get_response [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] response = self.handle_uncaught_exception(request, resolver, sys.exc_info()) [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line 228, in handle_uncaught_exception [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] return callback(request, _param_dict) [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/utils/decorators.py", line 91, in _wrapped_view [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] response = view_func(request, args, *_kwargs) [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/views/defaults.py", line 32, in server_error [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] t = loader.get_template(template_name) # You need to create a 500.html template. [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 145, in get_template [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] template, origin = find_template(template_name) [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 138, in find_template [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] raise TemplateDoesNotExist(name) [Thu Apr 03 02:06:34 2014] [error] [client 72.193.188.252] TemplateDoesNotExist: 500.html

But earlier, I created a test project, and before, it worked just fine. I think I found yet another bug.

l-arnold commented 10 years ago

I haven't used Django but this looks like an issue either in Django package or perhaps a different Template has been selected. Were you working w/ your templates? You said it worked yesterday. What may have changed?

I would recomend testing a fresh install and logging into Admin to see if the error persists. If so definitely it is a bug. If it is a template like I am used to wrestling with in Joomla it may not specifically be a Turnkeylinux bug but rather an issue within Django.

jdcrunchman commented 10 years ago

Sent from my iPad

On Apr 2, 2014, at 7:40 PM, "L. Arnold" notifications@github.com wrote:

I haven't used Django but this looks like an issue either in Django package or perhaps a different Template has been selected. Were you working w/ your templates?

No, I never touched them. I was able to get into the Administration page yesterday and last night. I followed some of the forums, and other people had that same problem. Morton Thompson posted this problem on 2012/02/27

You said it worked yesterday. What may have changed?

I only did these things... I changed the database password to my "tracker" project database. I would recomend testing a fresh install and logging into Admin to see if the error persists.

I have no means of doing a fresh install. Only my friend Adam can do that, and he's too busy, and it took us 3 hours to do a fresh install. If so definitely it is a bug. If it is a template like I am used to wrestling with in Joomla it may not specifically be a Turnkeylinux bug but rather an issue within Django.

I also posted this to the Django forum, but this is a turnkey issue.

John

— Reply to this email directly or view it on GitHub.

jdcrunchman commented 10 years ago

On Apr 2, 2014, at 7:40 PM, "L. Arnold" notifications@github.com wrote:

I haven't used Django but this looks like an issue either in Django package or perhaps a different Template has been selected. Were you working w/ your templates? You said it worked yesterday. What may have changed?

I did the following...

Django-admin startproject tracker Python manage.py synchdb - this time it worked. Python manage.py startapp trackerApp

Do you think it might be a name conflict? I can send you the entire trace back dump... It's pretty long.

You can also go to...

http://django.webcrunchers.com

It takes you to Turnkey Django page, where you get the 3 icons... Administration - Web Shell - Webmin

I can get into WebMin just fine, but my WebShell won't work until I can figure Out how to build it.

I would recomend testing a fresh install and logging into Admin to see if the error persists. If so definitely it is a bug. If it is a template like I am used to wrestling with in Joomla it may not specifically be a Turnkeylinux bug but rather an issue within Django.

I only hope I can get someone who knows this stuff to do a screen sharing session with my on Fuze, but that is too much to hope for... Anyway, it's been 8 days of struggling, moving 1 step forward, and 5 steps backward. But a lot of my time, is taken with documenting the problems..

John

— Reply to this email directly or view it on GitHub.

l-arnold commented 10 years ago

I will respond on the forums.  Will do a test install.  I expect ot to work but lets see.

Landis

Sent from Nine

From: jdcrunchman notifications@github.com Sent: Apr 2, 2014 10:26 PM To: turnkeylinux/tracker Cc: L. Arnold Subject: Re: [tracker] When I go into the Django Administration page, I get... (#182)

On Apr 2, 2014, at 7:40 PM, "L. Arnold" notifications@github.com wrote:

I haven't used Django but this looks like an issue either in Django package or perhaps a different Template has been selected. Were you working w/ your templates? You said it worked yesterday. What may have changed?

I did the following...

Django-admin startproject tracker Python manage.py synchdb - this time it worked. Python manage.py startapp trackerApp

Do you think it might be a name conflict? I can send you the entire trace back dump... It's pretty long.

You can also go to...

http://django.webcrunchers.com

It takes you to Turnkey Django page, where you get the 3 icons... Administration - Web Shell - Webmin

I can get into WebMin just fine, but my WebShell won't work until I can figure Out how to build it.

I would recomend testing a fresh install and logging into Admin to see if the error persists. If so definitely it is a bug. If it is a template like I am used to wrestling with in Joomla it may not specifically be a Turnkeylinux bug but rather an issue within Django.

I only hope I can get someone who knows this stuff to do a screen sharing session with my on Fuze, but that is too much to hope for... Anyway, it's been 8 days of struggling, moving 1 step forward, and 5 steps backward. But a lot of my time, is taken with documenting the problems..

John

— Reply to this email directly or view it on GitHub.


Reply to this email directly or view it on GitHub: https://github.com/turnkeylinux/tracker/issues/182#issuecomment-39411681

alonswartz commented 10 years ago

I replied to John via email, but I thought it would be beneficial to include some of the info here...

<snip>

Anyway, seeing the back and forth you've had on github and this email
thread I thought I'd try and give you an overview to TurnKey Django, and
Django specifically, in an attempt to clear things up and get you going.

Django
------

Django is an amazing piece of software. It makes developing web
applications that much easier, by providing several layers of
abstraction, tools and apps to build upon.

I think the main issue you've been having is due to old-school habits,
for example, creating database tables. Once of Django's core strengths
is its ORM (Object Relational Mapper). You aren't meant to manually
create database tables and schemas, thats what the ORM / syncdb is for.

For example, you create a models.py file your app:

    class Article(models.Model):
        pub_date = models.DateTimeField()
        headline = models.CharField(max_length=200)
        content = models.TextField()

Then you run syncdb which will create the table and schema:

    ./manage.py syncdb

Another issue I noticed is that you were using the runserver command,
and tried connecting to http://127.0.0.1:8000 but said that it wasn't
working.

I guess thats what the tutorial told you to do, but what it probably
didn't mention (or you missed it), is that runserver is for development,
and that 127.0.0.1 is localhost - assuming that you're developing on
your local machine.

TurnKey Django
--------------

Turnkey Django is designed and configured out of the box for production,
although it does support development. But, the default configuration is
for production.

What I mean by this, is that the default production configuration is
that a real webserver (apache) is used, which is configured to use your
projects wsgi configuration, which passes requests to your django app,
which in turn is configured for production using a real database
(mysql).

You'll notice that /var/www/project has a settings.py file, which is
used for production. It also has a settings_dev.py which is used for
development - overriding the database configuration of mysql to use
sqlite instead.

The development settings will only take effect if DEVELOPMENT is set in
the environment.

The usual way to develop django applications, is to use the development
web server and sqlite, for example:

DEVELOPMENT=y ./manage.py runserver [ip:port]

Though this is not required, it makes it a lot easier to develop, as the
webserver doesn't need to be restarted for changes to take effect, and
you can easily change the database schema (in production, you usually
need to use a database migration assistant, eg. django-south).

Bottom line
-----------

I'd recommend using /var/www/project as a starting point, and
customizing it accordingly for your needs. By creating your own django
project and database throws out the carefully crafted implementation we
have done for a working django server. You're basically reimplementing a
lot of the work we've already done - hitting issues that Turnkey was
designed to solve out of the box.

I agree that we could do a better job with documentation, but I think
the main stumbling block is just a lack of experience developing with
Django.

</snip>
jdcrunchman commented 10 years ago

Yes, somewhere in the TurnKey Django page, isn't there some additional docs Related to Turnkey? I most have missed seeing it, because I didn't know I was not Supposed to change the "django" user password, Obviously, I fucked up big time, Because I didn't see it. I have NEVER been able to get ANY system up and running Without hand holding help. We really need to have more video tutorials for these Things... More and more people are doing that, like Apple, Adobe, and other closed Source companies, but where can I find a video tutorial showing how to deploy a Turnkey Django system... In videos, I can stop it and start it as needed until I learn it.

So, can you give me direct link to some README file, or where this important release Notes are located.... I have very poor ability to notice things, and items can stare me In the face, and I just won't see it. In 2011, I suffered from parylisis due to trauma in My neck, which really fucked up my nerves, and had neck surgery, ever since that Time, I lost a lot of these skills, and in theory, that ended my programming career.

Once I learned of the existence of Turnkey Django, I jumped on this opportunity to Hopefully build my own system. But (sigh) my stupidity reigns yet again, and I can't Even do it with Turnkey. But I'm given a chance to start over, and this time, I hope To acquire and read those docs I missed reading. Of course, my read speed is About 1/10th of normal, and I need step by step instructions, something like a video Would be ideal, because back in 2008 when I first started using Django, there was very Little video.

John

Sent from my iPad

On Apr 4, 2014, at 2:02 AM, Alon Swartz notifications@github.com wrote:

I replied to John via email, but I thought it would be beneficial to include some of the info here...

Anyway, seeing the back and forth you've had on github and this email thread I thought I'd try and give you an overview to TurnKey Django, and Django specifically, in an attempt to clear things up and get you going. ## Django Django is an amazing piece of software. It makes developing web applications that much easier, by providing several layers of abstraction, tools and apps to build upon. I think the main issue you've been having is due to old-school habits, for example, creating database tables. Once of Django's core strengths is its ORM (Object Relational Mapper). You aren't meant to manually create database tables and schemas, thats what the ORM / syncdb is for. For example, you create a models.py file your app: ``` class Article(models.Model): pub_date = models.DateTimeField() headline = models.CharField(max_length=200) content = models.TextField() ``` Then you run syncdb which will create the table and schema: ``` ./manage.py syncdb ``` Another issue I noticed is that you were using the runserver command, and tried connecting to http://127.0.0.1:8000 but said that it wasn't working. I guess thats what the tutorial told you to do, but what it probably didn't mention (or you missed it), is that runserver is for development, and that 127.0.0.1 is localhost - assuming that you're developing on your local machine. ## TurnKey Django Turnkey Django is designed and configured out of the box for production, although it does support development. But, the default configuration is for production. What I mean by this, is that the default production configuration is that a real webserver (apache) is used, which is configured to use your projects wsgi configuration, which passes requests to your django app, which in turn is configured for production using a real database (mysql). You'll notice that /var/www/project has a settings.py file, which is used for production. It also has a settings_dev.py which is used for development - overriding the database configuration of mysql to use sqlite instead. The development settings will only take effect if DEVELOPMENT is set in the environment. The usual way to develop django applications, is to use the development web server and sqlite, for example: DEVELOPMENT=y ./manage.py runserver [ip:port] Though this is not required, it makes it a lot easier to develop, as the webserver doesn't need to be restarted for changes to take effect, and you can easily change the database schema (in production, you usually need to use a database migration assistant, eg. django-south). ## Bottom line I'd recommend using /var/www/project as a starting point, and customizing it accordingly for your needs. By creating your own django project and database throws out the carefully crafted implementation we have done for a working django server. You're basically reimplementing a lot of the work we've already done - hitting issues that Turnkey was designed to solve out of the box. I agree that we could do a better job with documentation, but I think the main stumbling block is just a lack of experience developing with Django.

— Reply to this email directly or view it on GitHub.

jdcrunchman commented 10 years ago

Where can I read the docs on the Administration page?

Sent from my iPad

On Apr 4, 2014, at 2:02 AM, Alon Swartz notifications@github.com wrote:

I replied to John via email, but I thought it would be beneficial to include some of the info here...

Anyway, seeing the back and forth you've had on github and this email thread I thought I'd try and give you an overview to TurnKey Django, and Django specifically, in an attempt to clear things up and get you going. ## Django Django is an amazing piece of software. It makes developing web applications that much easier, by providing several layers of abstraction, tools and apps to build upon. I think the main issue you've been having is due to old-school habits, for example, creating database tables. Once of Django's core strengths is its ORM (Object Relational Mapper). You aren't meant to manually create database tables and schemas, thats what the ORM / syncdb is for. For example, you create a models.py file your app: ``` class Article(models.Model): pub_date = models.DateTimeField() headline = models.CharField(max_length=200) content = models.TextField() ``` Then you run syncdb which will create the table and schema: ``` ./manage.py syncdb ``` Another issue I noticed is that you were using the runserver command, and tried connecting to http://127.0.0.1:8000 but said that it wasn't working. I guess thats what the tutorial told you to do, but what it probably didn't mention (or you missed it), is that runserver is for development, and that 127.0.0.1 is localhost - assuming that you're developing on your local machine. ## TurnKey Django Turnkey Django is designed and configured out of the box for production, although it does support development. But, the default configuration is for production. What I mean by this, is that the default production configuration is that a real webserver (apache) is used, which is configured to use your projects wsgi configuration, which passes requests to your django app, which in turn is configured for production using a real database (mysql). You'll notice that /var/www/project has a settings.py file, which is used for production. It also has a settings_dev.py which is used for development - overriding the database configuration of mysql to use sqlite instead. The development settings will only take effect if DEVELOPMENT is set in the environment. The usual way to develop django applications, is to use the development web server and sqlite, for example: DEVELOPMENT=y ./manage.py runserver [ip:port] Though this is not required, it makes it a lot easier to develop, as the webserver doesn't need to be restarted for changes to take effect, and you can easily change the database schema (in production, you usually need to use a database migration assistant, eg. django-south). ## Bottom line I'd recommend using /var/www/project as a starting point, and customizing it accordingly for your needs. By creating your own django project and database throws out the carefully crafted implementation we have done for a working django server. You're basically reimplementing a lot of the work we've already done - hitting issues that Turnkey was designed to solve out of the box. I agree that we could do a better job with documentation, but I think the main stumbling block is just a lack of experience developing with Django.

— Reply to this email directly or view it on GitHub.

jdcrunchman commented 10 years ago

I noticed some rather odd things... It wasn't until recently when I started to take a Look at the sample program in /var/www - and strange that the settings.py actually Had been edited and reflects the settings.py file that I had edited, so there must Be some script that edited it, Or took my information from a project I setup, and Now it has the exact same thing in my settings file, so I suspect that when the project Was built, some template file was used to create this settings.py file, but I just cannot Find the source of these templates.

I also noticed that this example is pretty lame, in that it doesn't even have a sample Site that actually uses the models.py file, thus depriving me of an example on how To use it. IMHO, a much better sample program should be built and included in the Turnkey showing how to use (and access) models. Sure, people can find examples On the web, but how can a very novice user know it would work because of version Clashes. Let's fix this in the next release.

Anyway, we are meeting online now to talk about this with our group.

John

Sent from my iPad

On Apr 4, 2014, at 2:02 AM, Alon Swartz notifications@github.com wrote:

I replied to John via email, but I thought it would be beneficial to include some of the info here...

Anyway, seeing the back and forth you've had on github and this email thread I thought I'd try and give you an overview to TurnKey Django, and Django specifically, in an attempt to clear things up and get you going. ## Django Django is an amazing piece of software. It makes developing web applications that much easier, by providing several layers of abstraction, tools and apps to build upon. I think the main issue you've been having is due to old-school habits, for example, creating database tables. Once of Django's core strengths is its ORM (Object Relational Mapper). You aren't meant to manually create database tables and schemas, thats what the ORM / syncdb is for. For example, you create a models.py file your app: ``` class Article(models.Model): pub_date = models.DateTimeField() headline = models.CharField(max_length=200) content = models.TextField() ``` Then you run syncdb which will create the table and schema: ``` ./manage.py syncdb ``` Another issue I noticed is that you were using the runserver command, and tried connecting to http://127.0.0.1:8000 but said that it wasn't working. I guess thats what the tutorial told you to do, but what it probably didn't mention (or you missed it), is that runserver is for development, and that 127.0.0.1 is localhost - assuming that you're developing on your local machine. ## TurnKey Django Turnkey Django is designed and configured out of the box for production, although it does support development. But, the default configuration is for production. What I mean by this, is that the default production configuration is that a real webserver (apache) is used, which is configured to use your projects wsgi configuration, which passes requests to your django app, which in turn is configured for production using a real database (mysql). You'll notice that /var/www/project has a settings.py file, which is used for production. It also has a settings_dev.py which is used for development - overriding the database configuration of mysql to use sqlite instead. The development settings will only take effect if DEVELOPMENT is set in the environment. The usual way to develop django applications, is to use the development web server and sqlite, for example: DEVELOPMENT=y ./manage.py runserver [ip:port] Though this is not required, it makes it a lot easier to develop, as the webserver doesn't need to be restarted for changes to take effect, and you can easily change the database schema (in production, you usually need to use a database migration assistant, eg. django-south). ## Bottom line I'd recommend using /var/www/project as a starting point, and customizing it accordingly for your needs. By creating your own django project and database throws out the carefully crafted implementation we have done for a working django server. You're basically reimplementing a lot of the work we've already done - hitting issues that Turnkey was designed to solve out of the box. I agree that we could do a better job with documentation, but I think the main stumbling block is just a lack of experience developing with Django.

— Reply to this email directly or view it on GitHub.

jdcrunchman commented 10 years ago

I still have not gotten any response back with my latest issue. After following your Advice and built a brand new turnkey Django box. But I'm a bit unclear on the order Of things I'm supposed to do.

So, the first thing we wanted to do, was to go to Administration page and add a user. This seemed to be the right thing to do. When we went to Users --> Add to add a user We entered a user name and password, then hit "save", and we get a "server error". But since we still could not figure out how to persuade the browser to issue a "stack trace" We are at a loss as to where we can identify the error. But when we looked in the server Logs, we get a "TemplateDoesNotExist" exception raised, but without the stack trace I'm at a loss to push on to find the problem.

Ok, then next I wanted to try adding a site... So I went to Sites > Add, and added A site, and I still get this server error. WTF?

Again, I please please plead with you to help me out, I know you cannot provide this Support for everyone, but with it being 10 days and counting, trying to get this Turnkey Django to work, I think this is now the ONLY thing we can do to get to the root of This problem, So can you PLEASE PLEASE allocate some time within the next few days To schedule a Fuze meeting so I can show you exactly what's wrong, and you can Drive my computer and look around in places I have no clue to look.

But, it is obviously true that TurnKey Django is certainly NOT turnkey, and I have 3 other People who has sat with me through this unsuccessful process of actually getting This bloody thing to work, to agree with me, including Adam, who you responded to His forum entry as well.

Of course I did post it to bug tracker on Github, and the Turnkey forums as you suggested, But it is clear to me that there is a bug, or some stupid blatant thing I'm doing wrong, Because the docs are incomplete, or I'm failing to locate a part in the documentation Tree that I should be following, or I'm just doing things in the wrong bloody order, Because no document exists that specifies a recommended order.

So, I'm back to square one, with literally nothing I can do to get this to work, and I'm Hoping for the communities sake, you could pay a little more attention to learning Why this won't work for me. We now have the capacity to go back all the way to a virgin Box within minutes.

So, I ask again, can you please make an exception with me, for the sake of the Community, to please try and "look over my shoulder" via Fuze so I can show you Exactly what I did, what documents I have read, and yet, I'm still getting these Annoying "server errors".

John

Sent from my iPad

On Apr 4, 2014, at 2:02 AM, Alon Swartz notifications@github.com wrote:

I replied to John via email, but I thought it would be beneficial to include some of the info here...

Anyway, seeing the back and forth you've had on github and this email thread I thought I'd try and give you an overview to TurnKey Django, and Django specifically, in an attempt to clear things up and get you going. ## Django Django is an amazing piece of software. It makes developing web applications that much easier, by providing several layers of abstraction, tools and apps to build upon. I think the main issue you've been having is due to old-school habits, for example, creating database tables. Once of Django's core strengths is its ORM (Object Relational Mapper). You aren't meant to manually create database tables and schemas, thats what the ORM / syncdb is for. For example, you create a models.py file your app: ``` class Article(models.Model): pub_date = models.DateTimeField() headline = models.CharField(max_length=200) content = models.TextField() ``` Then you run syncdb which will create the table and schema: ``` ./manage.py syncdb ``` Another issue I noticed is that you were using the runserver command, and tried connecting to http://127.0.0.1:8000 but said that it wasn't working. I guess thats what the tutorial told you to do, but what it probably didn't mention (or you missed it), is that runserver is for development, and that 127.0.0.1 is localhost - assuming that you're developing on your local machine. ## TurnKey Django Turnkey Django is designed and configured out of the box for production, although it does support development. But, the default configuration is for production. What I mean by this, is that the default production configuration is that a real webserver (apache) is used, which is configured to use your projects wsgi configuration, which passes requests to your django app, which in turn is configured for production using a real database (mysql). You'll notice that /var/www/project has a settings.py file, which is used for production. It also has a settings_dev.py which is used for development - overriding the database configuration of mysql to use sqlite instead. The development settings will only take effect if DEVELOPMENT is set in the environment. The usual way to develop django applications, is to use the development web server and sqlite, for example: DEVELOPMENT=y ./manage.py runserver [ip:port] Though this is not required, it makes it a lot easier to develop, as the webserver doesn't need to be restarted for changes to take effect, and you can easily change the database schema (in production, you usually need to use a database migration assistant, eg. django-south). ## Bottom line I'd recommend using /var/www/project as a starting point, and customizing it accordingly for your needs. By creating your own django project and database throws out the carefully crafted implementation we have done for a working django server. You're basically reimplementing a lot of the work we've already done - hitting issues that Turnkey was designed to solve out of the box. I agree that we could do a better job with documentation, but I think the main stumbling block is just a lack of experience developing with Django.

— Reply to this email directly or view it on GitHub.

jdcrunchman commented 10 years ago

As per Alon's request, I build a brand new Turnkey Django, but before I did anything to it, I archived and froze it, for easy recovery later. First off, no document exists which specifies the proper order in which to set this up. So, i decided to first go into Administration tool, and create a new Django user. I didn't even make any Linux users either. So, I went to Add a Django Admin user, picked an account name and password, and saved it, I got a "Server error". Checking the Apache logs, I get...

[Sat Apr 05 20:31:58 2014] [error] [client 72.193.188.252] t = loader.get_template(template_name) # You need to create a 500.html template. [Sat Apr 05 20:31:58 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 145, in get_template [Sat Apr 05 20:31:58 2014] [error] [client 72.193.188.252] template, origin = find_template(template_name) [Sat Apr 05 20:31:58 2014] [error] [client 72.193.188.252] File "/usr/lib/python2.7/dist-packages/django/template/loader.py", line 138, in find_template [Sat Apr 05 20:31:58 2014] [error] [client 72.193.188.252] raise TemplateDoesNotExist(name) [Sat Apr 05 20:31:58 2014] [error] [client 72.193.188.252] TemplateDoesNotExist: 500.html

So, does this mean some file is missing? Where are these template files kept, I could find nothing in the Django world where these template files are supposed to be, since this is an older version of Django, which is fine with me, for the application I need to write.

So, IMHO, the Turnkey Image VM must have some missing files somewhere.... and another issue, is getting the Apache server to into Debug mode, so the browser can display a stack trace, instead of "server error". I looked for some global setting file that puts things in the debug mode... but where is it? Does WebMin have the capability of setting this into debug mode so I can chase down this problem? The normal Django related files are not where I would expect them to be. Perhaps Django had changed them around, I just don't know.

John

jdcrunchman commented 10 years ago

I noticed you closed the Turnkey Django Administration page issue... But I did add Another comment on the fact that I started a fresh Turnkey Django box... Should I post This as a separate GitHub bug issue, or can I talk you into opening it up again until I can lead you by the hand via Fuze, and show you this bug. Adam, and my friend Bob, And myself all agree this is a bug. Perhaps somewhat related to the hardware, But we are never going to know, unless someone from Turnkey Linux and a Django Expert can meet with me on Fuze so I can show them what's going on.

Perhaps you can't duplicate the problem, but I spent the better part of the day, looking Through bug tracker, trying to find a similar issue. None exists with a workaround or A fix.

John

Sent from my iPad

On Apr 4, 2014, at 2:02 AM, Alon Swartz notifications@github.com wrote:

I replied to John via email, but I thought it would be beneficial to include some of the info here...

Anyway, seeing the back and forth you've had on github and this email thread I thought I'd try and give you an overview to TurnKey Django, and Django specifically, in an attempt to clear things up and get you going. ## Django Django is an amazing piece of software. It makes developing web applications that much easier, by providing several layers of abstraction, tools and apps to build upon. I think the main issue you've been having is due to old-school habits, for example, creating database tables. Once of Django's core strengths is its ORM (Object Relational Mapper). You aren't meant to manually create database tables and schemas, thats what the ORM / syncdb is for. For example, you create a models.py file your app: ``` class Article(models.Model): pub_date = models.DateTimeField() headline = models.CharField(max_length=200) content = models.TextField() ``` Then you run syncdb which will create the table and schema: ``` ./manage.py syncdb ``` Another issue I noticed is that you were using the runserver command, and tried connecting to http://127.0.0.1:8000 but said that it wasn't working. I guess thats what the tutorial told you to do, but what it probably didn't mention (or you missed it), is that runserver is for development, and that 127.0.0.1 is localhost - assuming that you're developing on your local machine. ## TurnKey Django Turnkey Django is designed and configured out of the box for production, although it does support development. But, the default configuration is for production. What I mean by this, is that the default production configuration is that a real webserver (apache) is used, which is configured to use your projects wsgi configuration, which passes requests to your django app, which in turn is configured for production using a real database (mysql). You'll notice that /var/www/project has a settings.py file, which is used for production. It also has a settings_dev.py which is used for development - overriding the database configuration of mysql to use sqlite instead. The development settings will only take effect if DEVELOPMENT is set in the environment. The usual way to develop django applications, is to use the development web server and sqlite, for example: DEVELOPMENT=y ./manage.py runserver [ip:port] Though this is not required, it makes it a lot easier to develop, as the webserver doesn't need to be restarted for changes to take effect, and you can easily change the database schema (in production, you usually need to use a database migration assistant, eg. django-south). ## Bottom line I'd recommend using /var/www/project as a starting point, and customizing it accordingly for your needs. By creating your own django project and database throws out the carefully crafted implementation we have done for a working django server. You're basically reimplementing a lot of the work we've already done - hitting issues that Turnkey was designed to solve out of the box. I agree that we could do a better job with documentation, but I think the main stumbling block is just a lack of experience developing with Django.

— Reply to this email directly or view it on GitHub.

l-arnold commented 10 years ago

John,

I don't know Django as I stated somwhere else. Unfortunately I keep getting copied on your GitHub Tracker comments where you are asking for help that I at least feel should be asked in the forums. Tracker is not a Help Forum and I have no idea how many other people likewise are getting the email, that you post questions of a community support nature to the forums.

I did do a Django install it the other day and it seemed the Template did not load for me by default either. It seems not many folks are using Django actively. I do not know if you are having issues with the "out of the box" implementation or other issues.

I would recomend you try the Bitnami VM build to see if it works works differently for you: Here is the link: https://bitnami.com/stack/django.

Alternatively you could look into the Turnkey Apps build on GitHub and see if there is not a better way to build the App that works for you. You could make a Branch of Django there, then do a new build with TKLDEV. I have no guidance beyond this as I haven't run a TKLDEV build myself.

TurnkeyLinux has a great way to install systems. There are, I believe, over 100 systems so most users like me have no way to test them all out, to learn them, and in turn to provide help on all of them. There are users can do that on the systems they are familiar with.

I would also recomend your looking at some of the other WebDevelopment Apps that are on Turnkeylinux.

I see the following that could be good alternatives to Django that work with Python: web2py

Python framework

web2py is a free open source framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python. It includes a web-based IDE that helps you create, modify, deploy and manage application from anywhere using your browser.

Google AppEngine Python SDK

Cloud development

The Python language version of the Google App Engine SDK enables developers to build Python web applications that can be hosted on Google's App Engine platform, on the same scalable infrastructure that power Google's own applications. App Engine applications are easy to build, easy to maintain, and easy to scale.

Thank you for your understanding. This is an opensource set of apps. I am a self-learning user. Every new App I take on will have a learning curve and a evaluation time before that. There is no one way to do Content Management, Web Development, E-Commerce or anything else. Most of the specifics of how to run the systems need to be gleamed from the specific communities around each ap. TurnKeyLinux, in my perspective, offers a consistent way to package OpenSource Projects into "generally usable" images. There is always room for improvement. For my part, I migrated to TurnkeyLinux FROM Bitnami, but when it comes to Django, it is quite possible that the BITNAMI (or a pure build from source) is the better way to go. I wish I could tell you how I ran my Django but I never have done so and have no idea how to use it or what you can accomplish with it even.

Please post to the forums. Folks will definitely help as they can there. Thank you.

JedMeister commented 10 years ago

@l-arnold - There is an unsubscribe button towards the top right hand side. Thanks for trying to help.

@jdcrunchman - I have had a look and I think you may be right in that there may be a bug with the default install and app. Using the Chrome Dev Tools it appears to be a permissions issue although digging around I can't find the files so perhaps they are actually missing (or just linked to incorrectly).

I suggest that we do not reopen this issue as the original problem was not really a bug. Whereas this appears that it is. Besides the signal to noise ratio on this thread is not good. I think once we work this out we should open a new issue that is short and concise so it is easy to follow and fix.

jdcrunchman commented 10 years ago

On Apr 5, 2014, at 1:56 PM, "L. Arnold" notifications@github.com wrote:

John,

I don't know Django as I stated somwhere else. Unfortunately I keep getting copied on your GitHub Tracker comments where you are asking for help that I at least feel should be asked in the forums.

I already did... But I had to add additional things for the people who look at these issues. Tracker is not a Help Forum and I have no idea how many other people likewise are getting the email, that you post questions of a community support nature to the forums.

These responses are going to my email, so naturally, I reply to them, are my replies getting copied back to the bug tracker sessions?
I did do a Django install it the other day and it seemed the Template did not load for me by default either. It seems not many folks are using Django actively. I do not know if you are having issues with the "out of the box" implementation or other issues.

"out of the box"... Brand new turnkey system. And I have a unique issue, but willing to work with the group, but I cannot find anyone in Django groups who are Using turnkey Django, and I cannot get anyone in Django Turnkey to share my screen with, because this is outside of the normal support the group can give. I would recomend you try the Bitnami VM build to see if it works works differently for you: Here is the link: https://bitnami.com/stack/django.

Adam, can we try this? Alternatively you could look into the Turnkey Apps build on GitHub and see if there is not a better way to build the App that works for you.

I've been trying everything.. But for the sake of Turnkey people, I would think they would want to fix this, Don't you? But I just cannot get anyone to share my screen with. You could make a Branch of Django there, then do a new build with TKLDEV. I have no guidance beyond this as I haven't run a TKLDEV build myself.

Already tried this route, it went NOWHERE.

TurnkeyLinux has a great way to install systems. There are, I believe, over 100 systems so most users like me have no way to test them all out, to learn them, and in turn to provide help on all of them. There are users can do that on the systems they are familiar with.

Then, can you help me test this out and work with me?

I would also recomend your looking at some of the other WebDevelopment Apps that are on Turnkeylinux.

I only know Django.. It's my ONLY option.

I see the following that could be good alternatives to Django that work with Python: web2py

Python framework

web2py is a free open source framework for rapid development of fast, scalable, secure and portable database-driven web-based applications. Written and programmable in Python. It includes a web-based IDE that helps you create, modify, deploy and manage application from anywhere using your browser.

Won't work on a Mac. Google AppEngine Python SDK

cost me money I cannot afford. Cloud development

The Python language version of the Google App Engine SDK enables developers to build Python web applications that can be hosted on Google's App Engine platform, on the same scalable infrastructure that power Google's own applications. App Engine applications are easy to build, easy to maintain, and easy to scale.

And costs money. Thank you for your understanding. This is an opensource set of apps. I am a self-learning user. Every new App I take on will have a learning curve and a evaluation time before that. There is no one way to do Content Management, Web Development, E-Commerce or anything else. Most of the specifics of how to run the systems need to be gleamed from the specific communities around each ap. TurnKeyLinux, in my perspective, offers a consistent way to package OpenSource Projects into "generally usable" images. There is always room for improvement. For my part, I migrated to TurnkeyLinux FROM Bitnami, but when it comes to Django, it is quite possible that the BITNAMI (or a pure build from source) is the better way to go. I wish I could tell you how I ran my Django but I never have done so and have no idea how to use it or what you can accomplish with it even.

Please post to the forums. Folks will definitely help as they can there. Thank you.

I have, but nobody is responding. But I can assure you, turnkey Django is NOT in any way a turnkey system, and I'm willing to help get this working again. It's just that there does not exist ONE person familiar with Django AND Turnkey Linux, so if I can find a Django guru to meet with a turnkey guru on Fuze, then together, we can solve this problem for the community, but I cannot seem to get Jeremy, or Alon to meet me on Fuze so I can show them the problem.

John

— Reply to this email directly or view it on GitHub.

jdcrunchman commented 10 years ago

See my comments below..

Sent from my iPad

On Apr 5, 2014, at 2:39 PM, Jeremy Davis notifications@github.com wrote:

@l-arnold - There is an unsubscribe button towards the top right hand side. Thanks for trying to help.

@jdcrunchman - I have had a look and I think you may be right in that there may be a bug with the default install and app. Using the Chrome Dev Tools it appears to be a permissions issue although digging around I can't find the files so perhaps they are actually missing (or just linked to incorrectly).

Wow... That makes me feel heaps better... I suggest that we do not reopen this issue as the original problem was not really a bug. Whereas this appears that it is. Besides the signal to noise ratio on this thread is not good. I think once we work this out we should open a new issue that is short and concise so it is easy to follow and fix.

Here is my suggestion... At 7 pm tonight (3am UTC), I'm hosting a Fuze conference with a Django expert. If you have the time to join the conference, I will invite you, and anyone else you choose, because we are nailing down the problem, and with my help, I can make this Turnkey Django a heaps better then it is right now. Http://fuze.com is where you get Fuze.

I'm working on a bucket list of some things it should have, to make it heaps more Turnkey, along with a proposed much better sample app, like one that at least uses the "models.py", an integral part of Django, not included in the current example.

Then, my guys will make you a VM machine which is far more turnkey then the existing one on Turnkey Linux.

Since Django releases like to keep file paths consistent, the newer release (not available on Turnkey), might differ, so I propose a WHERE EVERYTHING IS.. File be placed in the sample user's home directory.

We want to create a user account (with some generic name), and put at least 2-3 sample apps in this home directory. Like home/sample_user or whatever.

Another thing that would be useful, is a step by step setup procedure, to be deployed in a recommended order. Which could be put in a README file living in the sample users home directory. I want to also write up some decent documentation.

I would be willing to do this FIRST before attempting to do my own work, which makes a lot of sense to me, then we can send you the VMWare image you can deploy in your Turnkey lineup of systems. So can you try and make this conference? Right now, it's set tentatively at 7 pm PDT, but depending if my Django person is back home in time.

I have wickr installed on my iPhone. It is super secure chat program for Android and iPhone. My wickr name is "jdcrunchman", send me a text when you get it setup. The app is free.

John

— Reply to this email directly or view it on GitHub.

JedMeister commented 10 years ago

Sounds fantastic @jdcrunchman! By my reckoning 3am UTC is 1pm (13:00) my time (AEST UTC+10). I'm not 100% sure I will be able to make it but I'll do my best...

TKL has appliance specific community documentation (that is a little lacking in some respects) but it is a wiki so we can use that to create the documentation. I have started a new page for the Django appliance

jdcrunchman commented 10 years ago

On Sat, Apr 5, 2014 at 6:34 PM, Jeremy Davis notifications@github.comwrote:

Sounds fantastic @jdcrunchman https://github.com/jdcrunchman! By my reckoning 3am UTC is 1pm (13:00) my time (AEST UTC+10). I'm not 100% sure I will be able to make it but I'll do my best...

Thanx for getting on Wickr.

TKL has appliance specific community documentationhttp://www.turnkeylinux.org/docs/appliances(that is a little lacking in some respects) but it is a wiki so we can use that to create the documentation. I have started a new page for the Django appliance http://www.turnkeylinux.org/docs/django

Yes, as we work on this, I have to focus on documenting everything, so I'll be doing that on my iPad, keeping track of what we need to do. We tried to use the Mac's ability to record mac desktop, but it won't work with Fuze.

But try to install a working copy of Fuze, and be comfortable in knowing that I'm going to be here at my computer for 7 more hours, assuming I don't pass out.

Kevin, my Django expert has a car issue, and could not make the meeting tonight (tomorrow afternoon for you).

I usually get up around 17:00 UTC, it is 04:00 UTC as I write this. However, in this case, I will meet with you at YOUR convenience, but not sure about Kevin.

I messaged Kevin, but he hasn't responded yet.

John

Reply to this email directly or view it on GitHubhttps://github.com/turnkeylinux/tracker/issues/182#issuecomment-39656044 .