Sphene Community Tools

Community

Copyright © 2007-2018 by Herbert Poul

You are not logged in.
Login
Register

Change Language:



AddThis Social Bookmark Button

A Django site.

Powered by Sphene Community Tools
Board » General » A few question lately by using sphene community tools

Hi?

At these days, I have met some interesting things.

The first thing is when I upload my avatar from the profile edit screen, I got the some connection error.

So I roughly look up the code. But I can not find any file uploading routine in the views.py and forms.py. did I miss something?


and the second thing is when I click the role model in the admin page

I got this error

Environment:

Request Method: GET
Request URL: http://127.0.0.1:8000/ggum/admin/community/role/
Django Version: 0.97-pre-SVN-7523
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'sphene.community',
'sphene.sphboard',
'sphene.sphblog',
'sphene.sphwiki']
Installed Middleware:
('sphene.community.middleware.ThreadLocals',
'sphene.community.middleware.GroupMiddleware',
'sphene.community.middleware.LastModified',
'sphene.community.middleware.PermissionDeniedMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware')


Traceback:
File "/home/jacob/lib/django/django_trunk/django/core/handlers/base.py" in get_response
82. response = callback(request, *callback_args, **callback_kwargs)
File "/home/jacob/lib/django/django_trunk/django/contrib/admin/views/decorators.py" in _checklogin
62. return view_func(request, *args, **kwargs)
File "/home/jacob/lib/django/django_trunk/django/views/decorators/cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/home/jacob/lib/django/django_trunk/django/contrib/admin/views/main.py" in change_list
757. cl = ChangeList(request, model)
File "/home/jacob/lib/django/django_trunk/django/contrib/admin/views/main.py" in __init__
582. self.get_results(request)
File "/home/jacob/lib/django/django_trunk/django/contrib/admin/views/main.py" in get_results
640. result_list = list(self.query_set)
File "/home/jacob/lib/django/django_trunk/django/db/models/query.py" in __len__
55. self._result_cache.extend(list(self._iter))
File "/home/jacob/lib/django/django_trunk/django/db/models/query.py" in iterator
162. for row in self.query.results_iter():
File "/home/jacob/lib/django/django_trunk/django/db/models/sql/query.py" in results_iter
200. for rows in self.execute_sql(MULTI):
File "/home/jacob/lib/django/django_trunk/django/db/models/sql/query.py" in execute_sql
1456. sql, params = self.as_sql()
File "/home/jacob/lib/django/django_trunk/django/db/models/sql/query.py" in as_sql
247. ordering = self.get_ordering()
File "/home/jacob/lib/django/django_trunk/django/db/models/sql/query.py" in get_ordering
583. self.model._meta, default_order=asc):
File "/home/jacob/lib/django/django_trunk/django/db/models/sql/query.py" in find_ordering_name
609. alias, False)
File "/home/jacob/lib/django/django_trunk/django/db/models/sql/query.py" in setup_joins
1109. "Choices are: %s" % (name, ", ".join(names)))

Exception Type: FieldError at /ggum/admin/community/role/
Exception Value: Cannot resolve keyword 'group_id' into field. Choices are: group, id, name, permission_flags, rolemember

and the last thing is when I add some field in the community user profile field section.

Do this program really save the new added field information somewhere in the database?

Lastly, I have suggestion for this program.

When we see the wiki history, we only can see the whole page history.

But I think the more page will add, the more time is needed to see the history.

So I think when we want to see the specific page, what about showing only the page's history they want to see in stead of showing whole page history.

I think this way is more efficient way in terms of time and performance.

And also we can provide the whole page wiki history menu somewhere else.

Many thanks Poul


--- 최종 수정 jacob 시간 2008-05-22 02:20:25 ---
hi,

The first thing is when I upload my avatar from the profile edit screen, I got the some connection error.


hmm.. a connection error from your browser ? in what environment ? using the development server, mod_python, .. ?

SCT doesn't do the fileupload itself .. but uses django's mechanism.. so you won't see anything about handling file uploads, but simply a FileField which should do the job..


and the second thing is when I click the role model in the admin page

I got this error


i think this is because of the query refactoring merge which happened lately in django trunk ..
i have fixed it now, update sphene/community/models.py and it should work

btw. you might not want to use the django admin to manage roles.. use /community/admin/permission/role/list/ for this. (if /community/ are the URLs for the sphene.community app)


and the last thing is when I add some field in the community user profile field section.

Do this program really save the new added field information somewhere in the database?


yes ... the same way as jabber id, icq uin, etc. is saved.. i just tried it .. and it works for additional fields.. have you had problems with it ?

Lastly, I have suggestion for this program.

When we see the wiki history, we only can see the whole page history.


there are already two different views.. although the naming is very troubling :)
one is the "wiki history" .. which .. should mean .. all recent changes in the whole wiki..: http://sct.sphene.net/wiki/recentchanges/

the other is the "snip changes" which are only changes to the current snip: http://sct.sphene.net/wiki/history/Start/

is this what you mean ?


thanks for your feedback :)
herbert
Hey, we have Signatures !!! Great, isn't it ? ;)
hi,

The first thing is when I upload my avatar from the profile edit screen, I got the some connection error.


hmm.. a connection error from your browser ? in what environment ? using the development server, mod_python, .. ?

SCT doesn't do the fileupload itself .. but uses django's mechanism.. so you won't see anything about handling file uploads, but simply a FileField which should do the job..

that was my web server configuration problem

I solved that problem

But I got another one here


Environment:

Request Method: POST
Request URL: http://127.0.0.1/ggum/board/post/3/
Django Version: 0.97-pre-SVN-7523
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'sphene.community',
'sphene.sphboard',
'sphene.sphblog',
'sphene.sphwiki']
Installed Middleware:
('sphene.community.middleware.ThreadLocals',
'sphene.community.middleware.GroupMiddleware',
'sphene.community.middleware.LastModified',
'sphene.community.middleware.PermissionDeniedMiddleware',
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.locale.LocaleMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.doc.XViewMiddleware')


Traceback:
File "/home/jacob/lib/django/django_trunk/django/core/handlers/base.py" in get_response
82. response = callback(request, *callback_args, **callback_kwargs)
File "/home/jacob/lib/django/communitytools/sphenecoll/sphene/sphboard/views.py" in post
308. attachment = attachmentForm.save(commit = False)
File "/home/jacob/lib/django/django_trunk/django/newforms/models.py" in save
272. return save_instance(self, self.instance, self._meta.fields, fail_message, commit)
File "/home/jacob/lib/django/django_trunk/django/newforms/models.py" in save_instance
44. f.save_form_data(instance, cleaned_data[f.name])
File "/home/jacob/lib/django/django_trunk/django/db/models/fields/__init__.py" in save_form_data
847. getattr(instance, "save_%s_file" % self.name)(data.filename, data.content, save=False)
File "/home/jacob/lib/django/django_trunk/django/db/models/fields/__init__.py" in <lambda>
809. setattr(cls, 'save_%s_file' % self.name, lambda instance, filename, raw_contents, save=True: instance._save_FIELD_file(self, filename, raw_contents, save))
File "/home/jacob/lib/django/django_trunk/django/db/models/base.py" in _save_FIELD_file
470. fp = open(full_filename, 'wb')

Exception Type: IOError at /ggum/board/post/3/
Exception Value: [Errno 2] No such file or directory: u'var/sphene/sphwiki/attachment/2008/05/22/_22.jpg'

It seems that the program doesn't properly make the folder.

where do I look up the code to fix this problem?

and the last thing is when I add some field in the community user profile field section.

Do this program really save the new added field information somewhere in the database?
yes ... the same way as jabber id, icq uin, etc. is saved.. i just tried it .. and it works for additional fields.. have you had problems with it ?


yes it works, But I try to find the field in the admin page. But I can't find the information that I update in the admin page so I wonder whether it save or not.

Lastly, I have suggestion for this program.

When we see the wiki history, we only can see the whole page history.
there are already two different views.. although the naming is very troubling :)
one is the "wiki history" .. which .. should mean .. all recent changes in the whole wiki..: http://sct.sphene.net/wiki/recentchanges/

the other is the "snip changes" which are only changes to the current snip: http://sct.sphene.net/wiki/history/Start/

is this what you mean ?



Yes that's exactly what i meant. I didn't recognize that so far ^.^

Thanks

Exception Type: IOError at /ggum/board/post/3/
Exception Value: [Errno 2] No such file or directory: u'var/sphene/sphwiki/attachment/2008/05/22/_22.jpg'

It seems that the program doesn't properly make the folder.
my first guess would be that the webserver user simply has no permission to create the necessary folders..
have you made sure that the permissions in META_ROOT/var are correct ?


yes it works, But I try to find the field in the admin page. But I can't find the information that I update in the admin page so I wonder whether it save or not.


it is stored in the model 'CommunityUserProfileFieldValue' .. which does not show up in the admin page .. you can look into the database (table community_communityuserprofilefieldvalue)
Hey, we have Signatures !!! Great, isn't it ? ;)
Exception Type: IOError at /ggum/board/post/3/
Exception Value: [Errno 2] No such file or directory: u'var/sphene/sphwiki/attachment/2008/05/22/_22.jpg'

It seems that the program doesn't properly make the folder.
my first guess would be that the webserver user simply has no permission to create the necessary folders..
have you made sure that the permissions in META_ROOT/var are correct ?
How do I know what the META_ROOT's value is?

I run the communitydraft source in the my local machine.

when I upload the file using communitydraft, it works perfectly.

But I checked where the uploaded file goes. I found the location of uploaded file is below the static.

so from these things, what I guess is probablely the META_ROOT is one step above the installed program.

Based on what I guess, I made the same directory that the program have.

But still split out the same error.

help me. :-(
by default the communitydraft settings set MEDIA_ROOT to '../static' (ie. to the communitydraft base directory)

so .. look into communitydraft/static .. and see if there is a directory called 'var' .. and.. if not .. create it .. and change it's owner to the web server.. (or even "chmod 777 var -R" to be sure that permissions can't be a problem)
Hey, we have Signatures !!! Great, isn't it ? ;)

Please login to post a reply.



Powered by Sphene Community Tools