Re: Possible Basic kwargs question.

2013-04-16 Thread Brad Pitcher
I see what you're saying. Maybe you're looking for something more like this? def method1(self, param1=sensible_default, param2=sensible_default, param3=sensible_default): print param1, param2, param3 The variable names must be specified in the method arguments like above if you wish to

Re: djano user registration form and login(full example)

2013-04-16 Thread Avnesh Shakya
This error is occur when you're saving the member, not the user. When creating the member, you are not assigning the user. On Wed, Apr 17, 2013 at 10:45 AM, sachin wrote: > I m still stuck with > > Exception Type: IntegrityError > Exception Value: column user_id

Re: Django-Registration/Custom Authentication Issue

2013-04-16 Thread Lee Hinde
Thanks Scott; that turned out to be the issue. I found those references and updated them and all is well. On Apr 16, 2013, at 7:05 PM, Scott Anderson wrote: > Django registration is not compatible with custom user models in Django 1.5, > as it directly references

Re: djano user registration form and login(full example)

2013-04-16 Thread sachin
I m still stuck with Exception Type: IntegrityError Exception Value: column user_id is not unique Whenever I try to save, it throws the above error. I have attached files for reference, can someone help ?? On Saturday, April 6, 2013 7:07:32 PM UTC+5:30, sachin wrote: > > Thanx

Re: Possible Basic kwargs question.

2013-04-16 Thread jayhalleaux
but if I did that then i would have a variable named kwargs. and it would be print kwargs['param1'], etc Why even unpack the dictionary? I could just pass the dictionary instead. On Tuesday, April 16, 2013 11:08:42 PM UTC-4, Brad Pitcher wrote: > > It should be: > model.method1(**params) > On

Re: Possible Basic kwargs question.

2013-04-16 Thread Brad Pitcher
It should be: model.method1(**params) On Apr 16, 2013 7:49 PM, "jayhalleaux" wrote: > Not really a Django question but I'm trying to create a model method that > does not have a fixed set of parameters. > > models.py > Class Model_A(model.Model): > ... > > def

Possible Basic kwargs question.

2013-04-16 Thread jayhalleaux
Not really a Django question but I'm trying to create a model method that does not have a fixed set of parameters. models.py Class Model_A(model.Model): ... def method1(self, **kwargs): print param1, param2, param3 views.py params = dict( param1=something1, param2=something2,

Re: Django-Registration/Custom Authentication Issue

2013-04-16 Thread Scott Anderson
Django registration is not compatible with custom user models in Django 1.5, as it directly references django.contrib.auth.models.User in several places. If you want to maintain your own copy you can swap those refs for those of your own User model. -scott Via mobile phone On Apr 16, 2013, at

Re: Django-Registration/Custom Authentication Issue

2013-04-16 Thread Rainy
On Sunday, April 14, 2013 9:49:32 PM UTC-4, Lee Hinde wrote: > > I'm trying to do a 'simple' registration with just a user email and > password required to create an account. I'm using django-registration with > django 1.5.1 and have created a custom model and the custom model manager. > >

Re: CommandError: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)

2013-04-16 Thread frocco
I have been looking at the django-newsletter, but can see no way to send a newsletter by user group On Tuesday, April 16, 2013 6:04:18 PM UTC-4, frocco wrote: > > Hello, > > I am using django 1.5.1 and trying to dumpdata. > > How can I fix this? > > Thanks > -- You received this message

How to get email messageId when using Amazon SES in Django?

2013-04-16 Thread krdeepak
I am using Amazon SNS to send notification when an email bounces. I need to store email messageId when sending the email, so that I can match it with notification and see which email delivery failed. Django send_mail seems to be returning number of emails sent. How can I get the messageId of

Re: CommandError: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)

2013-04-16 Thread frocco
Yes, I just found out django-campaign is causing the error. There are a few forks of this, not sure what I should do. On Tuesday, April 16, 2013 6:04:18 PM UTC-4, frocco wrote: > > Hello, > > I am using django 1.5.1 and trying to dumpdata. > > How can I fix this? > > Thanks > -- You received

Re: CommandError: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)

2013-04-16 Thread Larry Martell
Did you try what was suggested there? i.e. running it with '--database default' On Tue, Apr 16, 2013 at 4:58 PM, frocco wrote: > Thanks Larry, > > I read this, but not sure how to fix it. > > On Tuesday, April 16, 2013 6:04:18 PM UTC-4, frocco wrote: >> >> Hello, >> >> I am

Re: CommandError: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)

2013-04-16 Thread frocco
Thanks Larry, I read this, but not sure how to fix it. On Tuesday, April 16, 2013 6:04:18 PM UTC-4, frocco wrote: > > Hello, > > I am using django 1.5.1 and trying to dumpdata. > > How can I fix this? > > Thanks > -- You received this message because you are subscribed to the Google Groups

Re: CommandError: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)

2013-04-16 Thread Larry Martell
This may help you: http://stackoverflow.com/questions/10405978/dumpdata-too-many-arguments On Tue, Apr 16, 2013 at 4:36 PM, frocco wrote: > Sorry, here it is. > > python manage.py dumpdata > django_data.json > > On Tuesday, April 16, 2013 6:04:18 PM UTC-4, frocco wrote: >> >>

Re: CommandError: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)

2013-04-16 Thread frocco
Sorry, here it is. python manage.py dumpdata > django_data.json On Tuesday, April 16, 2013 6:04:18 PM UTC-4, frocco wrote: > > Hello, > > I am using django 1.5.1 and trying to dumpdata. > > How can I fix this? > > Thanks > -- You received this message because you are subscribed to the Google

Re: CommandError: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)

2013-04-16 Thread Jonathan Baker
Hello, For starters, it'd help if you would provide us with the command you ran (so we're not guessing). Jonathan On Tue, Apr 16, 2013 at 4:04 PM, frocco wrote: > Hello, > > I am using django 1.5.1 and trying to dumpdata. > > How can I fix this? > > Thanks > > -- > You

CommandError: Unable to serialize database: get_db_prep_value() takes at least 3 arguments (2 given)

2013-04-16 Thread frocco
Hello, I am using django 1.5.1 and trying to dumpdata. How can I fix this? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: "ImportError: No module named django"

2013-04-16 Thread Nathan Hall
Ok, that was it, being completely unfamiliar with the Mac Terminal, I was in the wrong directory. I navigated to the proper directory and got it installed. Thanks for the help guys! -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe

Re: Date from DateTimeField vs date from model method: foreign key DateTimeField

2013-04-16 Thread Mike Doroshenko II
Gabriel [SGT] wrote: On Fri, Apr 12, 2013 at 2:47 PM, Mike Doroshenko II wrote: In my attached models.py Please, don't attach code, use a paste service or similar to view the code online. Ok, yeah I suppose that would save storage space and bandwidth considering the

Re: Date from DateTimeField vs date from model method: foreign key DateTimeField

2013-04-16 Thread Gabriel [SGT]
On Fri, Apr 12, 2013 at 2:47 PM, Mike Doroshenko II wrote: > In my attached models.py Please, don't attach code, use a paste service or similar to view the code online. > the time last modified on the latest object that has a foreign key to it. > > So when I made a new

Re: django auth user - difference between last login and now

2013-04-16 Thread Jaimin Patel
Any suggestion on this question? On Friday, April 12, 2013 10:35:54 AM UTC-4, Jaimin Patel wrote: > > Hello, > > I would like to provide some instructions if user come after gap of 1 week > or so. I was hoping that I can do that by - > > (datetime.now()-user.last_login) > timedelta(days=7) > >

Django - Tracking Usage by each registered user and anonymous user

2013-04-16 Thread Jaimin Patel
Hello, I would like to gather the information on how many minutes/hours spent by anonymous users and registered users on my app. On quick google I found few ways to do it - 1. Django-tracking : https://github.com/codekoala/django-tracking 2. Django-tracking2 :

Extend django user model

2013-04-16 Thread Laurent David Deschambault
Hi, I want to extend the existing user model and I have followed the instructions found in the Django documentation ( https://docs.djangoproject.com/en/dev/topics/auth/customizing/#extending-the-existing-user-model ). My issue is that my additional fields (which are ForeignKey) cannot be blank

Re: Date from DateTimeField vs date from model method: foreign key DateTimeField

2013-04-16 Thread Mike Doroshenko II
Hello? Mike Doroshenko II wrote: In my attached models.py I have a class that has a model method to return the time last modified on the latest object that has a foreign key to it. So when I made a new document, in the admin interface I see April 11, 2013, 8:24 p.m. for the Created column

How to translate database content?

2013-04-16 Thread Cody Scott
I want the end user of the site to be able to view the site in different languages. I have marked the static text in my templates for translation. I have not marked the verbose_names because they are used in the admin which the end user will not have access to. But I just realized that the

Re: django-social-auth problem with facebook

2013-04-16 Thread Jeff Hsu
First, check to see if you have 3 tables, social_auth_association, social_auth_nonce, and social_auth_usersocialauth. If not, you need to create those DB tables. SyncDB did not work for me. I had south installed. So, you just do use south to create proper schema for those DB tables. Some

Re: Using postgres Users as django users

2013-04-16 Thread Avraham Serour
So you are saying that each user models will be using the same database but with different connection settings? I believe you can create each and every connection setting on your databases inside settings.py, each one would use the same database but a different user. When creating an object

Problem with creating a one-to-one instance

2013-04-16 Thread Carsten Fuchs
Hi all, I'm probably overlooking something very simple, but still cannot explain what the code below does wrong: With these models: class Vorblendplan(models.Model): # ... pass class Mitarbeiter(models.Model): # ... vbp =

Re: django-social-auth problem with facebook

2013-04-16 Thread Alex Ksenzov
> > Hi Jeff .I have this problem too, but still can't figure out. Can you > please provide resolving more detail and step by step please. Thanks. > > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: Creating a Djang Webpage

2013-04-16 Thread Javier Guerra Giraldez
On Tue, Apr 16, 2013 at 7:48 AM, Augusto Santos wrote: > I have alredy read part of the tutorial at django's site and read a little > bit of the documentation. first of all, do the tutorial. all of it. if you get stuck at any point, ask for help here. but do it.

Re: Creating a Djang Webpage

2013-04-16 Thread Frankline
Google is your friend. An example: http://stackoverflow.com/questions/5871730/need-a-minimal-django-file-upload-example On Tue, Apr 16, 2013 at 3:48 PM, Augusto Santos wrote: > Hey guys, > > So, I am new in Django framework and I would know how to make a simple >

How to clear all session variables without getting logged out?

2013-04-16 Thread Cody Scott
I am trying to clear all of the session variables but not logout the current user. user = request.session.get('member_id', None) request.session.flush() request.session.modified = True request.session['member_id'] = user request.session.modified = True Will this also affect

Re: Using postgres Users as django users

2013-04-16 Thread Maximilian Tyrtania
I looked at that a bit, thanks, the problem is that I can well use my pg server to do the authentication, but I still can't talk django into using the database connection for this particurlar user (hopefully I'm just not aware of the solution). You see, lots of my models in models.py are

Re: Guidance

2013-04-16 Thread Kishan Mehta
Ok, Thank you Amyth. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re: Guidance

2013-04-16 Thread Kishan Mehta
Ok thank you Serdar Dalgıç. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to

Re:

2013-04-16 Thread vinoth job
actually appsembler is an application that will provide hosting service for mezzanine based sites and apps .but this is also not successfully deploying . On Tue, Apr 16, 2013 at 5:31 PM, Anton Parkhomenko wrote: > Actually, I don't think that any of Django-based CMS'

Creating a Djang Webpage

2013-04-16 Thread Augusto Santos
Hey guys, So, I am new in Django framework and I would know how to make a simple page with this powerful tool. I have alredy read part of the tutorial at django's site and read a little bit of the documentation. However, a friend of mine told me that the latest version of Django, that is

Re: django search

2013-04-16 Thread Daniel Roseman
On Saturday, 13 April 2013 16:59:49 UTC+1, Harjot Mann wrote: > hello friends > > i have made a project on studnt dmc records in django...in which i search > for student' s dmcs using roll number..it works fine > but the problem is that when i am typing a fake roll number which is not >

Re: Using postgres Users as django users

2013-04-16 Thread Avraham Serour
I believe you could create a custom auth that relies on the postgres auth system On Tue, Apr 16, 2013 at 3:00 PM, Maximilian Tyrtania < maximilian.tyrta...@googlemail.com> wrote: > Hi there, > > This is my 1st post, so please be gentle... > > I'm looking into using django as web front end to my

Re: Guidance

2013-04-16 Thread Amyth Arora
POST and GET here are not actually methods but dictionaries which are attributes of the request object. `.get()` method is applicable to any dictionary object. You can check the official docs here http://docs.python.org/2/library/stdtypes.html#dict.get to know more about the get method. Also, If

Re: Guidance

2013-04-16 Thread Serdar Dalgic
On Tue, Apr 16, 2013 at 3:32 PM, Kishan Mehta wrote: > Hi, I am new to django. while learning from django book i came across > request.POST.get() > request.GET() > > etc methods. > > anyone can tell a where i can read more about this methods. > Take a look at this

Guidance

2013-04-16 Thread Kishan Mehta
Hi, I am new to django. while learning from django book i came across request.POST.get() request.GET() etc methods. anyone can tell a where i can read more about this methods. Also in future if i want to know which method does what exactly where to go.. I tried google but could not find any

Using postgres Users as django users

2013-04-16 Thread Maximilian Tyrtania
Hi there, This is my 1st post, so please be gentle... I'm looking into using django as web front end to my Postgres DB. Now in my PG server i have a number of db users (created via create user xy...), and I would like to use these users as well in my django->postgres connections. Obviously

Re:

2013-04-16 Thread Anton Parkhomenko
Actually, I don't think that any of Django-based CMS' (mezzazine, django-cms or feincms) is something like drupal or wordpress. Anyway you need to know django or python at some level, because there isn't plenty of ready-to-use themes and plugins. You always need to develop some parts by

Re: Using .extra after using .annotate is not working

2013-04-16 Thread Venkatraman S
On Tue, Apr 16, 2013 at 1:39 PM, Shabda Raaj wrote: > I am trying to get a field in a queryset which depends on the result > of the annotations. I tried using extra on an annotated queryset, > which doesn't seem to work. > Does something like this work?

[no subject]

2013-04-16 Thread vinoth job
i installed mezzanine.and this is django based cms .by using we can create websites .like what we can do with drupal and wordpress. my doubt is how to get host for my mezzanine project .is it anything that i want to change in codings.or is there any websites providing hostings for mezzanine

Using .extra after using .annotate is not working

2013-04-16 Thread Shabda Raaj
I am trying to get a field in a queryset which depends on the result of the annotations. I tried using extra on an annotated queryset, which doesn't seem to work. Lets say my models looks like this: class Foo(models.Model): name = models.CharField(...) class

Re: Django IO exceptions through times

2013-04-16 Thread Anton Parkhomenko
UPD. I found that on TemplateDoesNotExist Django notice me that templates are actually exists (3rd and 29th strings). But why they didn't not loaded? On Tuesday, April 16, 2013 2:51:18 PM UTC+8, Anton Parkhomenko wrote: > > Hi. > I have a strange problem with

Re: Handling duplicate js/css in forms media with included templates

2013-04-16 Thread Carsten Reimer
Hi, maybe django-sekizai (https://github.com/ojii/django-sekizai) might help you out. It let's you define blocks (especially for javascript and css) in subtemplates and takes care that no entry is doubled. The docs are here: http://django-sekizai.readthedocs.org/en/latest/ We use it in a

Django IO exceptions through times

2013-04-16 Thread Anton Parkhomenko
Hi. I have a strange problem with Django. It raise exceptions like TemplateDoesNotExist or ImportError, while actually files and modules are exists and have proper rights. This error appears not everytime, but in ~1/20 cases (not regular), thus I thought about to blame my VDS, but other

Re: Pagination with file upload (MultiValueDictKeyError)

2013-04-16 Thread Venkatraman S
On Tue, Apr 16, 2013 at 10:40 AM, wrote: > I have a simple form that takes a user upload, queries a database, and > displays results in a table. I receive the following error whenever I try > to go to the second, third, fourth, etc page: Why are you querying the DB?