Re: help with Error was: No module named io
On Mon, Aug 29, 2011 at 9:41 PM, CrabbyPetewrote: > I'm posting it here because my understanding is that django 1.3 > supports python 2.5., however this code runs perfectly well on 2.6 but > not on 2.5 and I get this error > I have posted it on the django user group and I got this reply which I > believe is correct. > > http://groups.google.com/group/django-users/browse_thread/thread/3f191ba3b0bcf99f > > Is this a bug, or does django 1.3 not support python 2.5? As you've been told - twice - on that very thread, the problem appears to be in your own code. Django *does* support Python 2.5, and we have the test suite to prove it: http://ci.django-cms.org/job/Django/database=sqlite3,python=python2.5/ On the other hand, Django doesn't guarantee that *your* code runs under Python 2.5. In this case, assuming your PYTHONPATH is set up right, if you open up a normal python prompt and run: >>> from base import views You should see the same "ImportError: No module named io" error. Remove or replace that import, and your code will run. Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: Subversion + Django
Thanks for such a quick answer. So I'll have to create the website in Django and learn how to connect it with Subversion... That sound hard XD, but I like the challenges. 2011/8/29 Jirka Vejrazka> > My issue is that I have a PC that I' considering to use it as a server. > I'm currently learning Django and My friends and I are working in a Software > Project. My Question is: ¿Can I mix Subversion and Django in my server like > http://www.assembla.com/ or other? I mean, I'd like to create a Subversion > Server... ¿Is that possible? > > Yes, Django and Subversion (and many other things) can coexist together. > You might need to play with your webserver configuration a bit if you plan > to have web access to your Subversion repositories. > > HTH > > Jirka > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > -- Kevin Rafael Sarmiento Mendoza *Estudiante de Ingeniería de Sistemas* V Semestre *Universidad de Cartagena* "... *when men were men and wrote their own device driver* ..." - Linus Benedict Torvalds -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: Subversion + Django
> My issue is that I have a PC that I' considering to use it as a server. I'm currently learning Django and My friends and I are working in a Software Project. My Question is: ¿Can I mix Subversion and Django in my server like http://www.assembla.com/ or other? I mean, I'd like to create a Subversion Server... ¿Is that possible? Yes, Django and Subversion (and many other things) can coexist together. You might need to play with your webserver configuration a bit if you plan to have web access to your Subversion repositories. HTH Jirka -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Subversion + Django
Hi! This is my first post (Please ignore my poor english =)) My issue is that I have a PC that I' considering to use it as a server. I'm currently learning Django and My friends and I are working in a Software Project. My Question is: ¿Can I mix Subversion and Django in my server like http://www.assembla.com/ or other? I mean, I'd like to create a Subversion Server... ¿Is that possible? Thank you for your answer Greeting from Colombia [image: :D] -- You received this message because you are subscribed to the Google Groups "Django developers" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-developers/-/2bD9WSOSgV0J. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: help with Error was: No module named io
Looking at the traceback below it looks like your base.views module is importing io and not django. Can you check and see if that's the case? I'm running django on 2.5 and it doesn't appear broken. On Mon, Aug 29, 2011 at 9:41 AM, CrabbyPetewrote: > I'm posting it here because my understanding is that django 1.3 > supports python 2.5., however this code runs perfectly well on 2.6 but > not on 2.5 and I get this error > I have posted it on the django user group and I got this reply which I > believe is correct. > > > http://groups.google.com/group/django-users/browse_thread/thread/3f191ba3b0bcf99f > > Is this a bug, or does django 1.3 not support python 2.5? > > Thanks > > On Aug 28, 10:44 am, Jeremy Dunck wrote: > > You've mailed the django-developers list which is for development *of > > Django itself*. The proper mailing list about using Django is > > django-users. Please send this message to django-users unless you're > > proposing a change to Django. > > > > http://groups.google.com/group/django-users > > > > > > > > > > > > > > > > On Sun, Aug 28, 2011 at 7:34 AM, CrabbyPete > wrote: > > > I am running django 1.3 on python version 2.5.2. My code runs fine on > > > python v2.6 but on v2.5.2 I get the following > > > > > Could not import base.views. Error was: No module named io > > > > > Here is the traceback: > > > Django Version: 1.3 > > > Python Version: 2.5.2 > > > Installed Applications: > > > ['django.contrib.auth', > > > 'django.contrib.contenttypes', > > > 'django.contrib.sessions', > > > 'django.contrib.sites', > > > 'django.contrib.messages', > > > 'django.contrib.staticfiles', > > > 'django.contrib.admin', > > > 'django.contrib.admindocs', > > > 'base', > > > 'social', > > > 'south'] > > > Installed Middleware: > > > ('django.middleware.common.CommonMiddleware', > > > 'django.contrib.sessions.middleware.SessionMiddleware', > > > 'django.middleware.csrf.CsrfViewMiddleware', > > > 'django.contrib.auth.middleware.AuthenticationMiddleware', > > > 'django.contrib.messages.middleware.MessageMiddleware') > > > > > Traceback: > > > File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ > > > django/core/handlers/base.py" in get_response > > > 101. request.path_info) > > > File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ > > > django/core/urlresolvers.py" in resolve > > > 252. sub_match = pattern.resolve(new_path) > > > File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ > > > django/core/urlresolvers.py" in resolve > > > 158. return ResolverMatch(self.callback, args, kwargs, > > > self.name) > > > File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ > > > django/core/urlresolvers.py" in _get_callback > > > 167. raise ViewDoesNotExist("Could not import %s. Error > > > was: %s" % (mod_name, str(e))) > > > > > Exception Type: ViewDoesNotExist at / > > > Exception Value: Could not import base.views. Error was: No module > > > named io > > > > > -- > > > You received this message because you are subscribed to the Google > Groups "Django developers" group. > > > To post to this group, send email to > django-developers@googlegroups.com. > > > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > > > For more options, visit this group athttp:// > groups.google.com/group/django-developers?hl=en. > > -- > You received this message because you are subscribed to the Google Groups > "Django developers" group. > To post to this group, send email to django-developers@googlegroups.com. > To unsubscribe from this group, send email to > django-developers+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-developers?hl=en. > > -- David blog: http://www.traceback.org twitter: http://twitter.com/dstanek www: http://dstanek.com -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: help with Error was: No module named io
I'm posting it here because my understanding is that django 1.3 supports python 2.5., however this code runs perfectly well on 2.6 but not on 2.5 and I get this error I have posted it on the django user group and I got this reply which I believe is correct. http://groups.google.com/group/django-users/browse_thread/thread/3f191ba3b0bcf99f Is this a bug, or does django 1.3 not support python 2.5? Thanks On Aug 28, 10:44 am, Jeremy Dunckwrote: > You've mailed the django-developers list which is for development *of > Django itself*. The proper mailing list about using Django is > django-users. Please send this message to django-users unless you're > proposing a change to Django. > > http://groups.google.com/group/django-users > > > > > > > > On Sun, Aug 28, 2011 at 7:34 AM, CrabbyPete wrote: > > I am running django 1.3 on python version 2.5.2. My code runs fine on > > python v2.6 but on v2.5.2 I get the following > > > Could not import base.views. Error was: No module named io > > > Here is the traceback: > > Django Version: 1.3 > > Python Version: 2.5.2 > > Installed Applications: > > ['django.contrib.auth', > > 'django.contrib.contenttypes', > > 'django.contrib.sessions', > > 'django.contrib.sites', > > 'django.contrib.messages', > > 'django.contrib.staticfiles', > > 'django.contrib.admin', > > 'django.contrib.admindocs', > > 'base', > > 'social', > > 'south'] > > Installed Middleware: > > ('django.middleware.common.CommonMiddleware', > > 'django.contrib.sessions.middleware.SessionMiddleware', > > 'django.middleware.csrf.CsrfViewMiddleware', > > 'django.contrib.auth.middleware.AuthenticationMiddleware', > > 'django.contrib.messages.middleware.MessageMiddleware') > > > Traceback: > > File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ > > django/core/handlers/base.py" in get_response > > 101. request.path_info) > > File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ > > django/core/urlresolvers.py" in resolve > > 252. sub_match = pattern.resolve(new_path) > > File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ > > django/core/urlresolvers.py" in resolve > > 158. return ResolverMatch(self.callback, args, kwargs, > > self.name) > > File "/home/brightmap/lib/python2.5/site-packages/Django-1.3-py2.5.egg/ > > django/core/urlresolvers.py" in _get_callback > > 167. raise ViewDoesNotExist("Could not import %s. Error > > was: %s" % (mod_name, str(e))) > > > Exception Type: ViewDoesNotExist at / > > Exception Value: Could not import base.views. Error was: No module > > named io > > > -- > > You received this message because you are subscribed to the Google Groups > > "Django developers" group. > > To post to this group, send email to django-developers@googlegroups.com. > > To unsubscribe from this group, send email to > > django-developers+unsubscr...@googlegroups.com. > > For more options, visit this group > > athttp://groups.google.com/group/django-developers?hl=en. -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: authentication by email
For the record and as an answer to the previous question, I'd like to quote Russell who wrote the following in reponse to a ticket of mine: " The core-endorsed ticket for this problem is #3011. The patch on that ticket isn't endorsed, but it points at the real problem - a need to be able to specify a custom User model. There have been several discussions directed at this problem, and I'm hoping to get a posse discussing this at the upcoming DjangoCon sprints. If you want background on some approaches that might work (and some that won't) search the archives for Lazy Foreign Key. " Thanks Russell and I wish you good luck in the Django sprints! - Wim On Aug 26, 5:23 pm, Wim Feijenwrote: > Hello, > > In the past hour, I did some research on authenticating by email and I > believe Django users would benefit a lot if email authentication was > included in contrib.auth . > > Many people have been working on it, and the latest code I could find > is here:https://gist.github.com/586056. I am not a very good Googler, > so there may be better patches. > > Anyway, there are several problems to solve besides this: > 1. the default AuthenticationForm does not accept usernames longer > than 30 characters > 2. UserCreationForm and possibly the UserChangeForm need to have Email > counterparts or become more flexible > 3. User emails should be unique. My first thought is to add a unique > constraint depending on an optional AUTHENTICATE_BY_EMAIL setting > which defaults to False. I find this problem the hardest to solve. > > I am really open to any suggestions, so please do. > > Luke Plant, Julien Phalip, I know you have looked into this before and > I am really hoping you can share your thoughts as well. > > https://gist.github.com/586056: > > from django.contrib.auth.backends import ModelBackend > from django.contrib.auth.models import User > > class EmailBackend(ModelBackend): > > def authenticate(self, **credentials): > if 'username' in credentials: > return super(EmailBackend, > self).authenticate(**credentials) > > try: > user = User.objects.get(email=credentials.get('email')) > if user.check_password(credentials.get('password')): > return user > except User.DoesNotExist: > return None -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
Re: #13024 Signal sent on application startup
On Mon, Aug 29, 2011 at 5:47 PM, Thomas Guettlerwrote: > Hi, > > I am missing a signal on application startup since a long time. > > Ticket: https://code.djangoproject.com/ticket/13024 You won't get any argument from me, or, I suspect, most of the core team, that there is a solution needed in this space. The only real discussion is how to implement the solution. A signal isn't ideal, because registration of signals is one of the things that needs to be done as part of startup. The good news (which has already been noted on the ticket) is that this is something that is addressed by the App refactor. This branch is feature complete, and is really just waiting on a review from other core developers (including myself, who has been a bit tardy on promises that I've made on this one). Yours, Russ Magee %-) -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
#13024 Signal sent on application startup
Hi, I am missing a signal on application startup since a long time. Ticket: https://code.djangoproject.com/ticket/13024 My usecase: If there are some settings missing, I want add default values. I know that I could use this. settings.configure(default_settings=myapp_defaults, DEBUG=True) See https://docs.djangoproject.com/en/dev/topics/settings/#custom-default-settings But there are too many places, where the settings get loaded. I could write a patch, but this is more a design decision. Thomas -- Thomas Guettler, http://www.thomas-guettler.de/ E-Mail: guettli (*) thomas-guettler + de -- You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com. To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.