Giter VIP home page Giter VIP logo

django-profile's Introduction

==============
Django Profile
==============

This is a user private zone/profile management application, allowing
the user to take control of his account and insert information about
him in his profile.

Inside this package you will find a demo application which will show
you what can be accomplished with the rest of the utilities included
in the package.

For installation instructions, see the file "INSTALL.txt" in this
directory.

django-profile's People

Stargazers

 avatar  avatar

django-profile's Issues

ImageField uses data instead of content

What steps will reproduce the problem?
1. Login and then choose an avatar by uploading from a local file
2. Python exception on views.py::194 photo = photo.content

One line fix: photo = photo.data


Original issue reported on code.google.com by [email protected] on 15 Aug 2008 at 9:42

setup.py missing

It would be useful to have a standard setup.py to install this module into 
a python directory, and so that the module can be submitted to PyPI.

What steps will reproduce the problem?
1. Download django-profile
2. untar djang-profile
3. run ./setup.py

What is the expected output? What do you see instead?
Usage help from distutils


What version of the product are you using? On what operating system?
django-profile-0.6.0
Ubuntu 9.04 Alpha 6

Please provide any additional information below.
A standard setup.py has been included that I have tested with your 
package. I took the liberty of filling in some of the personal information 
with information I found on your google-code page.

Original issue reported on code.google.com by abhishek.mukher.g on 26 Mar 2009 at 3:50

Attachments:

E-mail validation required on registration

Make the e-mail validation required on account registration.

This could be made optional adding a variable on settings.py:

EMAIl_REGISTRATION_REQUIRED = [True || False ]

Original issue reported on code.google.com by [email protected] on 3 Jul 2008 at 8:23

demo - ROOT_PATH variable

File: demo/settings.py

ROOT_PATH = os.path.dirname(__file__)

Use instead:

ROOT_PATH = os.path.abspath(os.path.dirname(__file__))

and the the variable name could be changed to PROJECT_PATH.

Original issue reported on code.google.com by [email protected] on 9 Jun 2008 at 1:05

IOerror: Permission denied

I always get the error when uploading an avatar

IOError at /profiles/profile/edit/avatar/

[Errno 13] Permission denied:
u'/project-folder/media/avatars/2008/Dec/01/myavatar_.jpg'

Point to line 214.

 207.  form = AvatarForm(request.POST, request.FILES)
 208. if form.is_valid():
 209. image = form.cleaned_data.get('url') or form.cleaned_data.get('photo')
 210. avatar = Avatar(user=request.user, image=image, valid=False)
 211. avatar.image.save("%s.jpg" % request.user.username, image)
 212. image = Image.open(avatar.image.path)
 213. image.thumbnail((480, 480), Image.ANTIALIAS)

 214. image.convert("RGB").save(avatar.image.path, "JPEG") ...

 215. avatar.save()
 216. return HttpResponseRedirect('%scrop/' % request.path_info)
 217.
 218. base, filename = os.path.split(avatar_path)
 219. generic, extension = os.path.splitext(filename)

Original issue reported on code.google.com by [email protected] on 1 Dec 2008 at 4:04

Improve the crop&resize javascript code

The javascript code to crop&resize a image is very slow. It relays on the
UI library of Jquery, but the drag function is a little slow.

Furthermore, the resized box must preserve the box proportions, now it
allows to resize horizontal and vertically.

Original issue reported on code.google.com by [email protected] on 30 Nov 2007 at 4:27

django-profile and python-profile

django-profile an the python-profile package, has the same name.

With python-profile installed
In [79]: !python manage.py syncdb
Creating table account_lostpassword
Creating table account_emailvalidate
Installing index for account.LostPassword model
Installing index for account.EmailValidate model

Without python-profile installed
In [80]: !python manage.py syncdb
Creating table profile_profile
Creating table profile_country
Creating table profile_continent
Creating table profile_avatar
Installing index for profile.Profile model
Installing index for profile.Country model
Installing index for profile.Continent model
Installing index for profile.Avatar model

My fix, was uninstalling python-profile

Original issue reported on code.google.com by [email protected] on 14 Apr 2008 at 4:45

idea: send messages with request.user.message_set.create instead of action_done views

I have a basic patch that replaces the action_done views with
django.contrib.auth messages.

pros:

 * makes the UI and code a bit simpler
 * consistent with other apps

cons:

 * prevents customizing messages in templates (still possible with
translations)
 * messages don't have a class[1], so it's necessary to wrap them like <div
class="notice">Message</div>

[1] http://code.djangoproject.com/ticket/3995

Original issue reported on code.google.com by [email protected] on 4 Dec 2008 at 4:48

registration complete redirect broken

not sure if this is something to do with my setup (I have a line like    
(r'^', include('userprofile.urls')), at the bottom of my urls.py) but I get
a 404 at /complete/ after registering. Patch follows.


ericd:django-profile eric$ svn diff
Index: userprofile/views.py
===================================================================
--- userprofile/views.py    (revision 370)
+++ userprofile/views.py    (working copy)
@@ -316,7 +316,7 @@
                 EmailValidation.objects.add(user=newuser, email=newuser.email)

             newuser.save()
-            return HttpResponseRedirect('%scomplete/' % request.path_info)
+            return HttpResponseRedirect(reverse('signup_complete'))
     else:
         form = RegistrationForm()


Original issue reported on code.google.com by [email protected] on 2 Dec 2008 at 1:36

avatars in media disallows symlinking

media/userprofile is good generally, however I like to symlink app media
dirs into my main media dir so that when they are updated the media is
updated too. how about keeping avatars and any other site-generated content
outside media/userprofile?

Original issue reported on code.google.com by [email protected] on 22 Nov 2008 at 4:29

Problem with avatar upload

What steps will reproduce the problem?
1. I am using old revision of django-profile, when i try to upload an
avatar i have 

AttributeError at /accounts/profile/edit/avatar/
'InMemoryUploadedFile' object has no attribute 'content'

Im using the new trunk of Django (I've modiffied django-profile to use
newforms-admin). I won't use new trunk of django-profile because is very
different than the old version. The models have different names etc (My app
is integrated with the old)

Any hints?

Original issue reported on code.google.com by [email protected] on 17 Aug 2008 at 12:10

conflicts of base.html in templates

In the userprofile/templates directory, most of the templates html extends from 
base.html or base_2col.html (which in turn extends base.html)

E.g.
./profile/public.html:{% extends "base.html" %}
./account/password_expired.html:{% extends "base.html" %}
./account/logout.html:{% extends "base.html" %}

Unfortunately a barebone skeleton base.html doesn't quite work. E.g. you can 
see demo/templates/base.html which do include a few userprofile specific css 
files for the templates to work properly. 

Would it be better if we use userprofile_base.html which extends base.html and 
have all the userprofile specific things in there? Similiar argument applies to 
userprofile_base_2col.html.

Thanks
-Aaron

Original issue reported on code.google.com by [email protected] on 10 Nov 2008 at 8:57

generic overview

This is to list all custom Profile model fields in the overview.
Unfortunately, it doesn't know how to format different field types, so it
is rather ugly for dates and file fields, but works for text-oriented
fields. It can be overridden by changing userprofile/overview.html. I'm not
sure if this is better than the current behaviour. Can this be improved?

Original issue reported on code.google.com by [email protected] on 4 Dec 2008 at 7:11

Attachments:

Typo in registration template

Just a minor typo in userprofile/templates/userprofile/registration.html

"You only need to fill the following information to get access to the all
the private content."

There is a "the" too much.

Original issue reported on code.google.com by [email protected] on 13 Jun 2008 at 7:33

personal.html miss submit

seems that the html template to edit users personal informations miss the
submit button.

Relevant code:

{% block content %}
    <form class="personal" action="{{ request.path_info }}" method="post"
enctype="multipart/form-data">
    <fieldset>
        <legend>{% trans "Edit your personal information" %}</legend>
        {{ form.as_p }}
    </form>
{% endblock %}


Something like the code below should be added.
<input type="submit" value="Submit">


Hope this helps,

Fabio Varesano

Original issue reported on code.google.com by [email protected] on 11 Sep 2008 at 2:15

Add captcha on registration

Integrate optionally a captcha framework on registration process to avoid bots.

It could be activated via a settings variable:

CAPTCHA_REGISTRATION = [ True || False ]


One possibility could be:

http://captcha.net

Original issue reported on code.google.com by [email protected] on 3 Jul 2008 at 8:35

Template location setting

I think it would be beneficial to have a setting for the location of
templates. Something like:

TEMPLATE_LOCATION = '/blah/blah/blah/'

Would go in the Settings.py file for the site. I like to keep templates in
one location and would also like to keep compatibility with future releases
without having to change all of the template locations in views.py. 

Original issue reported on code.google.com by [email protected] on 25 Mar 2009 at 10:04

PIL.Image is imported incorrectly, ImportError

Hi, great work on django-profile, I really appreciate the polish.

The way PIL.Image is imported will only work if PIL was installed using an
unsupported easy_install line (most people already have PIL through their
OS vendor). See http://mail.python.org/pipermail/image-sig/2007-May/004451.html

attached patch fixes the imports I found, but I did not grep for "Image"

Original issue reported on code.google.com by [email protected] on 10 Nov 2008 at 5:30

Attachments:

Templates for email

Could be used the extenseion 'txt' instead of 'html' to send emails as
text. And to use an extra template for the subject.

Example:

user_email.html -> user_email.txt

user_email-subject.txt
------------
{{ SITE_NAME }}: Activate your account
------------

Original issue reported on code.google.com by [email protected] on 24 Jun 2008 at 6:09

package registration form as a template tag

This allows placing the registration form on the frontpage etc.

Usage:
{% load account %}
{% registration_form %}

 - adds a template tag "registration_form" to show the registration form
 - factors out the actual registration form

The form submits to the register view. Redirection after successful form
submission happens as usual (so you won't go back to the originating page)

One side-effect is that the main reg form action is now "{% url
userprofile.views.register %}" instead of "" but this seems ok

Original issue reported on code.google.com by [email protected] on 22 Nov 2008 at 4:23

Attachments:

latitude/longitude in mysql

current latitude/longitude fielelds have this params:
DecimalField(max_digits=8, decimal_places=6, default=-100)

It fails on Mysql (4.1) with "Data trancation" warning when when the 
default value provided(-100)

Coorect needs to be: max_digits=9

Original issue reported on code.google.com by [email protected] on 5 Mar 2008 at 1:56

Colon in forms

I think that the colon in the forms fields doesn't contribute anything and
it looks better without them.

Original issue reported on code.google.com by [email protected] on 24 Jun 2008 at 5:46

Context processor for variables related to Site

userprofile/context_processors.py
------------
from django.contrib.sites.models import Site


def site(request):
    """Adds site-related context variables to the context.
    """
    current_site = Site.objects.get_current()

    return {
        'SITE_NAME': current_site.name,
        'SITE_DOMAIN': current_site.domain,
        'SITE_URL': "http://www.%s" % (current_site.domain),
    }
------------


Setup on settings file:

* To add 'django.contrib.sites' on INSTALLED_APPS.
* To add:
TEMPLATE_CONTEXT_PROCESSORS += ('userprofile.context_processors.site',)
* Change the data -Site name and site domain- from Site (via Admin or using
fixtures)


And now it's possible use {{ SITE_NAME }}, {{ SITE_DOMAIN }} and {{
SITE_URL }} on the templates.

Original issue reported on code.google.com by [email protected] on 24 Jun 2008 at 10:31

TypeError at /accounts/profile/edit/avatar/crop/ in Firefox only

Adding or changing an avatar in firefox results in this error after 
submitting the crop. It does not happen in IE. Any ideas?

Below is the traceback.

Environment:

Request Method: POST
Request URL: http://somesite.com/accounts/profile/edit/avatar/crop/
Django Version: 1.0-final-SVN-unknown
Python Version: 2.5.1
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'django.contrib.admindocs',
 'myproject.step',
 'myproject.homepage',
 'userprofile',
 'myproject.customprofile',
 'sorl.thumbnail',
 'gdata',
 'atom']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "path/to/lib/python2.5/django/core/handlers/base.py" in get_response
  86.                 response = callback(request, *callback_args, 
**callback_kwargs)
File "/path/to/lib/python2.5/django/contrib/auth/decorators.py" in __call__
  67.             return self.view_func(request, *args, **kwargs)
File "/path/to/lib/python2.5/site-packages/userprofile/views.py" in 
avatarcrop
  245.         if form.is_valid():
File "/path/to/lib/python2.5/django/forms/forms.py" in is_valid
  120.         return self.is_bound and not bool(self.errors)
File "/path/to/lib/python2.5/django/forms/forms.py" in _get_errors
  111.             self.full_clean()
File "/path/to/lib/python2.5/django/forms/forms.py" in full_clean
  234.             self.cleaned_data = self.clean()
File "/path/to/lib/python2.5/site-packages/userprofile/forms.py" in clean
  76.         if int(self.cleaned_data.get('right')) - int
(self.cleaned_data.get('left')) < 96:

Exception Type: TypeError at /accounts/profile/edit/avatar/crop/
Exception Value: int() argument must be a string or a number, 
not 'NoneType'



Original issue reported on code.google.com by [email protected] on 31 Mar 2009 at 1:34

Serving media from Django only in development

Using the next code to let serving media from Django only in development.
In addition it uses the variables -MEDIA_URL and MEDIA_ROOT- directly from
the settings file.


demo/urls.py
-----------------
# Serves media content. WARNING!! Only for development uses.
# On production use lighthttpd for media content.
if settings.DEBUG:

    # Delete the first trailing slash, if any.
    if settings.MEDIA_URL.startswith('/'):
        media_url = settings.MEDIA_URL[1:]
    else:
        media_url = settings.MEDIA_URL

    # Add the last trailing slash, if have not.
    if not media_url.endswith('/'):
        media_url = media_url + '/'

    urlpatterns += patterns('',
        (r'^' + media_url + '(?P<path>.*)$', 'django.views.static.serve',
            {'document_root': settings.MEDIA_ROOT}
        ),
    )
-----------------

Original issue reported on code.google.com by [email protected] on 25 Jun 2008 at 9:29

Attachments:

UnparsableUrlObject: Unable to parse url parameter because it was not a string or atom.url.Url with gdata-1.2.2

I recently upgraded userprofile from 0.5 to 0.6 and it works great with Django 
1.0 except the Picasa Avatar photo 
search part.

Steps to reproduce:
1. Visit /accounts/profile/edit/avatar/search/
2. Do a search on PicasaWeb

Like 0.5, I expect to see a list of thumbnails. Instead I got the following 
stacktrace:
It appears that we are expecting a URL but instead we got a URI. 

I probably can debug further but if you have seen this and know the fix, pls 
let me know. Thanks
-Aaron

Traceback (most recent call last):
  File "/usr/local/src/djtrunk/django/core/servers/basehttp.py", line 635, in __call__
    return self.application(environ, start_response)
  File "/usr/local/src/djtrunk/django/core/handlers/wsgi.py", line 239, in __call__
    response = self.get_response(request)
  File "/usr/local/src/djtrunk/django/core/handlers/base.py", line 128, in get_response
    return self.handle_uncaught_exception(request, resolver, exc_info)
  File "/usr/local/src/djtrunk/django/core/handlers/base.py", line 148, in handle_uncaught_exception
    return debug.technical_500_response(request, *exc_info)
  File "/usr/local/src/djtrunk/django/core/handlers/base.py", line 86, in get_response
    response = callback(request, *callback_args, **callback_kwargs)
  File "/usr/local/src/djtrunk/django/contrib/auth/decorators.py", line 67, in __call__
    return self.view_func(request, *args, **kwargs)
  File "/usr/local/src/userprofile-trunk/userprofile/views.py", line 97, in searchimages
    feed = gd_client.SearchCommunityPhotos("%s&thumbsize=72c" % keyword.split(" ")[0], limit='48')
  File "/usr/lib/python2.4/site-packages/gdata/photos/service.py", line 290, in SearchCommunityPhotos
    return self.GetFeed(uri, limit=limit)
  File "/usr/lib/python2.4/site-packages/gdata/photos/service.py", line 182, in GetFeed
    return self.Get(uri, converter=gdata.photos.AnyFeedFromString)
  File "/usr/lib/python2.4/site-packages/gdata/service.py", line 700, in Get
    headers=extra_headers)
  File "/usr/lib/python2.4/site-packages/atom/service.py", line 176, in request
    data=data, headers=all_headers)
  File "/usr/lib/python2.4/site-packages/atom/http_interface.py", line 148, in perform_request
    return http_client.request(operation, url, data=data, headers=headers)
  File "/usr/lib/python2.4/site-packages/atom/http.py", line 86, in request
    raise atom.http_interface.UnparsableUrlObject('Unable to parse url '
UnparsableUrlObject: Unable to parse url parameter because it was not a string 
or atom.url.Url

Original issue reported on code.google.com by [email protected] on 7 Nov 2008 at 12:12

URLs wrong

In the templates, all urls starts by '/accounts/' but on install
documentation [1] says that it must start by '/profile/':

(r'^profile/', include('userprofile.urls')),


[1] http://code.google.com/p/django-profile/source/browse/trunk/INSTALL.txt

Original issue reported on code.google.com by [email protected] on 24 Jun 2008 at 4:50

TemplateSyntaxErrors on latest trunk

What steps will reproduce the problem?

    1. Setup django-profile with latest Django trunk

What is the expected output? What do you see instead?

    "'blocktrans' doesn't allow other block tags inside it" errors on most
templates that include this functionality.

What version of the product are you using? On what operating system?

    Latest trunk of Django, all systems.

Please provide any additional information below.

    I'm going to look into it ans see if I can't write it to play nice with
the trunk.

Original issue reported on code.google.com by [email protected] on 3 Aug 2008 at 10:44

"No module named magic" for the last rev of Django

I upgrade django to the last rev of the SVN. And to get this error, trying
to enter /admin/

<pre>
Environment:

Request Method: GET
Request URL: http://tesis/admin/
Django Version: 0.97-pre-SVN-7510
Python Version: 2.5.2
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'tesis.customer',
 'userprofile',
 'account',
 'tesis.employee',
 'tesis.callcenter',
 'tesis.pos',
 'tesis.tax']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.doc.XViewMiddleware')

Template error:
In template
/var/www/django-projects/tesis/site-packages/tesis/templates/admin/base.html,
error at line 28
   Caught an exception while rendering: Error while importing URLconf
'userprofile.urls': No module named magic
   18 :     {% if not is_popup %}
   19 :     <!-- Header -->
   20 :     <div id="header">
   21 :         <div id="branding">
   22 :         {% block branding %}{% endblock %}
   23 :         </div>
   24 :         {% if user.is_authenticated and user.is_staff %}
   25 :         <div id="user-tools">
   26 :         {% trans 'Welcome,' %} <strong>{% if user.first_name %}{{
user.first_name|escape }}{% else %}{{ user.username }}{% endif %}</strong>.
   27 :         {% block userlinks %}
   28 :         <a href=" {% url django.contrib.admin.views.doc.doc_index
%} ">{% trans 'Documentation' %}</a>
   29 :         / <a href="{% url django.contrib.auth.views.password_change
%}">{% trans 'Change password' %}</a>
   30 :         / <a href="{% url django.contrib.auth.views.logout %}">{%
trans 'Log out' %}</a>
   31 :         {% endblock %}
   32 :         </div>
   33 :         {% endif %}
   34 :         {% block nav-global %}{% endblock %}
   35 :     </div>
   36 :     <!-- END Header -->
   37 :     {% block breadcrumbs %}
   38 :         <div class="breadcrumbs"><a href="/">{% trans 'Home' %}</a>{%
if title %} &rsaquo; {{ title|escape }}{% endif %}</div>

Traceback:
File "/usr/lib/python2.5/site-packages/django/template/debug.py" in render_node
  71.             result = node.render(context)
File "/usr/lib/python2.5/site-packages/django/template/defaulttags.py" in
render
  363.             return reverse(self.view_name, args=args, kwargs=kwargs)
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in reverse
  297.     return iri_to_uri(u'/' + get_resolver(urlconf).reverse(viewname,
*args, **kwargs))
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in reverse
  282.         if lookup_view in self.reverse_dict:
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in
_get_reverse_dict
  218.                     for key, value in pattern.reverse_dict.iteritems():
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in
_get_reverse_dict
  215.         if not self._reverse_dict and hasattr(self.urlconf_module,
'urlpatterns'):
File "/usr/lib/python2.5/site-packages/django/core/urlresolvers.py" in
_get_urlconf_module
  255.                 raise ImproperlyConfigured, "Error while importing
URLconf %r: %s" % (self.urlconf_name, e)

Exception Type: ImproperlyConfigured at /admin/
Exception Value: Error while importing URLconf 'userprofile.urls': No
module named magic
</pre>

I See that maybe the new admin app try to reverse the urls using url
function when the urls has names. See here:
http://www.djangoproject.com/documentation/url_dispatch/#naming-url-patterns

I fix the problem modifing urls.py of the userprofile app, for example from:
  (r'^save/$', save),
to:
  url(r'^save/$', save),

After that, everything works fine. I see that must of the apps has already
using url() instead the tuples.

Original issue reported on code.google.com by [email protected] on 4 May 2008 at 6:31

SMTPRecipientsRefused on demo site

SMTPRecipientsRefused at /accounts/email/change/
{u'[email protected]': (504, '5.5.2 <webmaster@localhost>: Sender address
rejected: need fully-qualified address')}
Request Method:     POST
Request URL:    http://profile.coredump.es/accounts/email/change/
Exception Type:     SMTPRecipientsRefused
Exception Value:    {u'[email protected]': (504, '5.5.2
<webmaster@localhost>: Sender address rejected: need fully-qualified address')}
Exception Location:     /var/www/sites/coredump.es/shared/django/core/mail.py
in _send, line 187
Python Executable:  /usr/bin/python
Python Version:     2.4.4
Traceback (innermost last)
Switch back to interactive view

    * /var/www/sites/coredump.es/shared/django/core/handlers/base.py in
get_response
        74. # Apply view middleware
        75. for middleware_method in self._view_middleware:
        76. response = middleware_method(request, callback, callback_args,
callback_kwargs)
        77. if response:
        78. return response
        79.
        80. try:
        81. response = callback(request, *callback_args, **callback_kwargs) ...
        82. except Exception, e:
        83. # If the view raised an exception, run it through exception
        84. # middleware, and if the exception middleware returns a
        85. # response, use that. Otherwise, reraise the exception.
        86. for middleware_method in self._exception_middleware:
        87. response = middleware_method(request, e)
      ▶ Local vars
      Variable  Value
      callback  
      <function email_change at 0x8d7db8c>
      callback_args     
      ()
      callback_kwargs   
      {'template': 'account/email_change.html'}
      debug     
      <module 'django.views.debug' from
'/var/www/sites/coredump.es/shared/django/views/debug.py'>
      e     
      <smtplib.SMTPRecipientsRefused instance at 0x8dd8fcc>
      exceptions    
      <module 'django.core.exceptions' from
'/var/www/sites/coredump.es/shared/django/core/exceptions.py'>
      mail_admins   
      <function mail_admins at 0x87426bc>
      middleware_method     
      <bound method XViewMiddleware.process_view of
<django.middleware.doc.XViewMiddleware object at 0x877666c>>
      request   
      <ModPythonRequest\npath:/accounts/email/change/,\nGET:<QueryDict:
{}>,\nPOST:<QueryDict: {u'email':
[u'[email protected]']}>,\nCOOKIES:{'sessionid':
'4c1e20d25f231cdca45362fc9cc404ab'},\nMETA:{'AUTH_TYPE': None,\n
'CONTENT_LENGTH': 0L,\n 'CONTENT_TYPE': None,\n 'GATEWAY_INTERFACE':
'CGI/1.1',\n 'HTTP_ACCEPT':
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8
,image/png,*/*;q=0.5',\n
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',\n 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5',\n 'HTTP_CACHE_CONTROL': 'max-age=259200',\n
'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_CONTENT_LENGTH': '25',\n
'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'HTTP_COOKIE':
'sessionid=4c1e20d25f231cdca45362fc9cc404ab',\n 'HTTP_HOST':
'profile.coredump.es',\n 'HTTP_REFERER':
'http://profile.coredump.es/accounts/email/change/',\n 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11)
Gecko/20071127 Firefox/2.0.0.11',\n 'HTTP_VIA': '1.1
square.dottedmag.net:3128 (squid/2.6.STABLE5), 1.0 belphegor.rulim.de:3128
(squid/2.6.STABLE13)',\n 'HTTP_X_FORWARDED_FOR': '192.168.0.100,
217.79.61.36',\n 'PATH_INFO': '/accounts/email/change/',\n
'PATH_TRANSLATED': None,\n 'QUERY_STRING': None,\n 'REMOTE_ADDR':
'212.75.33.110',\n 'REMOTE_HOST': None,\n 'REMOTE_IDENT': None,\n
'REMOTE_USER': None,\n 'REQUEST_METHOD': 'POST',\n 'SCRIPT_NAME': None,\n
'SERVER_NAME': 'profile.coredump.es',\n 'SERVER_PORT': 0,\n
'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SOFTWARE': 'mod_python'}>
      resolver  
      <RegexURLResolver demo.urls ^/>
      response  
      None
      self  
      <django.core.handlers.modpython.ModPythonHandler object at 0x8c3728c>
      settings  
      <django.conf.LazySettings object at 0x874dacc>
      urlconf   
      'demo.urls'
      urlresolvers  
      <module 'django.core.urlresolvers' from
'/var/www/sites/coredump.es/shared/django/core/urlresolvers.py'>
    * /var/www/sites/coredump.es/django-profile/account/views.py in
email_change
        54. EmailValidate.objects.filter(user=user, email=email).delete()
        55. validate = EmailValidate(user=user, email=email,
key=email_new_key())
        56.
        57. site = Site.objects.get_current()
        58. site_name = site.name
        59. t = loader.get_template('account/email_change_confirmation.txt')
        60. message = 'http://%s/accounts/email/change/%s/' % (site_name,
validate.key)
        61. send_mail('Email change confirmation on %s' % site.name,
t.render(Context(locals())), None, [email]) ...
        62. validate.save()
        63.
        64. return HttpResponseRedirect('%sprocessed/' % request.path)
        65. else:
        66. form = EmailChangeForm()
  67.
      ▶ Local vars
      Variable  Value
      email     
      u'[email protected]'
      form  
      <account.forms.EmailChangeForm object at 0x8cedfcc>
      message   

u'http://example.com/accounts/email/change/umhxzkE9DhmGqekZaRZnwcJVBQjh3j6gpwAag
rYtzkGLP4B4ddfWYR4bBh6neE6zaCFBqu/'
      request   
      <ModPythonRequest\npath:/accounts/email/change/,\nGET:<QueryDict:
{}>,\nPOST:<QueryDict: {u'email':
[u'[email protected]']}>,\nCOOKIES:{'sessionid':
'4c1e20d25f231cdca45362fc9cc404ab'},\nMETA:{'AUTH_TYPE': None,\n
'CONTENT_LENGTH': 0L,\n 'CONTENT_TYPE': None,\n 'GATEWAY_INTERFACE':
'CGI/1.1',\n 'HTTP_ACCEPT':
'text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8
,image/png,*/*;q=0.5',\n
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',\n
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',\n 'HTTP_ACCEPT_LANGUAGE':
'en-us,en;q=0.5',\n 'HTTP_CACHE_CONTROL': 'max-age=259200',\n
'HTTP_CONNECTION': 'keep-alive',\n 'HTTP_CONTENT_LENGTH': '25',\n
'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded',\n 'HTTP_COOKIE':
'sessionid=4c1e20d25f231cdca45362fc9cc404ab',\n 'HTTP_HOST':
'profile.coredump.es',\n 'HTTP_REFERER':
'http://profile.coredump.es/accounts/email/change/',\n 'HTTP_USER_AGENT':
'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11)
Gecko/20071127 Firefox/2.0.0.11',\n 'HTTP_VIA': '1.1
square.dottedmag.net:3128 (squid/2.6.STABLE5), 1.0 belphegor.rulim.de:3128
(squid/2.6.STABLE13)',\n 'HTTP_X_FORWARDED_FOR': '192.168.0.100,
217.79.61.36',\n 'PATH_INFO': '/accounts/email/change/',\n
'PATH_TRANSLATED': None,\n 'QUERY_STRING': None,\n 'REMOTE_ADDR':
'212.75.33.110',\n 'REMOTE_HOST': None,\n 'REMOTE_IDENT': None,\n
'REMOTE_USER': None,\n 'REQUEST_METHOD': 'POST',\n 'SCRIPT_NAME': None,\n
'SERVER_NAME': 'profile.coredump.es',\n 'SERVER_PORT': 0,\n
'SERVER_PROTOCOL': 'HTTP/1.0',\n 'SERVER_SOFTWARE': 'mod_python'}>
      send_mail     
      <function send_mail at 0x8742294>
      site  
      <Site: example.com>
      site_name     
      u'example.com'
      t     
      <django.template.Template object at 0x869250c>
      template  
      'account/email_change.html'
      user  
      <User: buriy>
      validate  
      <EmailValidate: EmailValidate object>
    * /var/www/sites/coredump.es/shared/django/core/mail.py in send_mail
       323. If auth_password is None, the EMAIL_HOST_PASSWORD setting is used.
       324.
       325. NOTE: This method is deprecated. It exists for backwards
compatibility.
       326. New code should use the EmailMessage class directly.
       327. """
       328. connection = SMTPConnection(username=auth_user,
password=auth_password,
       329. fail_silently=fail_silently)
       330. return EmailMessage(subject, message, from_email,
recipient_list, connection=connection).send() ...
       331.
       332. def send_mass_mail(datatuple, fail_silently=False,
auth_user=None, auth_password=None):
       333. """
       334. Given a datatuple of (subject, message, from_email,
recipient_list), sends
       335. each message to each recipient list. Returns the number of
e-mails sent.
 336.
      ▶ Local vars
      Variable  Value
      auth_password     
      None
      auth_user     
      None
      connection    
      <django.core.mail.SMTPConnection object at 0x8d763ec>
      fail_silently     
      False
      from_email    
      None
      message   
      u"\nYou're receiving this e-mail because you requested a password
reset\nfor your user account at example.com.\n\nFeel free to change this
password by going to this
page:\n\nhttp://example.com/accounts/email/change/umhxzkE9DhmGqekZaRZnwcJVBQjh3j
6gpwAagrYtzkGLP4B4ddfWYR4bBh6neE6zaCFBqu/\n\nYour
username, in case you've forgotten: buriy\n\nThanks for using our
site!\n\nThe example.com team\n"
      recipient_list    
      [u'[email protected]']
      subject   
      u'Email change confirmation on example.com'
    * /var/www/sites/coredump.es/shared/django/core/mail.py in send
       252. Returns a list of all recipients of the email (includes direct
       253. addressees as well as Bcc entries).
       254. """
       255. return self.to + self.bcc
       256.
       257. def send(self, fail_silently=False):
       258. """Send the email message."""
       259. return self.get_connection(fail_silently).send_messages([self]) ...
       260.
       261. def attach(self, filename=None, content=None, mimetype=None):
       262. """
       263. Attaches a file with the given filename and content. The
filename can
       264. be omitted (useful for multipart/alternative messages) and the
mimetype
       265. is guessed, if not provided.
      ▶ Local vars
      Variable  Value
      fail_silently     
      False
      self  
      <django.core.mail.EmailMessage object at 0x8d630ac>
    * /var/www/sites/coredump.es/shared/django/core/mail.py in send_messages
       166. return
       167. new_conn_created = self.open()
       168. if not self.connection:
       169. # We failed silently on open(). Trying to send would be pointless.
       170. return
       171. num_sent = 0
       172. for message in email_messages:
       173. sent = self._send(message) ...
       174. if sent:
       175. num_sent += 1
       176. if new_conn_created:
       177. self.close()
       178. return num_sent
 179.
      ▶ Local vars
      Variable  Value
      email_messages    
      [<django.core.mail.EmailMessage object at 0x8d630ac>]
      message   
      <django.core.mail.EmailMessage object at 0x8d630ac>
      new_conn_created  
      True
      num_sent  
      0
      self  
      <django.core.mail.SMTPConnection object at 0x8d763ec>
    * /var/www/sites/coredump.es/shared/django/core/mail.py in _send
       180. def _send(self, email_message):
       181. """A helper method that does the actual sending."""
       182. if not email_message.to:
       183. return False
       184. try:
       185. self.connection.sendmail(email_message.from_email,
       186. email_message.recipients(),
       187. email_message.message().as_string()) ...
       188. except:
       189. if not self.fail_silently:
       190. raise
       191. return False
       192. return True
 193.
      ▶ Local vars
      Variable  Value
      email_message     
      <django.core.mail.EmailMessage object at 0x8d630ac>
      self  
      <django.core.mail.SMTPConnection object at 0x8d763ec>

Traceback (most recent call last):
File "/var/www/sites/coredump.es/shared/django/core/handlers/base.py" in
get_response
  81. response = callback(request, *callback_args, **callback_kwargs)
File "/var/www/sites/coredump.es/django-profile/account/views.py" in
email_change
  61. send_mail('Email change confirmation on %s' % site.name,
t.render(Context(locals())), None, [email])
File "/var/www/sites/coredump.es/shared/django/core/mail.py" in send_mail
  330. return EmailMessage(subject, message, from_email, recipient_list,
connection=connection).send()
File "/var/www/sites/coredump.es/shared/django/core/mail.py" in send
  259. return self.get_connection(fail_silently).send_messages([self])
File "/var/www/sites/coredump.es/shared/django/core/mail.py" in send_messages
  173. sent = self._send(message)
File "/var/www/sites/coredump.es/shared/django/core/mail.py" in _send
  187. email_message.message().as_string())

  SMTPRecipientsRefused at /accounts/email/change/
  {u'[email protected]': (504, '5.5.2 <webmaster@localhost>: Sender address
rejected: need fully-qualified address')}

Original issue reported on code.google.com by [email protected] on 2 Dec 2007 at 8:34

GMAIL Server issue related to Install.txt

# e-mail settings in settings.py (as described in the Install.txt"
DEFAULT_FROM_EMAIL = '[email protected]'
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_HOST_USER = '[email protected]'
EMAIL_HOST_PASSWORD = 'madeuppassword'

Then python manage.py runserver 
Try to create a user from the browser.

Error message is:

SMTP AUTH extension not supported by server

Version 0.6 and Django 1.0

To correct the problem:
The install document might mention that for the gmail server the user needs
to also have the following two lines in the settings.py file.

EMAIL_USE_TLS = True 
EMAIL_PORT = "587"  #this line may not be required.




Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 3 Oct 2008 at 9:45

User choice is missing on the Admin Interface

Aunque usando los formularios de django-profile se pueden añadir perfiles
normalmente y asociarlos a un usuario, a traves de la interfaz de
administración el campo de usuario no esta habilitado.

La llave esta creada en la base de datos, pero el campo no aparece en el
formulario de la interfaz de administración. Por lo que al crear o tratar
de editar un perfil siempre da el error:

(1048, "Column 'user_id' cannot be null")

¿Este comportamiento es intencional?

Cambiando de OneToOne a ForeignKey y añadiendo unas reglas se puede
arreglar el problema.

Original issue reported on code.google.com by [email protected] on 23 Jul 2008 at 5:40

install docs miss GENDER_CHOICES

Install instructions available for the Profile model use GENDER_CHOICES
which is not inserted in that code (is only available on demoprofile
models.py).

This might be tricky for newbies.


Hope this helps,
Regards,

Fabio Varesano

Original issue reported on code.google.com by [email protected] on 10 Sep 2008 at 4:43

Re-design the public information selection page

There's no need to have an independent public information selection form.
It makes the user profile zone less usable.

It could be merged with the information addition forms, but they need to be
as easy as possible.

Original issue reported on code.google.com by [email protected] on 3 Jul 2008 at 10:35

Incorrect variable name / typo

In account/email_validation_done.html  the variable 'successfull' is being used 
in an if statement. 
However it looks as if the variable is being set as 'successful' in 
userprofile.views.email_validation_process

The value in the template should probably be changed as the value being set 
views.py is the correct 
spelling. 

Cheers, 

JamieC

Original issue reported on code.google.com by [email protected] on 6 Sep 2008 at 6:56

Templates in sub-directories

I think that would be better if the templates would be in different
subdirectories -where they're related-, as:

email/ email*
password/ password*
registration/ registration*, validation*, user_email.html
profile/ avatar*, delete*, usercard.html, makepublic.html

Original issue reported on code.google.com by [email protected] on 24 Jun 2008 at 5:31

Windows problem

os.path.join joins the path with "\" on windows.


temporary solution:
file: templatetags\avatars 
url.replace("\\","/")

Original issue reported on code.google.com by [email protected] on 16 Dec 2008 at 5:50

Problem on displaying Avatar

The templatetag avatar contains a little problem, it doesn't resolve the
user variable correctly.

My Django is the svn trunk.

The render method of the ResizedThumbnailMode is trying to access variable
request.user in context which leads to a error.

If self.user is Variable("user") everything works fine, but the Thumbnail
function always passes username argument as 'request.user' to
ResizedThumbnailMode.

Original issue reported on code.google.com by [email protected] on 28 Feb 2009 at 6:43

hard coded media url

class Avatar(models.Model): 
...
def get_absolute_url(self):
        return "/site_media/%s" % self.photo

site_media is hardcoded
It would be better to get this url from settings (settings.MEDIA_URL)

Thanks


Original issue reported on code.google.com by [email protected] on 5 Mar 2008 at 2:15

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.