ask / chishop Goto Github PK
View Code? Open in Web Editor NEWPlease use https://github.com/benliles/chishop
Home Page: https://github.com/benliles/djangopypi
License: BSD 3-Clause "New" or "Revised" License
Please use https://github.com/benliles/chishop
Home Page: https://github.com/benliles/djangopypi
License: BSD 3-Clause "New" or "Revised" License
I've encountered an issue where I run the distutils 'upload' command from Python 3.3. The command succeeds and with the same output as on Python 2.7 including the all important line:
Server response (200): OK
However, the file doesn't appear in the chishop. I don't experience this problem in the same environment against PyPI, so I suspect chishop. I'm filing this here for now until I can investigate further.
I am not sure where {{ base_url }} comes from at all. Anyway I think it should be replaced with {% url djangopypi-pypi %} for home in base.html template.
Using
commit cf9dcc0
Date: Tue Nov 17 20:34:22 2009 +0100
Install and test locally using the instructions in the readme. Created a single superuser and no modifications to the default settings.py except changing the DATABASE_* settings.
Running the following two commands,
someproject$ python setup.py register -r local sdist upload -r local
someproject$ python setup.py register -r local bdist_egg upload -r local
The first runs successfully and the file shows up in the web UI. The second command hangs. If I then clear and start with a new database, uploading via various methods (bdist, etc) shows similar behavior, the second upload always hangs.
Remove asap
if settings.LOCAL_DEVELOPMENT:
urlpatterns += patterns("django.views",
url(r"%s(?P.*)$" % settings.MEDIA_URL[1:], "static.serve", {
"document_root": settings.MEDIA_ROOT}))
By default MEDIA_URL is "media/". The logic would be clearer if it was used MEDIA_PREFIX, which is by default "/media/", so, mapping to "media/" would be the correct.
Remove asap
Took me a bit to figure out why the database settings I changed in chishop/settings.py weren't taking effect. I had to look in bin/django and bin/django.wsgi to notice that they were both using chishop/development.py settings, which overrides the database settings. The docs at least should be fixed to note this.
Remove asap
When I try and register with chishop I get a failure:
Traceback:
File "/home/nferrier/chishop/parts/django/django/core/handlers/base.py" in get_response
File "/home/nferrier/chishop/eggs/django_registration-0.8_alpha_1-py2.6.egg/registration/views.py" in registerresponse = callback(request, _callback_args, *_callback_kwargs)
File "/home/nferrier/chishop/eggs/django_registration-0.8_alpha_1-py2.6.egg/registration/backends/default/init.py" in registernew_user = backend.register(request, **form.cleaned_data)
File "/home/nferrier/chishop/parts/django/django/db/transaction.py" in _commit_on_successpassword, site)
File "/home/nferrier/chishop/eggs/django_registration-0.8_alpha_1-py2.6.egg/registration/models.py" in create_inactive_userres = func(_args, *_kw)
File "/home/nferrier/chishop/eggs/django_registration-0.8_alpha_1-py2.6.egg/registration/models.py" in send_activation_emailregistration_profile.send_activation_email(site)
File "/home/nferrier/chishop/parts/django/django/contrib/auth/models.py" in email_userself.user.email_user(subject, message, settings.DEFAULT_FROM_EMAIL)
File "/home/nferrier/chishop/parts/django/django/core/mail.py" in send_mailsend_mail(subject, message, from_email, [self.email])
File "/home/nferrier/chishop/parts/django/django/core/mail.py" in sendconnection=connection).send()
File "/home/nferrier/chishop/parts/django/django/core/mail.py" in send_messagesreturn self.get_connection(fail_silently).send_messages([self])
File "/home/nferrier/chishop/parts/django/django/core/mail.py" in _sendsent = self._send(message)
File "/usr/lib/python2.6/smtplib.py" in sendmailemail_message.message().as_string())
File "/usr/lib/python2.6/smtplib.py" in ehlo_or_helo_if_neededself.ehlo_or_helo_if_needed()
File "/usr/lib/python2.6/smtplib.py" in ehloif not (200 <= self.ehlo()[0] <= 299):
File "/usr/lib/python2.6/smtplib.py" in putcmdself.putcmd(self.ehlo_msg, name or self.local_hostname)
File "/usr/lib/python2.6/smtplib.py" in sendself.send(str)
raise SMTPServerDisconnected('please run connect() first')
Exception Type: SMTPServerDisconnected at /accounts/register/
Exception Value: please run connect() first
<<<<<<
I don't have an SMTP server configured in Django, not sure how to set one up either...
This:
http://code.google.com/p/app-engine-patch/issues/detail?id=211
suggests the problem can be fixed with an option to runserver, but the
runserver chishop builds does not have that option (as far as I can
see).
Maybe other authentication systems would be better anyway since this
will mostly be used for team and personal servers?
Line 218 in djangopypi/views.py only catches Project.DoesNotExist, it needs to catch Release.DoesNotExist as well.
There's a MEDIA_PREFIX setting in settings.py whose purpose is unclear, and which seems to be unused in the codebase.
README must be README.md or README.markdown for correct displaying in github main page (https://github.com/ask/chishop)
This made the links in github description incorrect
Django provides a remote user authentication middleware which allows Apache to handle the authentication before it reaches Django. The post handler in chishop doesn't check to see if you are authenticated already, it just tries to authenticate you.
I haven't tried it, but it sounds like you need to enable wsgi to pass
the authorization header to Chishop. This is done in theapacheconfig
with:
WSGIPassAuthorization On
Distutils and PyPI uses Basic Auth, and without this optionApache
will just swallow the header and handle it by itself.
that solved my problem, please consider to add this info somewhere in
docs.
PyPI works like this. If you upload a version that already exists it complains with an error message.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.