Forums

Wiki

We should start a PythonAnywhere wiki

ok, sure, how to start?

We should probably wait until one of the staff respond and give their opinion in it

It probably shouldn't use MediaWiki because it uses PHP and PHP sucks

django-wiki seems like a good wiki software

PA staff, what do you think about this idea

Hmm. Last time I did that for a business site it degenerated into spam really quickly. Often really quite unpleasant spam with images. OTOH that was a MediaWiki site, and I think those need to have lots of very active users to fight off spam, given that it's a popular wiki framework so all of the spammers have scripts to auto-post stuff on pages there.

We do have our help pages, of course, and we do accept GitHub pull requests on those -- but perhaps that's not quite what you're looking for.

If you guys fancy setting up an unofficial wiki, please do go ahead. We do allow multiple accounts with the same email address, so you can do that side pretty easily. And if it takes off and it needs more worker processes to keep up with the traffic, or more disk space, or something like that, we can certainly provide those for free within reason :-)

So, if our wiki needs more storage or web workers, you can provide it for free?

The wiki will have information about things like the history of PA, update history, the staff, etc.

And maybe it can have a list of some websites hosted on PA

So, if our wiki needs more storage or web workers, you can provide it for free?

Sure, within reason (so, an extra couple of GiB is fine, but 200 TiB would be a no-no :-)

The wiki will have information about things like the history of PA, update history, the staff, etc.

That would be fine -- we can't guarantee that we'd contribute at an official level, but I personally would be happy to post some background stuff. Obviously you would need to look out for the whole personal-info-online/GDPR thing.

And maybe it can have a list of some websites hosted on PA

That would be pretty cool -- if people posted their own sites, anyway. Probably best not to post sites on that list without the explicit permission of the site owners.

So I have just discovered wiki.pythonanywhere.com which seems to have users like conrad and glenn. @giles explain this

Should we put on on pawiki.pythonanywhere.com? At first I was going to do it on wiki.pythonanywhere.com, but that is already taken.

That's our private wiki for internal stuff, and I'm pretty shocked that it has a username leakage bug -- I'm guessing you tried to log in with those usernames and saw the difference between the result with a random username vs when you tried it with a likely PythonAnywhere staff username, yes?

BTW I don't know why our spam detector is being so trigger-happy with your posts on this topic, @dull. It uses Akismet, and I've made sure that we sent back "this message was miscategorised" responses for both of your last ones -- hopefully that will help train it.

I'm guessing you tried to log in with those usernames and saw the difference between the result with a random username vs when you tried it with a likely PythonAnywhere staff username

Yes, that's what I have done.

I'm gonna make the wiki now.

Sure, within reason (so, an extra couple of GiB is fine, but 200 TiB would be a no-no :-)

It's yottabyte time.

It's django time :-(

Im getting error

2019-10-21 03:47:26,466: RuntimeError: Model class django.contrib.contenttypes.models.ContentType doesn't declare an explicit app_label and isn't in an application in INSTALLED_APPS.
2019-10-21 03:47:26,466:   File "/var/www/pawiki_pythonanywhere_com_wsgi.py", line 1, in <module>
2019-10-21 03:47:26,466:     from pawiki.wsgi import application
2019-10-21 03:47:26,466: 
2019-10-21 03:47:26,467:   File "/home/pawiki/pawiki/pawiki/wsgi.py", line 16, in <module>
2019-10-21 03:47:26,467:     application = get_wsgi_application()
2019-10-21 03:47:26,467: 
2019-10-21 03:47:26,467:   File "/home/pawiki/wikienv/lib/python3.7/site-packages/django/core/wsgi.py", line 12, in get_wsgi_application
2019-10-21 03:47:26,467:     django.setup(set_prefix=False)
2019-10-21 03:47:26,467: 
2019-10-21 03:47:26,467:   File "/home/pawiki/wikienv/lib/python3.7/site-packages/django/__init__.py", line 24, in setup
2019-10-21 03:47:26,467:     apps.populate(settings.INSTALLED_APPS)
2019-10-21 03:47:26,467: 
2019-10-21 03:47:26,467:   File "/home/pawiki/wikienv/lib/python3.7/site-packages/django/apps/registry.py", line 114, in populate
2019-10-21 03:47:26,467:     app_config.import_models()
2019-10-21 03:47:26,468: 
2019-10-21 03:47:26,468:   File "/home/pawiki/wikienv/lib/python3.7/site-packages/django/apps/config.py", line 211, in import_models
2019-10-21 03:47:26,468:     self.models_module = import_module(models_module_name)
2019-10-21 03:47:26,468: 
2019-10-21 03:47:26,468:   File "/home/pawiki/wikienv/lib/python3.7/site-packages/django_nyt-1.1.3-py3.7.egg/django_nyt/models.py", line 1, in <module>
2019-10-21 03:47:26,468:     from django.contrib.contenttypes.models import ContentType
2019-10-21 03:47:26,468: 
2019-10-21 03:47:26,468:   File "/home/pawiki/wikienv/lib/python3.7/site-packages/django/contrib/contenttypes/models.py", line 133, in <module>
2019-10-21 03:47:26,468:     class ContentType(models.Model):
2019-10-21 03:47:26,468: 
2019-10-21 03:47:26,468:   File "/home/pawiki/wikienv/lib/python3.7/site-packages/django/db/models/base.py", line 111, in __new__
2019-10-21 03:47:26,469:     "INSTALLED_APPS." % (module, name)

This is my WSGI config script:

from pawiki.wsgi import application

I followed this tutorial

Try one of our more standard WSGI file formats, like this (adjusting the project_home and DJANGO_SETTINGS_MODULE appropriately):

import os
import sys

project_home = u'/home/pawiki/mysite'
if project_home not in sys.path:
    sys.path.insert(0, project_home)

os.environ['DJANGO_SETTINGS_MODULE'] = 'mysite.settings'

from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()

ok i'll try that when i have time

That error also happens when I run manage.py

Hmm, OK. So not a WSGI file problem.

How have you set up the Django app in terms of its directories? Maybe we could take a look at your files? (If you give us your permission by saying that it's OK here in the forums as the pawiki user then we can take a look via our admin interface.)

Yes, you may look in my files

The project is in ~/pawiki and the virtualenv is ~/wikienv.

I’m also going to give you access to the GitHub repo for the project

im completely new to django

you still owe me one yottabyte

I've found Flask much easier to deal with than Django

flask vs django performance

The next update to my site will have a link to your website

pawiki, you're getting that exception because django_nyt is relying on the django.contrib.contenttypes app, but you have not included django.contrib.contenttypes in your INSTALLED_APPS config.

did you see the comment on the top of settings.py

im supposed to be doing homework actually

ok, thanks, cool, if you meant me there re. link update on your site

The update to my site is now public

I just tried fixing the errors on pawiki, but I now have another error. See the pawiki site to see the traceback.

You may look in my files again. You may do this anytime in the future when I need help

help

Right now you're getting "No installed app with label 'admin'." From the traceback, it looks like you don't have django.contrib.admin in your INSTALLED_APPS -- could you check if you do, and add it if you don't?

I'm now doing the database migrate stuff. It might actually work

And I fixed the problem you just mentioned

I'm still waiting for the day when I use up 69 cpu seconds and 420 mb of storage

The website is running now, but I have to do some other set up first

:-D

I was trying to figure out how to set up the superuser thing and found out that it is a Django feature, not a django-wiki feature, which is a bit surprising to me

I now just need to add some structure to the wiki.

The wiki is officially made now. Feel free to sign up on it and edit the new wiki

I just signed up (username giles) but don't seem to have permission to edit stuff...?

You should now be able to edit any article other than Home

@giles I added you to the “pastaff” group, so you should now also be able to edit Home

Make an article about harry

How can we spread the word about this

I guess if you use any debate/IT forums you could mention it there

Looks like the edit permissions you gave me worked -- thanks! I've put in a stub page for myself and added a bit to the "history of PythonAnywhere" page.

Are you taller than Glenn?

Also, I added the link to this wiki to PythonAnywhere’s Wikipedia page

Django wiki makes me really hate MediaWiki

"Mom, can we have django-wiki"

"No, we have django-wiki at home."

django-wiki at home: MediaWiki

MediaWiki's system of categories and the flattened article tree is so terrifying. Django-wiki's system of subarticles is so much more elegant and maintainable.

Are you taller than Glenn?

Yup.

I am more humble than you