Is it worth refactoring a version 2 of django app to use reusable app

2012-03-05 Thread Amit Sethi
Hi all, My question is very simple , Is it worth refactoring an
existing and running app  for its version 2 , such that it uses
reusable apps. Also is there a nice blog post on the benefits of
reusable apps

-- 
A-M-I-T S|S

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



django registration

2012-03-05 Thread Stanwin Siow
Greetings,

How do i save a user's profile into the database once i entered the details in 
my custom registration form?

Also right now when i'm testing it out, i get the following error:

create_inactive_user() got an unexpected keyword argument 'profile_callback'
What could be the problem here?

Am i overriding the original form correctly?

Appreciate any inputs. Cheers

here are the snippets you require:

Forms.py

from django import forms
from r2.models import Keyword
from r2.models import UserProfile
from registration.forms import RegistrationForm
from registration.models import RegistrationProfile
from django.utils.translation import ugettext_lazy as _
from registration.forms import RegistrationForm, attrs_dict

class ProjectSpecificRegistrationForm(RegistrationForm):
keywords = forms.ModelChoiceField(queryset=Keyword.objects.all())
first_name 
=forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'First 
Name')) 
last_name 
=forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'Last Name'))

def save(self):
new_user = 
RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'],
password=self.cleaned_data['password1'],
email=self.cleaned_data['email'])
new_profile = 
UserProfile(user=new_user,username=self.cleaned_data['username'], 
keywords_subscribed=self.cleaned_data['keywords'],first_name=self.cleaned_data['first_name'],last_name=self.cleaned_data['last_name'])

new_profile.save()

project urls.py

from r2.registration.views import activate
from r2.registration.views import register
from r2.forms import ProjectSpecificRegistrationForm

url(r'^accounts/', include('registration.urls')),
#url(r'^accounts/profile/', 'r2.views.profile'),
url(r'^keyword_subscribe/$', 'r2.views.keyword_subscribe'),
url(r'^refresh_list/$', 'r2.views.refresh_list'),
url(r'^test/$', 'r2.views.test'),

#registrations URLS

url(r'^activate/(?P\w+)/$',activate,name='registration_activate'),
url(r'^login/$',auth_views.login,{'template_name': 
'registration/login.html'}, name='auth_login'),
url(r'^logout/$',auth_views.logout,{'template_name': 
'registration/logout.html'},name='auth_logout'),

url(r'^password/change/$',auth_views.password_change,name='auth_password_change'),

url(r'^password/change/done/$',auth_views.password_change_done,name='auth_password_change_done'),

url(r'^password/reset/$',auth_views.password_reset,name='auth_password_reset'),

url(r'^password/reset/confirm/(?P[0-9A-Za-z]+)-(?P.+)/$',auth_views.password_reset_confirm,name='auth_password_reset_confirm'),

url(r'^password/reset/complete/$',auth_views.password_reset_complete,name='auth_password_reset_complete'),

url(r'^password/reset/done/$',auth_views.password_reset_done,name='auth_password_reset_done'),
url(r'^register/$',register, {'form_class' : 
ProjectSpecificRegistrationForm},  name='registration_register'),

url(r'^register/complete/$',direct_to_template,{'template': 
'registration/registration_complete.html'},name='registration_complete'),




Best Regards,

Stanwin Siow



-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django registration

2012-03-05 Thread nicolas HERSOG
I looked at my code in order to notice diffs.

You should add return new_user() after your new_profile.save()


On Mon, Mar 5, 2012 at 11:54 AM, Stanwin Siow wrote:

> Greetings,
>
> How do i save a user's profile into the database once i entered the
> details in my custom registration form?
>
> Also right now when i'm testing it out, i get the following error:
>
> create_inactive_user() got an unexpected keyword argument 'profile_callback'
>
> What could be the problem here?
>
> Am i overriding the original form correctly?
>
> Appreciate any inputs. Cheers
>
> here are the snippets you require:
>
> *Forms.py*
> *
> *
> from django import forms
> from r2.models import Keyword
> from r2.models import UserProfile
> from registration.forms import RegistrationForm
> from registration.models import RegistrationProfile
> from django.utils.translation import ugettext_lazy as _
> from registration.forms import RegistrationForm, attrs_dict
>
> class ProjectSpecificRegistrationForm(RegistrationForm):
> keywords = forms.ModelChoiceField(queryset=Keyword.objects.all())
> first_name
> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'First
> Name'))
> last_name
> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'Last
> Name'))
>
> def save(self):
> new_user =
> RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'],
> password=self.cleaned_data['password1'],
> email=self.cleaned_data['email'])
> new_profile =
> UserProfile(user=new_user,username=self.cleaned_data['username'],
> keywords_subscribed=self.cleaned_data['keywords'],first_name=self.cleaned_data['first_name'],last_name=self.cleaned_data['last_name'])
>
> new_profile.save()
>
> *project urls.py*
>
> from r2.registration.views import activate
> from r2.registration.views import register
> from r2.forms import ProjectSpecificRegistrationForm
>
> url(r'^accounts/', include('registration.urls')),
> #url(r'^accounts/profile/', 'r2.views.profile'),
> url(r'^keyword_subscribe/$', 'r2.views.keyword_subscribe'),
> url(r'^refresh_list/$', 'r2.views.refresh_list'),
> url(r'^test/$', 'r2.views.test'),
>
> #registrations URLS
>
> url(r'^activate/(?P\w+)/$',activate,name='registration_activate'),
> url(r'^login/$',auth_views.login,{'template_name':
> 'registration/login.html'}, name='auth_login'),
> url(r'^logout/$',auth_views.logout,{'template_name':
> 'registration/logout.html'},name='auth_logout'),
>
> url(r'^password/change/$',auth_views.password_change,name='auth_password_change'),
>
> url(r'^password/change/done/$',auth_views.password_change_done,name='auth_password_change_done'),
>
> url(r'^password/reset/$',auth_views.password_reset,name='auth_password_reset'),
>
> url(r'^password/reset/confirm/(?P[0-9A-Za-z]+)-(?P.+)/$',auth_views.password_reset_confirm,name='auth_password_reset_confirm'),
>
> url(r'^password/reset/complete/$',auth_views.password_reset_complete,name='auth_password_reset_complete'),
>
> url(r'^password/reset/done/$',auth_views.password_reset_done,name='auth_password_reset_done'),
> url(r'^register/$',register, {'form_class' :
> ProjectSpecificRegistrationForm},  name='registration_register'),
>
> url(r'^register/complete/$',direct_to_template,{'template':
> 'registration/registration_complete.html'},name='registration_complete'),
>
>
>
>
> Best Regards,
>
> Stanwin Siow
>
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django registration

2012-03-05 Thread Stanwin Siow
Even after doing that, 

The error still occurs. And my data is still unsaved in the database.

Should i be creating a backend?

Best Regards,

Stanwin Siow



On Mar 5, 2012, at 7:13 PM, nicolas HERSOG wrote:

> I looked at my code in order to notice diffs.
> 
> You should add return new_user() after your new_profile.save()
> 
> 
> On Mon, Mar 5, 2012 at 11:54 AM, Stanwin Siow  
> wrote:
> Greetings,
> 
> How do i save a user's profile into the database once i entered the details 
> in my custom registration form?
> 
> Also right now when i'm testing it out, i get the following error:
> 
> create_inactive_user() got an unexpected keyword argument 'profile_callback'
> What could be the problem here?
> 
> Am i overriding the original form correctly?
> 
> Appreciate any inputs. Cheers
> 
> here are the snippets you require:
> 
> Forms.py
> 
> from django import forms
> from r2.models import Keyword
> from r2.models import UserProfile
> from registration.forms import RegistrationForm
> from registration.models import RegistrationProfile
> from django.utils.translation import ugettext_lazy as _
> from registration.forms import RegistrationForm, attrs_dict
> 
> class ProjectSpecificRegistrationForm(RegistrationForm):
> keywords = forms.ModelChoiceField(queryset=Keyword.objects.all())
> first_name 
> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'First 
> Name')) 
> last_name 
> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'Last 
> Name'))
> 
> def save(self):
> new_user = 
> RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'],
> password=self.cleaned_data['password1'],
> email=self.cleaned_data['email'])
> new_profile = 
> UserProfile(user=new_user,username=self.cleaned_data['username'], 
> keywords_subscribed=self.cleaned_data['keywords'],first_name=self.cleaned_data['first_name'],last_name=self.cleaned_data['last_name'])
> 
> new_profile.save()
> 
> project urls.py
> 
> from r2.registration.views import activate
> from r2.registration.views import register
> from r2.forms import ProjectSpecificRegistrationForm
> 
> url(r'^accounts/', include('registration.urls')),
> #url(r'^accounts/profile/', 'r2.views.profile'),
> url(r'^keyword_subscribe/$', 'r2.views.keyword_subscribe'),
> url(r'^refresh_list/$', 'r2.views.refresh_list'),
> url(r'^test/$', 'r2.views.test'),
> 
> #registrations URLS
> 
> url(r'^activate/(?P\w+)/$',activate,name='registration_activate'),
> url(r'^login/$',auth_views.login,{'template_name': 
> 'registration/login.html'}, name='auth_login'),
> url(r'^logout/$',auth_views.logout,{'template_name': 
> 'registration/logout.html'},name='auth_logout'),
> 
> url(r'^password/change/$',auth_views.password_change,name='auth_password_change'),
> 
> url(r'^password/change/done/$',auth_views.password_change_done,name='auth_password_change_done'),
> 
> url(r'^password/reset/$',auth_views.password_reset,name='auth_password_reset'),
> 
> url(r'^password/reset/confirm/(?P[0-9A-Za-z]+)-(?P.+)/$',auth_views.password_reset_confirm,name='auth_password_reset_confirm'),
> 
> url(r'^password/reset/complete/$',auth_views.password_reset_complete,name='auth_password_reset_complete'),
> 
> url(r'^password/reset/done/$',auth_views.password_reset_done,name='auth_password_reset_done'),
> url(r'^register/$',register, {'form_class' : 
> ProjectSpecificRegistrationForm},  name='registration_register'),
> 
> url(r'^register/complete/$',direct_to_template,{'template': 
> 'registration/registration_complete.html'},name='registration_complete'),
> 
> 
> 
> 
> Best Regards,
> 
> Stanwin Siow
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Dynamic form with validation

2012-03-05 Thread shweta
Hello

I m facing problem while retrieving value from text box in dynamic
form
The code is as follows:

forms.py

class ContextForm(forms.Form):
   def __init__(self, prop, *args, **kwargs):
   for i, j in enumerator(prop):
self.fields['%s' % j] = forms.CharField(max_length = 20,
required = False, initial = 'black')

  def add_data(self):
for name, value in self.cleaned_data.items():
 yield(self.fields[name].label, value)

---

in views.py

if request.method=='POST':
form1 = ContextForm(request.POST[rdict.keys()[0]],rdict)
bound= form1.is_bound
if form1.is_valid():
for n in form1.add_data():
testlst.append(str(rdict.keys()[0]))
return HttpResponse(str(form1))
else:
form = ContextForm(rdict)


template="test2.html"
context=RequestContext(request,{'form':form})
return render_to_response(template,context)
-

test2.html





{% csrf_token %}

  
 Attribute Type 
 Value 
   
  {% for field in form  %}
  
{{ field.label_tag }}
{{ field }} {{ field.error }}

{% endfor %}








i am passing value to rdict = {'Color':'0'}
its sucessfully generating label value pair (i.e. Color and text box)
for me but when i am clicking on "go" button it's spliting values of
whatever inserted in text box rather than giving its value in the next
page
plz help me in this

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Reports

2012-03-05 Thread Ahmed Toulan
Hi,

We have a Django website and we would like to have a reporting engine, if 
it could be in python and integrated with Django it would be awesome.

Here are the options I investigated:

   1. Jasper is really promising and has a lot of features, but 
   unfortunately it's Java and I would need to do too much work to integrate 
   it with Django. For instance we will have separate users and user 
   permissions, and we can't share the login sessions. 
   2. ReportLab . Too low level and needs a proper designer. (Am I right?)
   3. Geraldo. Greate, but lacks a few features that we need.
   
My goal is to have a unified experience for my users (where they don't even 
know that we have a reporting engine). Users and user permissions should be 
managed in one place (Django side of course)

I want to know what everybody else is using.

Thanks for your time.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/YeQ-6wCtbR0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



social graph

2012-03-05 Thread suresh dokania
How to access user 's facebook profile information using django ?
And how to find their friends and use their info as well ?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: social graph

2012-03-05 Thread Thomas Orozco
You might want to look into the Django socialauth app
Le 5 mars 2012 14:08, "suresh dokania"  a écrit :

> How to access user 's facebook profile information using django ?
> And how to find their friends and use their info as well ?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Traceback from csrf_exempt in 1.3.1

2012-03-05 Thread Thomas Orozco
Your view is likely raising an exception (but if you don't use csrf exempt
then access is denied and the erroring view code is not run).
Le 2 mars 2012 21:42, "Ethan Whitt"  a écrit :

> I get a 403 error when I comment out csrf_example as such:
>
> auth/views.py
> from django.http import HttpResponse
> from django.utils import simplejson
> #from django.views.decorators.csrf import csrf_exempt
>
> #@csrf_exempt
> def json_api(request):
>  return HttpResponse(simplejson.dumps(request), mimetype="application/
> json")
>
> Here is my urls.py
>
> url(r'^auth/', 'auth.views.json_api'),
>
> Once I uncomment the two csrf_exempt statements, I get the 500 error?
> Any ideas?
>
>
>
> On Mar 2, 6:57 am, Thomas Orozco  wrote:
> > You seem to have no 500.html page.
> >
> > This traceback won't actually show the error that happened, but error out
> > on the fact that it can't find a template to display the 500 error.
> >
> > 1. Are you running DEBUG = True?
> > 2. Wouldn't you rather want to simplejson.dum
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > > I have never used csrf_exempt before.  I keep experiencing a traceback
> > > with 1.3.1, which may be self-induced. Here is my views file:
> >
> > > auth/views.py
> > > from django.http import HttpResponse
> > > from django.utils import simplejson
> > > from django.views.decorators.csrf import csrf_exempt
> >
> > > @csrf_exempt
> > > def json_api(request):
> > >return HttpResponse(simplejson.dumps(request),
> > > mimetype="application/json")
> >
> > > When I do a curl:
> >
> > > curl -i -X POST -d '{"screencast":{"subject":"tools"}}'
> > >http://127.0.0.1:8000/auth/
> >
> > > I experience 500 Internal Server Error:
> >
> > > Traceback (most recent call last):
> >
> > >  File "/Library/Python/2.7/site-packages/django/core/servers/
> > > basehttp.py", line 283, in run
> > >self.result = application(self.environ, self.start_response)
> >
> > >  File "/Library/Python/2.7/site-packages/django/core/handlers/
> > > wsgi.py", line 272, in __call__
> > >response = self.get_response(request)
> >
> > >  File "/Library/Python/2.7/site-packages/django/core/handlers/
> > > base.py", line 169, in get_response
> > >response = self.handle_uncaught_exception(request, resolver,
> > > sys.exc_info())
> >
> > >  File "/Library/Python/2.7/site-packages/django/core/handlers/
> > > base.py", line 218, in handle_uncaught_exception
> > >return callback(request, **param_dict)
> >
> > >  File "/Library/Python/2.7/site-packages/django/utils/decorators.py",
> > > line 93, in _wrapped_view
> > >response = view_func(request, *args, **kwargs)
> >
> > >  File "/Library/Python/2.7/site-packages/django/views/defaults.py",
> > > line 30, in server_error
> > >t = loader.get_template(template_name) # You need to create a
> > > 500.html template.
> >
> > >  File "/Library/Python/2.7/site-packages/django/template/loader.py",
> > > line 157, in get_template
> > >template, origin = find_template(template_name)
> >
> > >  File "/Library/Python/2.7/site-packages/django/template/loader.py",
> > > line 138, in find_template
> > >raise TemplateDoesNotExist(name)
> >
> > > --
> > > You received this message because you are subscribed to the Google
> Groups
> > > "Django users" group.
> > > To post to this group, send email to django-users@googlegroups.com.
> > > To unsubscribe from this group, send email to
> > > django-users+unsubscr...@googlegroups.com.
> > > For more options, visit this group at
> > >http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django registration

2012-03-05 Thread Alec Taylor
DRY principle is what Django is all about.

Use Pinax instead of developing your own Profile system.

If Pinax profiles don't show exactly what you want, extend them.

Unless you're doing this as a learning exercise?

On Mon, Mar 5, 2012 at 10:46 PM, Stanwin Siow  wrote:
> Even after doing that,
>
> The error still occurs. And my data is still unsaved in the database.
>
> Should i be creating a backend?
>
> Best Regards,
>
> Stanwin Siow
>
>
>
> On Mar 5, 2012, at 7:13 PM, nicolas HERSOG wrote:
>
> I looked at my code in order to notice diffs.
>
> You should add return new_user() after your new_profile.save()
>
>
> On Mon, Mar 5, 2012 at 11:54 AM, Stanwin Siow 
> wrote:
>>
>> Greetings,
>>
>> How do i save a user's profile into the database once i entered the
>> details in my custom registration form?
>>
>> Also right now when i'm testing it out, i get the following error:
>>
>> create_inactive_user() got an unexpected keyword argument
>> 'profile_callback'
>>
>> What could be the problem here?
>>
>> Am i overriding the original form correctly?
>>
>> Appreciate any inputs. Cheers
>>
>> here are the snippets you require:
>>
>> Forms.py
>>
>> from django import forms
>> from r2.models import Keyword
>> from r2.models import UserProfile
>> from registration.forms import RegistrationForm
>> from registration.models import RegistrationProfile
>> from django.utils.translation import ugettext_lazy as _
>> from registration.forms import RegistrationForm, attrs_dict
>>
>> class ProjectSpecificRegistrationForm(RegistrationForm):
>>     keywords = forms.ModelChoiceField(queryset=Keyword.objects.all())
>>     first_name
>> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'First
>> Name'))
>>     last_name
>> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'Last
>> Name'))
>>
>> def save(self):
>>     new_user =
>> RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'],
>>     password=self.cleaned_data['password1'],
>>     email=self.cleaned_data['email'])
>>     new_profile =
>> UserProfile(user=new_user,username=self.cleaned_data['username'],
>> keywords_subscribed=self.cleaned_data['keywords'],first_name=self.cleaned_data['first_name'],last_name=self.cleaned_data['last_name'])
>>
>>     new_profile.save()
>>
>> project urls.py
>>
>> from r2.registration.views import activate
>> from r2.registration.views import register
>> from r2.forms import ProjectSpecificRegistrationForm
>>
>>     url(r'^accounts/', include('registration.urls')),
>>     #url(r'^accounts/profile/', 'r2.views.profile'),
>>     url(r'^keyword_subscribe/$', 'r2.views.keyword_subscribe'),
>>     url(r'^refresh_list/$', 'r2.views.refresh_list'),
>>     url(r'^test/$', 'r2.views.test'),
>>
>>     #registrations URLS
>>
>> url(r'^activate/(?P\w+)/$',activate,name='registration_activate'),
>>     url(r'^login/$',auth_views.login,{'template_name':
>> 'registration/login.html'}, name='auth_login'),
>>     url(r'^logout/$',auth_views.logout,{'template_name':
>> 'registration/logout.html'},name='auth_logout'),
>>
>> url(r'^password/change/$',auth_views.password_change,name='auth_password_change'),
>>
>> url(r'^password/change/done/$',auth_views.password_change_done,name='auth_password_change_done'),
>>
>> url(r'^password/reset/$',auth_views.password_reset,name='auth_password_reset'),
>>
>> url(r'^password/reset/confirm/(?P[0-9A-Za-z]+)-(?P.+)/$',auth_views.password_reset_confirm,name='auth_password_reset_confirm'),
>>
>> url(r'^password/reset/complete/$',auth_views.password_reset_complete,name='auth_password_reset_complete'),
>>
>> url(r'^password/reset/done/$',auth_views.password_reset_done,name='auth_password_reset_done'),
>>     url(r'^register/$',register, {'form_class' :
>> ProjectSpecificRegistrationForm},  name='registration_register'),
>>
>>     url(r'^register/complete/$',direct_to_template,{'template':
>> 'registration/registration_complete.html'},name='registration_complete'),
>>
>>
>>
>>
>> Best Regards,
>>
>> Stanwin Siow
>>
>>
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email 

Re: social graph

2012-03-05 Thread suresh dokania
hi,

i am confused, there are so many wrappers like python sdk ,pyfacebook
where can i get the link for the complete tutorials ?

On Mon, Mar 5, 2012 at 6:43 PM, Thomas Orozco wrote:

> You might want to look into the Django socialauth app
> Le 5 mars 2012 14:08, "suresh dokania"  a
> écrit :
>
>> How to access user 's facebook profile information using django ?
>> And how to find their friends and use their info as well ?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django registration

2012-03-05 Thread Stanwin Siow
what is Pinax?

And this is not a learning exercise. 

Well i'll still want to know the other way too.


Best Regards,

Stanwin Siow



On Mar 5, 2012, at 9:41 PM, Alec Taylor wrote:

> DRY principle is what Django is all about.
> 
> Use Pinax instead of developing your own Profile system.
> 
> If Pinax profiles don't show exactly what you want, extend them.
> 
> Unless you're doing this as a learning exercise?
> 
> On Mon, Mar 5, 2012 at 10:46 PM, Stanwin Siow  
> wrote:
>> Even after doing that,
>> 
>> The error still occurs. And my data is still unsaved in the database.
>> 
>> Should i be creating a backend?
>> 
>> Best Regards,
>> 
>> Stanwin Siow
>> 
>> 
>> 
>> On Mar 5, 2012, at 7:13 PM, nicolas HERSOG wrote:
>> 
>> I looked at my code in order to notice diffs.
>> 
>> You should add return new_user() after your new_profile.save()
>> 
>> 
>> On Mon, Mar 5, 2012 at 11:54 AM, Stanwin Siow 
>> wrote:
>>> 
>>> Greetings,
>>> 
>>> How do i save a user's profile into the database once i entered the
>>> details in my custom registration form?
>>> 
>>> Also right now when i'm testing it out, i get the following error:
>>> 
>>> create_inactive_user() got an unexpected keyword argument
>>> 'profile_callback'
>>> 
>>> What could be the problem here?
>>> 
>>> Am i overriding the original form correctly?
>>> 
>>> Appreciate any inputs. Cheers
>>> 
>>> here are the snippets you require:
>>> 
>>> Forms.py
>>> 
>>> from django import forms
>>> from r2.models import Keyword
>>> from r2.models import UserProfile
>>> from registration.forms import RegistrationForm
>>> from registration.models import RegistrationProfile
>>> from django.utils.translation import ugettext_lazy as _
>>> from registration.forms import RegistrationForm, attrs_dict
>>> 
>>> class ProjectSpecificRegistrationForm(RegistrationForm):
>>> keywords = forms.ModelChoiceField(queryset=Keyword.objects.all())
>>> first_name
>>> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'First
>>> Name'))
>>> last_name
>>> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'Last
>>> Name'))
>>> 
>>> def save(self):
>>> new_user =
>>> RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'],
>>> password=self.cleaned_data['password1'],
>>> email=self.cleaned_data['email'])
>>> new_profile =
>>> UserProfile(user=new_user,username=self.cleaned_data['username'],
>>> keywords_subscribed=self.cleaned_data['keywords'],first_name=self.cleaned_data['first_name'],last_name=self.cleaned_data['last_name'])
>>> 
>>> new_profile.save()
>>> 
>>> project urls.py
>>> 
>>> from r2.registration.views import activate
>>> from r2.registration.views import register
>>> from r2.forms import ProjectSpecificRegistrationForm
>>> 
>>> url(r'^accounts/', include('registration.urls')),
>>> #url(r'^accounts/profile/', 'r2.views.profile'),
>>> url(r'^keyword_subscribe/$', 'r2.views.keyword_subscribe'),
>>> url(r'^refresh_list/$', 'r2.views.refresh_list'),
>>> url(r'^test/$', 'r2.views.test'),
>>> 
>>> #registrations URLS
>>> 
>>> url(r'^activate/(?P\w+)/$',activate,name='registration_activate'),
>>> url(r'^login/$',auth_views.login,{'template_name':
>>> 'registration/login.html'}, name='auth_login'),
>>> url(r'^logout/$',auth_views.logout,{'template_name':
>>> 'registration/logout.html'},name='auth_logout'),
>>> 
>>> url(r'^password/change/$',auth_views.password_change,name='auth_password_change'),
>>> 
>>> url(r'^password/change/done/$',auth_views.password_change_done,name='auth_password_change_done'),
>>> 
>>> url(r'^password/reset/$',auth_views.password_reset,name='auth_password_reset'),
>>> 
>>> url(r'^password/reset/confirm/(?P[0-9A-Za-z]+)-(?P.+)/$',auth_views.password_reset_confirm,name='auth_password_reset_confirm'),
>>> 
>>> url(r'^password/reset/complete/$',auth_views.password_reset_complete,name='auth_password_reset_complete'),
>>> 
>>> url(r'^password/reset/done/$',auth_views.password_reset_done,name='auth_password_reset_done'),
>>> url(r'^register/$',register, {'form_class' :
>>> ProjectSpecificRegistrationForm},  name='registration_register'),
>>> 
>>> url(r'^register/complete/$',direct_to_template,{'template':
>>> 'registration/registration_complete.html'},name='registration_complete'),
>>> 
>>> 
>>> 
>>> 
>>> Best Regards,
>>> 
>>> Stanwin Siow
>>> 
>>> 
>>> 
>>> 
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> django-users+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/django-users?hl=en.
>> 
>> 
>> 
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from th

Re: django registration

2012-03-05 Thread roy moss
Pinax is an open-source platform built on the Django Web
Framework
.

By integrating numerous reusable Django apps and providing starter projects
and infrastructure tools, Pinax takes care of the things that many sites
have in common so you can focus on what makes your site different.

Pinax has been used for everything from social networks to conference
websites, and from intranets to online games.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Reports

2012-03-05 Thread Derek
I plan to use ReportLab and/or Geraldo in an upcoming projects as they
seem to be the best out there.  In response to your criticisms:

ReportLab. "Too low level" which I translate to mean this is a tool
you can customise to do exactly what you want.  In the same way Django
is *not* a CMS and requires "some" work to build any website.

Geraldo. "lacks a few features" - welcome to the wonderful world of
open source.  Someone else has already done a whole chunk of work; now
you can make it even better by adding in those features and
contributing back so the whole community can benefit.

Cheers
Derek

On Mar 5, 1:12 pm, Ahmed Toulan  wrote:
> Hi,
>
> We have a Django website and we would like to have a reporting engine, if
> it could be in python and integrated with Django it would be awesome.
>
> Here are the options I investigated:
>
>    1. Jasper is really promising and has a lot of features, but
>    unfortunately it's Java and I would need to do too much work to integrate
>    it with Django. For instance we will have separate users and user
>    permissions, and we can't share the login sessions.
>    2. ReportLab . Too low level and needs a proper designer. (Am I right?)
>    3. Geraldo. Greate, but lacks a few features that we need.
>
> My goal is to have a unified experience for my users (where they don't even
> know that we have a reporting engine). Users and user permissions should be
> managed in one place (Django side of course)
>
> I want to know what everybody else is using.
>
> Thanks for your time.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Problem with my view or template (DRIVES ME NUTS)

2012-03-05 Thread leaks
I don't get an error... Nothing just happens

my view: (I think the problem is here)

def push(request, pk):
if request.method == 'POST':
entry = Entry.objects.get(pk=pk)
entry.pushes +=1
entry.save()

My template:


{% for entry in entries.object_list %}
{{ entry.title }}
Posted on {{ entry.posted }} by {{ entry.submitter }} | pushed {{ 
entry.pushes }} time(s).
{% if user.is_authenticated %}
#or maybe here...

{% csrf_token %}



{% endfor %}


This is my first project and i haven't really understood how GET and POST 
request's work with models...

Thanks in advance :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/8GXXgG28NcQJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django registration

2012-03-05 Thread Stanwin Siow
I don't think using another external app now would be ideal since i want to 
push it to production soon.

>From what i found online, it says i'm calling that profile_callback() that is 
>in the original forms.py.

But having said that, i think Pinax is quite cool if i've got the time to take 
a look at it.

I've had a brief read.

One thing that's bothering me is if i do use Pinax, do i have to rewrite 
everything again?



Best Regards,

Stanwin Siow



On Mar 5, 2012, at 9:53 PM, roy moss wrote:

> Pinax is an open-source platform built on the Django Web Framework. By 
> integrating numerous reusable Django apps and providing starter projects and 
> infrastructure tools, Pinax takes care of the things that many sites have in 
> common so you can focus on what makes your site different. Pinax has been 
> used for everything from social networks to conference websites, and from 
> intranets to online games.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to 
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django registration

2012-03-05 Thread Alec Taylor
Not sure how large your app is, so had to say.

On Tue, Mar 6, 2012 at 1:59 AM, Stanwin Siow  wrote:
> I don't think using another external app now would be ideal since i want to
> push it to production soon.
>
> From what i found online, it says i'm calling that profile_callback() that
> is in the original forms.py.
>
> But having said that, i think Pinax is quite cool if i've got the time to
> take a look at it.
>
> I've had a brief read.
>
> One thing that's bothering me is if i do use Pinax, do i have to rewrite
> everything again?
>
>
>
> Best Regards,
>
> Stanwin Siow
>
>
>
> On Mar 5, 2012, at 9:53 PM, roy moss wrote:
>
> Pinax is an open-source platform built on the Django Web Framework.
>
> By integrating numerous reusable Django apps and providing starter projects
> and infrastructure tools, Pinax takes care of the things that many sites
> have in common so you can focus on what makes your site different.
>
> Pinax has been used for everything from social networks to conference
> websites, and from intranets to online games.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django registration

2012-03-05 Thread Alec Taylor
*hard to say

On Tue, Mar 6, 2012 at 2:03 AM, Alec Taylor  wrote:
> Not sure how large your app is, so had to say.
>
> On Tue, Mar 6, 2012 at 1:59 AM, Stanwin Siow  wrote:
>> I don't think using another external app now would be ideal since i want to
>> push it to production soon.
>>
>> From what i found online, it says i'm calling that profile_callback() that
>> is in the original forms.py.
>>
>> But having said that, i think Pinax is quite cool if i've got the time to
>> take a look at it.
>>
>> I've had a brief read.
>>
>> One thing that's bothering me is if i do use Pinax, do i have to rewrite
>> everything again?
>>
>>
>>
>> Best Regards,
>>
>> Stanwin Siow
>>
>>
>>
>> On Mar 5, 2012, at 9:53 PM, roy moss wrote:
>>
>> Pinax is an open-source platform built on the Django Web Framework.
>>
>> By integrating numerous reusable Django apps and providing starter projects
>> and infrastructure tools, Pinax takes care of the things that many sites
>> have in common so you can focus on what makes your site different.
>>
>> Pinax has been used for everything from social networks to conference
>> websites, and from intranets to online games.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem with my view or template (DRIVES ME NUTS)

2012-03-05 Thread Ilian Iliev
Hi,

first of all use if request.POST, second pehaps you should pass the pk as
part of the action URL.
Do you get any errors or anything?


-- 
eng. Ilian Iliev
Web Software Developer

Mobile: +359 88 66 08 400
Website: http://ilian.i-n-i.org


On Mon, Mar 5, 2012 at 4:54 PM, leaks  wrote:

> I don't get an error... Nothing just happens
>
> my view: (I think the problem is here)
>
> def push(request, pk):
> if request.method == 'POST':
> entry = Entry.objects.get(pk=pk)
> entry.pushes +=1
> entry.save()
>
> My template:
>
> 
> {% for entry in entries.object_list %}
> {{ entry.title }}
> Posted on {{ entry.posted }} by {{ entry.submitter }} | pushed {{
> entry.pushes }} time(s).
> {% if user.is_authenticated %}
> #or maybe here...
> 
> {% csrf_token %}
> 
> 
> 
> {% endfor %}
> 
>
> This is my first project and i haven't really understood how GET and POST
> request's work with models...
>
> Thanks in advance :)
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/8GXXgG28NcQJ.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem with my view or template (DRIVES ME NUTS)

2012-03-05 Thread leaks
no, no errors get displayed... Just nothing happens. Do you mean passing 
the pk in my url?

On Monday, March 5, 2012 5:13:14 PM UTC+2, eng.Ilian Iliev wrote:
>
> Hi,
>
> first of all use if request.POST, second pehaps you should pass the pk as 
> part of the action URL.
> Do you get any errors or anything?
>
>
> -- 
> eng. Ilian Iliev
> Web Software Developer
>
> Mobile: +359 88 66 08 400
> Website: http://ilian.i-n-i.org
>
>
> On Mon, Mar 5, 2012 at 4:54 PM, leaks  wrote:
>
>> I don't get an error... Nothing just happens
>>
>> my view: (I think the problem is here)
>>
>> def push(request, pk):
>> if request.method == 'POST':
>> entry = Entry.objects.get(pk=pk)
>> entry.pushes +=1
>> entry.save()
>>
>> My template:
>>
>> 
>> {% for entry in entries.object_list %}
>> {{ entry.title }}
>> Posted on {{ entry.posted }} by {{ entry.submitter }} | pushed {{ 
>> entry.pushes }} time(s).
>> {% if user.is_authenticated %}
>> #or maybe here...
>> 
>> {% csrf_token %}
>> 
>> 
>> 
>> {% endfor %}
>> 
>>
>> This is my first project and i haven't really understood how GET and POST 
>> request's work with models...
>>
>> Thanks in advance :)
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Django users" group.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msg/django-users/-/8GXXgG28NcQJ.
>> To post to this group, send email to django-users@googlegroups.com.
>> To unsubscribe from this group, send email to 
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at 
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/iShERmwDeBgJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Reports

2012-03-05 Thread Alexey Luchko

Hi!

We are using http://PythonReports.sf.net/.

--
Regards,
Alex.

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem with my view or template (DRIVES ME NUTS)

2012-03-05 Thread Tom Evans
On Mon, Mar 5, 2012 at 3:24 PM, leaks  wrote:
> no, no errors get displayed... Just nothing happens.

Absolutely and literally 'nothing happens'? Really?

Does the browser submit the form, django receive a request and render
a response? I would definitely class that as 'something' and not
'nothing'.

We can only help you if you help us. You need to explain precisely
what happens, and what you expected to happen. Saying 'nothing
happens' is nonsense, and perhaps if you had investigated what was
actually happening, you may have understood why it didn't happen as
you expected, rather than expecting us to magically deduce both things
from the ether.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: facebook login problem

2012-03-05 Thread dummyman dummyman
Hi

i tried tat code and im getting d same error

Please help me out

here are specifications

use facebook login.
and once the user logins get his id
and using his id get basic information
and also get other information like books etc using access token
get the json object

please provide the detailed proc on how to go about
i ve spent 2 days on this and yet couldnt find a solution

On Wed, Feb 29, 2012 at 9:46 PM, Vignesh Sunder wrote:

> This might help you ih managing the session. I had a similar problem a
> year ago and used the following snippet:
>
> http://djangosnippets.org/snippets/2065/
>
> Cheers!
>
> On Wed, Feb 29, 2012 at 5:29 PM, dummyman dummyman 
> wrote:
> > Hi , i am using django framework at the back end
> >
> > I have used facebook s social plugin login for authentication
> >
> > 
> > 
> >   My Facebook Login Page
> > 
> > 
> >   
> >   http://connect.facebook.net/en_US/all.js";>
> >   
> >  FB.init({
> > appId:'My_app_id', cookie:true,
> > status:true, xfbml:true
> >  });
> >   
> >   Login with Facebook
> > 
> >  
> >
> > I have replaced app_id with appropriate app id
> >
> > login button appears but when i click on the login button, a  window
> pops up
> > and fb s signin form appears. wen i enter my email and pass it says
> "error
> > occured.Please try again later"
> > my app id is correct  and i want to proceed further on maintaining the
> > session information about the logged in user. Please suggest me suitable
> > reference for this and please help me in finding the error in fb  login
> > button
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem with my view or template (DRIVES ME NUTS)

2012-03-05 Thread Bill Freeman
If that's your complete view, you've forgotten to return an HTTPResponse object.

Since action='.', it appears that you are using the same view to get
the form and to
post (which is fine), but each case must return a response for the
prowser, presumably
rendered from the same template.  The render_to_response() shortcut is
your friend
here.

Also, while not required, it is usual for a successful post to
actually return a redirect to
a separate success view (helps guard, I believe, against inadvertent
double submits).

On 3/5/12, Tom Evans  wrote:
> On Mon, Mar 5, 2012 at 3:24 PM, leaks  wrote:
>> no, no errors get displayed... Just nothing happens.
>
> Absolutely and literally 'nothing happens'? Really?
>
> Does the browser submit the form, django receive a request and render
> a response? I would definitely class that as 'something' and not
> 'nothing'.
>
> We can only help you if you help us. You need to explain precisely
> what happens, and what you expected to happen. Saying 'nothing
> happens' is nonsense, and perhaps if you had investigated what was
> actually happening, you may have understood why it didn't happen as
> you expected, rather than expecting us to magically deduce both things
> from the ether.
>
> Cheers
>
> Tom
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem with my view or template (DRIVES ME NUTS)

2012-03-05 Thread leaks
dHey tom... The homepage displays a list of entries posted by users... Each 
entry has a submit button next to it, I watched many tutorials and i still 
dont get how those requests work...

I made the view as above and the main idea is to add +1 to my "pushes"(my 
model has a pushes field wich is an integer field). Plus I don't want it to 
leave the page. That's why i didn't add a render_to_response()

I created the form as above, and when i click on the submit button it 
doesn't do anything at all, well it shows it refreshed the page but it 
didn't add a +1 neither an error occurs

On Monday, March 5, 2012 5:35:29 PM UTC+2, Tom Evans wrote:
>
> On Mon, Mar 5, 2012 at 3:24 PM, leaks  wrote:
> > no, no errors get displayed... Just nothing happens.
>
> Absolutely and literally 'nothing happens'? Really?
>
> Does the browser submit the form, django receive a request and render
> a response? I would definitely class that as 'something' and not
> 'nothing'.
>
> We can only help you if you help us. You need to explain precisely
> what happens, and what you expected to happen. Saying 'nothing
> happens' is nonsense, and perhaps if you had investigated what was
> actually happening, you may have understood why it didn't happen as
> you expected, rather than expecting us to magically deduce both things
> from the ether.
>
> Cheers
>
> Tom
>
>
On Monday, March 5, 2012 5:35:29 PM UTC+2, Tom Evans wrote:
>
> On Mon, Mar 5, 2012 at 3:24 PM, leaks  wrote:
> > no, no errors get displayed... Just nothing happens.
>
> Absolutely and literally 'nothing happens'? Really?
>
> Does the browser submit the form, django receive a request and render
> a response? I would definitely class that as 'something' and not
> 'nothing'.
>
> We can only help you if you help us. You need to explain precisely
> what happens, and what you expected to happen. Saying 'nothing
> happens' is nonsense, and perhaps if you had investigated what was
> actually happening, you may have understood why it didn't happen as
> you expected, rather than expecting us to magically deduce both things
> from the ether.
>
> Cheers
>
> Tom
>
>
On Monday, March 5, 2012 5:35:29 PM UTC+2, Tom Evans wrote:
>
> On Mon, Mar 5, 2012 at 3:24 PM, leaks  wrote:
> > no, no errors get displayed... Just nothing happens.
>
> Absolutely and literally 'nothing happens'? Really?
>
> Does the browser submit the form, django receive a request and render
> a response? I would definitely class that as 'something' and not
> 'nothing'.
>
> We can only help you if you help us. You need to explain precisely
> what happens, and what you expected to happen. Saying 'nothing
> happens' is nonsense, and perhaps if you had investigated what was
> actually happening, you may have understood why it didn't happen as
> you expected, rather than expecting us to magically deduce both things
> from the ether.
>
> Cheers
>
> Tom
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/iFdP8Mr7JXIJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re:

2012-03-05 Thread Tom Evans
On Mon, Mar 5, 2012 at 4:07 PM, dummyman dummyman  wrote:
> hi
>
> why this code doesnt work ?
>

I don't know why your Facebook/javascript integration didn't work.
Perhaps try asking on a list related to those topics, rather than on a
Django mailing list.

Cheers

Tom

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Problem with my view or template (DRIVES ME NUTS)

2012-03-05 Thread leaks
Tried HttpResponseRedirect('/') and still nothing happens. Thanks

On Monday, March 5, 2012 5:52:50 PM UTC+2, ke1g wrote:
>
> If that's your complete view, you've forgotten to return an HTTPResponse 
> object.
>
> Since action='.', it appears that you are using the same view to get
> the form and to
> post (which is fine), but each case must return a response for the
> prowser, presumably
> rendered from the same template.  The render_to_response() shortcut is
> your friend
> here.
>
> Also, while not required, it is usual for a successful post to
> actually return a redirect to
> a separate success view (helps guard, I believe, against inadvertent
> double submits).
>
> On 3/5/12, Tom Evans  wrote:
> > On Mon, Mar 5, 2012 at 3:24 PM, leaks  wrote:
> >> no, no errors get displayed... Just nothing happens.
> >
> > Absolutely and literally 'nothing happens'? Really?
> >
> > Does the browser submit the form, django receive a request and render
> > a response? I would definitely class that as 'something' and not
> > 'nothing'.
> >
> > We can only help you if you help us. You need to explain precisely
> > what happens, and what you expected to happen. Saying 'nothing
> > happens' is nonsense, and perhaps if you had investigated what was
> > actually happening, you may have understood why it didn't happen as
> > you expected, rather than expecting us to magically deduce both things
> > from the ether.
> >
> > Cheers
> >
> > Tom
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Django users" group.
> > To post to this group, send email to django-users@googlegroups.com.
> > To unsubscribe from this group, send email to
> > django-users+unsubscr...@googlegroups.com.
> > For more options, visit this group at
> > http://groups.google.com/group/django-users?hl=en.
> >
> >
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/RMceYOkYr3AJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Live search

2012-03-05 Thread larry.mart...@gmail.com
I'm fairly new to django, still working on my first project.

I have a page with some selection fields and a button. The user clicks
the button, I run a query, and display the result set on the page.
Works fine.

Now I was to add a live search field to allow the user to further
winnow down the result set. As they type in this field, the displayed
result set will be filtered and re-displayed. But I can't figure out
how to return control to my code as they type in that field. I assume
I'll have to write some javascript code to get the events and collect
the entered text, but how do I then pass that to my python code that
would have the result set available to it? Or am I thinking about this
wrong - do I have to do it all in javascript?

Can anyone point me at an example that does something like this?

TIA!
-larry

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Way to isolate inherited model classes?

2012-03-05 Thread Michael Elkins

On Mon, Feb 27, 2012 at 09:18:22AM -0600, Gene horodecki wrote:
Hi there.  I have a multi-table inheritance in my main application 
like this:


MailItem->Parcel->LargeParcel

Now I want to have a separate application called 'dispatch' that 
serves as a staging area as information comes in about the parcels.  
So I want a single table that has a row that corresponds to:


MailItem->Parcel->LargeParcel->LargeParcelDispatchInfo

Note that this row will exist briefly, be processed, and then deleted 
so I would like it to be contained in one table to keep things simple. 
I know if the parcel was an abstract class I could accomplish this 
easily but  that is not what I want in my main app.  How do I make 
this a separate table in the dispatch app without having to manually 
keep the models in sync?  Thanks.


You should be able to inherit from the model in the main 
application without adding any new fields:


In dispatch/models.py:

from myapp.models import LargeParcel

class LargeParcelDispatchIno(LargeParcel):
  pass

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: admin css

2012-03-05 Thread Lee Hinde
On Sun, Mar 4, 2012 at 8:32 PM, Mike Dewhirst  wrote:
> I would like to adjust the admin app's base.css. Nothing outrageous. I just
> want to change all the #999 color values to something a little bit darker so
> screen text is slightly easier to see.
>
> I could write a python script to do that but it feels wrong.
>
> I tried locating somewhere in my project to put my own adjusted base.css but
> can't find exactly where to put it.
>
> collectstatic gets base.css from contrib.admin and puts it into
> /static/admin/css but anything in my project gets put straight into
> /static/css
>
> Is there a simple way to avoid editing the contrib.admin base.css?
>
> Thanks
>
> Mike
>

I think this still works:

http://www.theotherblog.com/Articles/2009/06/02/extending-the-django-admin-interface/

scroll down to "Rebranding Your Django Admin Site"

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



ANNOUNCE: Django 1.4 release candidate available

2012-03-05 Thread James Bennett
We're nearly there!

The Django 1.4 release candidate package is now available, and you can
read all about it on the blog:

https://www.djangoproject.com/weblog/2012/mar/05/14-rc-1/


-- 
"Bureaucrat Conrad, you are technically correct -- the best kind of correct."

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



send binary(pdf) file to server

2012-03-05 Thread Bolang

Hi,
I have a need to send pdf file from several worker server to main server.
The main server will then save the file to DB(MySQL).
I have read somewhere that json rpc with base64 encoding is not 
efficient to send binary file.


Any suggestions?

For my current load, non efficient solution (e.g. json rpc) will not be 
a problem. But i'm looking for a better alternative.


Thanks

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Form issues

2012-03-05 Thread Patrick
Hi folks,

I've run into trouble with a ModelForm with multiple entries.

I have a Question model that is linked to an election so we can assign
different questions to different races. A separate Answer model is
connected to the Question model and the Candidate model (which is also
tied to a race).

I'm trying to build a form that allows a candidate to answer all
questions associated with his or her race, e.g. Candidate X who is
running for mayor would see a form with three questions for Mayoral
candidates and Candidate Y who is running for the school board would
see three different questions that were assigned to the schools race.

What would be the best way to create this? I've tried playing with
ModelForms, but haven't had any success. Similarly, I've tried
building a FormSet, but can't seem to tie each answer to its
appropriate question.

Here's the related code. Thanks in advance for any help or direction.

- Pat

# MODELS.PY
class Candidate(models.Model):
user = models.OneToOneField(User)
party = models.ForeignKey('Party')
race = models.ForeignKey('Race')
mugshot = models.ImageField(upload_to=uploadMug, null=True,
blank=True)

class Answer(models.Model):
answer = models.CharField(max_length=255, default="No answer
provided.")
candidate = models.ForeignKey('Candidate')
question = models.ForeignKey('Question')

class Question(models.Model):
question = models.CharField(max_length=255)
race = models.ManyToManyField('Race')

class Race(models.Model):
race = models.CharField(max_length=255)
election_date = models.DateField('Election Date', null=True)
active = models.BooleanField()

# VIEWS.PY
@login_required
def update_answers(request):
user = Candidate.objects.get(user__exact=request.user)
question_list = Question.objects.filter(Race__exact=user.race)
for question in question_list:
pass
# I tried writing a function that would serve forms with
appropriate
# candidate/question information, but kept getting NameErrors
if request.method == 'POST':
aForm = UpdateQandA(request.POST, instance=user)
if aForm.is_valid():
aForm.save()
return HttpResponseRedirect('/matchmaker/%d/%s/' %
(user.race.id, user.id))
else:
aForm = UpdateQandA(instance=user)

variables = RequestContext(request, {
'aForm':aForm,
})
return render_to_response('registration/UpdateAnswers.html',
variables)

# FORMS.PY
class UpdateQandA(forms.ModelForm):
answer = forms.CharField(widget = forms.Textarea)
class Meta:
model = Answer
fields = ('question', 'answer',)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Field.localize=True effective only if USE_L10N=True as well?

2012-03-05 Thread Carsten Fuchs

Hi all,

using Django 1.3, in a form like

class SomeForm(forms.Form):
Stunden = forms.DecimalField(localize=True, ...)

it seems that localize=True is only effective if in the settings.py 
USE_L10N = True  as well.


Is that correct?

Many thanks and best regards,
Carsten



--
   Cafu - the open-source Game and Graphics Engine
for multiplayer, cross-platform, real-time 3D Action
  Learn more at http://www.cafu.de

--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Verifying number of forms in inline formset

2012-03-05 Thread Michael Stevens
Hi.

I've got a django app using an inline formset.

It was all working nicely, but I want to add some validation such that the 
inline formset must contain at least one valid record. This seems to be 
surprisingly hard to do.

I've tried overriding clean() on the formset and looking at things like 
self.form, is_valid(), and so on, but I can't work out anything that will 
let me know the number of database records that will be present when the 
formset is saved.

Am I missing anything obvious? How could I do this?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/wols1d5EPegJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ANNOUNCE: Django 1.4 release candidate available

2012-03-05 Thread Diego Schulz
On Mon, Mar 5, 2012 at 2:49 PM, James Bennett  wrote:
> We're nearly there!
>
> The Django 1.4 release candidate package is now available, and you can
> read all about it on the blog:
>
> https://www.djangoproject.com/weblog/2012/mar/05/14-rc-1/
>

Hi James,

Glad to read that!

Just FYI: there's a minor issue while building html docs since this commit:

Fixes #17327 -- Add --database option to createsuperuser and
change password management commands
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17665
bcc190cf-cafb-0310-a4f2-bffc1f526a37

Here's a snip from the sphinx output:

...
/home/dschulz/django/docs/ref/django-admin.txt:3: SEVERE: Duplicate
ID: "django-admin-option---database".
/home/dschulz/django/docs/ref/django-admin.txt:3: SEVERE: Duplicate
ID: "django-admin-option---database".
...
build succeeded, 2 warnings.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: django admin list_editable and custom manager bug?

2012-03-05 Thread Slafs
I'd like to bump this up. Since the rc1 is out I would like to know if this 
deserves a seperate ticket.

Regards


W dniu poniedziałek, 2 stycznia 2012, 22:19:09 UTC+1 użytkownik Slafs 
napisał:
>
> Oh 
>
> Maybe it has something to do with my previous report 
> https://code.djangoproject.com/ticket/13126 ?
>
> And one more thing to mention is that there's no error indication on the 
> changelist.
>
> Regards
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/6yFAqmEB4VwJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How do you use a link as a post request?

2012-03-05 Thread bb6xt
You can achieved that by using javascript or jquery. But personally I
prefer jquery so I'll illustrate with a jquery example.

# in your template


funcion submitForm(){
$.ajax({
url: "some url",
type: "POST",
data: $("#myform").serialize(),
success: function(){//do magic}
});





Submit


Note however that the form is submitted asynchronously ($.ajax())

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How do you use a link as a post request?

2012-03-05 Thread leaks
thanks bb6xt..! I couldn't find an answer so I went with a forms POST 
request... Thank you anyway... Will give it a try :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/G7tDKNn80tUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: How do you use a link as a post request?

2012-03-05 Thread bb6xt
You're welcome. I missed one detail in my last post. Here is it:


On Mar 5, 9:27 pm, leaks  wrote:
> thanks bb6xt..! I couldn't find an answer so I went with a forms POST
> request... Thank you anyway... Will give it a try :)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: ANN: Mezzanine 1.0 released

2012-03-05 Thread Josh Cartmell
Congrats on the release Steve.

As a developer that has been using Mezzanine for a bit under a year
and a half I have to say that I have been really pleased with the
project.  A lot has changed in the time since I began using Mezzanine
but even in it's infancy Mezzanine provided a very usable base for a
variety of types of projects.

Overall Mezzanine has provided a very stable foundation that is easy
to develop on top of; getting out of your way when you want it to and
taking care of many things for you.  One of it's biggest strengths is
its simplicity and humility (i.e. it doesn't try to be all things to
all people but provides a platform which is easy to modify to spec).

My 2 cents.

On Mar 3, 3:51 pm, Stephen McDonald  wrote:
> Hi Djangonauts,
>
> I'm happy to announce the release of Mezzanine 1.0. Mezzanine is simple yet
> powerful BSD licensed CMS for building Django powered sites.
>
> Development of Mezzanine and its sister project Cartridge (ecommerce for
> Mezzanine) began over two years ago, born from frustrations with the only
> options available at the time which were django-page-cms and Satchmo, and
> from a decade's experience in building proprietary CMSes and ecommerce
> solutions, prior to working with Django. Since then it has grown from real
> world requirements at a fast paced web development agency in Australia, and
> has received contributions from many dozens of developers on GitHub and
> Bitbucket, with a wider community of hundreds on the mailing list.
> Mezzanine and Cartridge have been used to power a long list of production
> sites, from personal blogs and agency sites, to some of the highest traffic
> content sites and ecommerce stores for some of the largest brands in
> Australia.
>
> Here's an overview of Mezzanine's features:
>
> - Hierarchical navigation tree, with page nodes extendable by Mezzanine's
> content type system. Content types are simply subclases of Mezzanine's Page
> model - subclass away and your new type is available.
> - Inline front-end site editing that can be applied to any models:
> Mezzanine's, third party apps, or your own.
> - Blogging app (regular Django app).
> - Gallery app (a Mezzanine content type).
> - Mobile device handling. Build separate mobile versions of templates where
> required to run a mobile version of the site - no separate URLs or views
> required.
> - Form builder app (a Mezzanine content type). Admin users create their own
> forms, and view form submissions via the admin, or export them via CSV.
> - Mezzanine projects are standard Django projects - admin, urlpatterns,
> views, models. Third party Django apps plug straight in without special
> handling.
> - Built-in search engine.
> - South migrations.
> - Admin editable settings.
> - Full test suite, continuously integrated (with Travis CI) including
> automated pep8/pyflakes integration. The code base is painstakingly clean.
> - Fully documented, available on the Mezzanine project site as well as on
> Read The Docs.
> - Translated into around a dozen languages, managed via Transifex.
> - Grappelli/Filebrowser based admin. Third party Django admin classes plug
> straight in.
> - Full featured ecommerce via Cartridge - a separate ecommerce app built
> for Mezzanine.
> - All functionality comes with default templates to get you started,
> integrated with Bootstrap 2.0.
> - Integrated with Django's sites app.
> - A set of generic foreignkey types and models: tagging, threaded comments
> and ratings. All denormalised with counts, averages, etc.
>
> To be honest, you could almost implement everything Mezzanine does by
> combining dozens of different open source Django apps that are out there.
> What you get from Mezzanine though, is everything integrated seamlessly out
> of the box, leaving you free to focus on building your site.
>
> In conjunction with the Mezzanine 1.0 release, I've also released Cartridge
> 0.4. As I mentioned, Cartridge provides a full ecommerce package for
> Mezzanine. While Mezzanine is more of a framework for building sites with
> any type of content you need to, Cartridge is much more opinionated in its
> function, namely how a store should be set up, and is more of a standard
> Django app that implements the most common features you'd find in an online
> store. Like Mezzanine, Cartridge has been under development for a couple of
> years now. Since I haven't posted to django-users about either Mezzanine or
> Cartridge before, here's an overview of Cartridge's features as well:
>
> - Hierarchical shop categories. These are just Mezzanine content types and
> hook into your site's navigation.
> - Single interface for setting up a product, with 0 to N variations.
> - Arbitrary product options (colours, sizes, etc).
> - Hooks for shipping calculations and payment gateway.
> - Sale pricing.
> - Promotional discount codes.
> - PDF invoice generation (for packing slips).
> - Stock control.
> - Dynamic categories (by price range, colour, etc).
> - Registered or anonymou

Re: ANN: Mezzanine 1.0 released

2012-03-05 Thread Thomas Woolford
You should consider using Sentry Instead. This way you will get live
feedback on errors, even ones that nobody reports.

On Mar 4, 1:24 pm, Stephen McDonald  wrote:
> Yes - behind the project homepage is the entire demo site where anyone
> can log in and try it out. I've left debug on so that when people find
> errors on it they can submit the traceback easily. It's been really
> helpful on the few occasions it has happened.
>
> On Mar 4, 12:55 pm, arshaver  wrote:
>
>
>
>
>
>
>
> > Looks great. One thing... looks likehttp://mezzanine.jupo.org/is
> > running with Debug = True (tryhttp://mezzanine.jupo.org/asdf). Maybe
> > you're aware, just FYI.
>
> > On Mar 3, 3:51 pm, Stephen McDonald  wrote:
>
> > > Hi Djangonauts,
>
> > > I'm happy to announce the release of Mezzanine 1.0. Mezzanine is simple 
> > > yet
> > > powerful BSD licensed CMS for building Django powered sites.
>
> > > Development of Mezzanine and its sister project Cartridge (ecommerce for
> > > Mezzanine) began over two years ago, born from frustrations with the only
> > > options available at the time which were django-page-cms and Satchmo, and
> > > from a decade's experience in building proprietary CMSes and ecommerce
> > > solutions, prior to working with Django. Since then it has grown from real
> > > world requirements at a fast paced web development agency in Australia, 
> > > and
> > > has received contributions from many dozens of developers on GitHub and
> > > Bitbucket, with a wider community of hundreds on the mailing list.
> > > Mezzanine and Cartridge have been used to power a long list of production
> > > sites, from personal blogs and agency sites, to some of the highest 
> > > traffic
> > > content sites and ecommerce stores for some of the largest brands in
> > > Australia.
>
> > > Here's an overview of Mezzanine's features:
>
> > > - Hierarchical navigation tree, with page nodes extendable by Mezzanine's
> > > content type system. Content types are simply subclases of Mezzanine's 
> > > Page
> > > model - subclass away and your new type is available.
> > > - Inline front-end site editing that can be applied to any models:
> > > Mezzanine's, third party apps, or your own.
> > > - Blogging app (regular Django app).
> > > - Gallery app (a Mezzanine content type).
> > > - Mobile device handling. Build separate mobile versions of templates 
> > > where
> > > required to run a mobile version of the site - no separate URLs or views
> > > required.
> > > - Form builder app (a Mezzanine content type). Admin users create their 
> > > own
> > > forms, and view form submissions via the admin, or export them via CSV.
> > > - Mezzanine projects are standard Django projects - admin, urlpatterns,
> > > views, models. Third party Django apps plug straight in without special
> > > handling.
> > > - Built-in search engine.
> > > - South migrations.
> > > - Admin editable settings.
> > > - Full test suite, continuously integrated (with Travis CI) including
> > > automated pep8/pyflakes integration. The code base is painstakingly clean.
> > > - Fully documented, available on the Mezzanine project site as well as on
> > > Read The Docs.
> > > - Translated into around a dozen languages, managed via Transifex.
> > > - Grappelli/Filebrowser based admin. Third party Django admin classes plug
> > > straight in.
> > > - Full featured ecommerce via Cartridge - a separate ecommerce app built
> > > for Mezzanine.
> > > - All functionality comes with default templates to get you started,
> > > integrated with Bootstrap 2.0.
> > > - Integrated with Django's sites app.
> > > - A set of generic foreignkey types and models: tagging, threaded comments
> > > and ratings. All denormalised with counts, averages, etc.
>
> > > To be honest, you could almost implement everything Mezzanine does by
> > > combining dozens of different open source Django apps that are out there.
> > > What you get from Mezzanine though, is everything integrated seamlessly 
> > > out
> > > of the box, leaving you free to focus on building your site.
>
> > > In conjunction with the Mezzanine 1.0 release, I've also released 
> > > Cartridge
> > > 0.4. As I mentioned, Cartridge provides a full ecommerce package for
> > > Mezzanine. While Mezzanine is more of a framework for building sites with
> > > any type of content you need to, Cartridge is much more opinionated in its
> > > function, namely how a store should be set up, and is more of a standard
> > > Django app that implements the most common features you'd find in an 
> > > online
> > > store. Like Mezzanine, Cartridge has been under development for a couple 
> > > of
> > > years now. Since I haven't posted to django-users about either Mezzanine 
> > > or
> > > Cartridge before, here's an overview of Cartridge's features as well:
>
> > > - Hierarchical shop categories. These are just Mezzanine content types and
> > > hook into your site's navigation.
> > > - Single interface for setting up a product, with 0 to N variations.
> > > - A

Re: admin css

2012-03-05 Thread Mike Dewhirst

Thanks Lee - that did it :)

Just for the record this is what I did ...

In my templates/admin/base_site.html

{% extends "admin/base.html" %}
{% block extrastyle %}href="/static/css/darker.css" />{% endblock %}


Then in my /static/css/darker.css I copied the relevant section from 
contrib.admin's base.css like so ...


.help, p.help {
font-size: 10px !important;
color: #44;
}

... and bingo I can read the help text much more easily.

Cheers

Mike

On 6/03/2012 3:37am, Lee Hinde wrote:

On Sun, Mar 4, 2012 at 8:32 PM, Mike Dewhirst  wrote:

I would like to adjust the admin app's base.css. Nothing outrageous. I just
want to change all the #999 color values to something a little bit darker so
screen text is slightly easier to see.

I could write a python script to do that but it feels wrong.

I tried locating somewhere in my project to put my own adjusted base.css but
can't find exactly where to put it.

collectstatic gets base.css from contrib.admin and puts it into
/static/admin/css but anything in my project gets put straight into
/static/css

Is there a simple way to avoid editing the contrib.admin base.css?

Thanks

Mike



I think this still works:

http://www.theotherblog.com/Articles/2009/06/02/extending-the-django-admin-interface/

scroll down to "Rebranding Your Django Admin Site"



--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



[ImportError] cannot import name `feed`

2012-03-05 Thread Alec Taylor
I keep getting an ImportError saying "cannot import name `feed`".
(pinax-admin basic_project)

I am running latest Pinax (from github) and latest DJango (from SVN),

I have also tried with trunk versions of all dependencies, but I keep
getting this error.

How can I overcome this error?

Thanks for all suggestions,

Alec Taylor

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Exception handling in templates

2012-03-05 Thread Aryeh Leib Taurog
Did exception handling in templates change somewhere between Django
1.2.x and 1.3.x?

I have a callable which is displayed in a template.  Sometimes it
raises AttributeException.  Under 1.2.x the callable was treated as an
empty string, but under 1.3.1 this results in a 500 response.  This is
a major behavior change, so I'm surprised it doesn't seem to be
documented anywhere.  What am I missing?

Aryeh Leib Taurog

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Exception handling in templates

2012-03-05 Thread Russell Keith-Magee

On 06/03/2012, at 12:56 PM, Aryeh Leib Taurog wrote:

> Did exception handling in templates change somewhere between Django
> 1.2.x and 1.3.x?
> 
> I have a callable which is displayed in a template.  Sometimes it
> raises AttributeException.  Under 1.2.x the callable was treated as an
> empty string, but under 1.3.1 this results in a 500 response.  This is
> a major behavior change, so I'm surprised it doesn't seem to be
> documented anywhere.  What am I missing?
> 

As always, the release notes are the place to check if anything has changed 
between releases.

https://docs.djangoproject.com/en/1.3/releases/1.3/#callables-in-templates

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Exception handling in templates

2012-03-05 Thread Aryeh Leib Taurog
On Mar 6, 7:41 am, Russell Keith-Magee 
wrote:
> On 06/03/2012, at 12:56 PM, Aryeh Leib Taurog wrote:
>
> > Did exception handling in templates change somewhere between Django
> > 1.2.x and 1.3.x?
>
> > I have a callable which is displayed in a template.  Sometimes it
> > raises AttributeException.  Under 1.2.x the callable was treated as an
> > empty string, but under 1.3.1 this results in a 500 response.  This is
> > a major behavior change, so I'm surprised it doesn't seem to be
> > documented anywhere.  What am I missing?
>
> As always, the release notes are the place to check if anything has changed 
> between releases.
>
> https://docs.djangoproject.com/en/1.3/releases/1.3/#callables-in-temp...
>

Yes, I saw that, but I don't think it describes at all the behavior I
am seeing.
Let's say I have the following code:

class MyClass:
def my_title(self):
if 'some string' not in self.get_another_object().x:
return 'Specific Title'

Then I have a template:

{% with instance_of_myclass as obj %}
{% if obj.my_title %}
  {{ obj.my_title }}
{% else %}
  Generic Title
{% endif %}

Sometimes self.get_another_object() returns an object which doesn't
have attribute 'x' so my_title() raises an AttributeError exception.
Under Django 1.2.4 the template renders as 'Generic Title,' but under
1.3.1 I get a server error.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.