What to Django people have to say about Javascript frameworks to complement Django's philosophy on the front end

2013-04-17 Thread Doug S
I hope this is OK to talk Javascript in this Django group, I'm hoping its relevant to enough Django folks to not be distracting. I'm relatively new to Django, but my impression is that a few years ago most django people prescribed to the wisdom of keeping javascript to a minimum and just using

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

2013-04-17 Thread sachin
Hello again, In extended auth user model, is there any *way to handle unique fields with django forms*. Lets say I have model like: class UserProfile(models.Model): user = models.OneToOneField(User) phone_num = models.BigIntegerField(null=True, unique=True) def __unicode__(self):

Re: Guide for migrating to a custom user model?

2013-04-17 Thread Mike Dewhirst
On 18/04/2013 12:33pm, Chris Streeter wrote: I found this [1] blog post to be interesting. I can't vouch for it's accuracy as I haven't migrated my own site yet, but it looks correct from reading it. I agree it is interesting. And useful - thank you Ponytech :) However, it assumes a desire

Re: Guide for migrating to a custom user model?

2013-04-17 Thread Chris Streeter
I found this [1] blog post to be interesting. I can't vouch for it's accuracy as I haven't migrated my own site yet, but it looks correct from reading it. - Chris [1]: http://ponytech.net/blog/2013/03/31/migrate-your-user-profile-data-django-15-custom-user-model/ On Wed, Apr 17, 2013 at 5:34

Re: What is Model Manager?

2013-04-17 Thread cha
Thanks for the clarification On Wednesday, 17 April 2013 20:24:57 UTC-4, Lachlan Musicman wrote: > > On 18 April 2013 10:10, cha wrote: > > Hello how are you > > Great, thanks for asking! > > > I want to explain to me what is **"Model Managers"** in django ??? and >

Re: What is Model Manager?

2013-04-17 Thread cha
Thank you On Wednesday, 17 April 2013 20:26:31 UTC-4, Shawn Milochik wrote: > > https://docs.djangoproject.com/en/1.5/topics/db/managers/ > > This should explain everything. > > > On Wed, Apr 17, 2013 at 8:10 PM, cha wrote: > >> Hello how are you >> I want to explain to me

Re: Guide for migrating to a custom user model?

2013-04-17 Thread Mike Dewhirst
On 18/04/2013 9:55am, Brian Neal wrote: Hello - I have a Django site that I've been maintaining for 4 years. It is running Django 1.4 now and is using the usual Django User model plus the get_profile() method to retrieve some extra information for each user. Now that Django 1.5 has landed and

Re: What is Model Manager?

2013-04-17 Thread Shawn Milochik
https://docs.djangoproject.com/en/1.5/topics/db/managers/ This should explain everything. On Wed, Apr 17, 2013 at 8:10 PM, cha wrote: > Hello how are you > I want to explain to me what is **"*Model Managers*"** in django ??? and > What are the useful ? > > -- > You

Re: What is Model Manager?

2013-04-17 Thread Lachlan Musicman
On 18 April 2013 10:10, cha wrote: > Hello how are you Great, thanks for asking! > I want to explain to me what is **"Model Managers"** in django ??? and What > are the useful ? They are a different way of collecting querysets of objects. Have you read the documentation

What is Model Manager?

2013-04-17 Thread cha
Hello how are you I want to explain to me what is **"*Model Managers*"** in django ??? and What are the useful ? -- 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

Guide for migrating to a custom user model?

2013-04-17 Thread Brian Neal
Hello - I have a Django site that I've been maintaining for 4 years. It is running Django 1.4 now and is using the usual Django User model plus the get_profile() method to retrieve some extra information for each user. Now that Django 1.5 has landed and we can substitute our own custom user

Re: Help interpreting profiler results (or: why is my app so slow?)

2013-04-17 Thread Shawn Milochik
When you print those out with pstats, sort by cumtime. cumtime = cumulative time That will tell you almost exactly (and maybe really exactly) which code is slow. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group

Help interpreting profiler results (or: why is my app so slow?)

2013-04-17 Thread Matt Andrews
Hi all. Having performance problems with my Django app. I've posted here before talking about this: one theory for my slowness woes was that I'm using raw SQL for everything after getting sick of Django doing things weirdly (duplicating queries, adding bizarre things like "LIMIT 3453453" to

Re: django-newsletter, cron job not working

2013-04-17 Thread frocco
Thank you On Wednesday, April 17, 2013 2:42:09 PM UTC-4, Shawn Milochik wrote: > > It's almost certainly an environment issue, such as an issue with your > PATH or PYTHONPATH. > > Just add to the command so that it puts all standard output and standard > error to a file to read what the message

Re: django-newsletter, cron job not working

2013-04-17 Thread Sam Walters
Hi In addition to the previous advice i would also check /etc/init.d/cron to see if the daemon is running. make sure you have the correct date+time settings in your shell eg: 'date' command. also run some sort of primitive debug command like: * * * * * touch "/tmp/$(date +\%d-\%m-\%Y-\%T)" for a

Re: django-newsletter, cron job not working

2013-04-17 Thread Shawn Milochik
It's almost certainly an environment issue, such as an issue with your PATH or PYTHONPATH. Just add to the command so that it puts all standard output and standard error to a file to read what the message is. your_command &> /tmp/broken_cron.log Then rig your cron job to run ASAP and read the

django-newsletter, cron job not working

2013-04-17 Thread frocco
Hello, Can someone give me an example of running a cronjob hourly? I am on webfaction and cannot get this working. I tried @hourly /usr/local/bin/python2.7 ~/webapps/ntw/myproject/manage.py runjob submit I get no email If I SSH in and sunit manually, it works fine -- You received this

Re: Can I get away with creating login/logout.html ?

2013-04-17 Thread Vibhu Rishi
I tried this but when I click submit, the page goes to http://127.0.0.1:8000/account/login/ . i suppose once the login part finishes it is supposed to go to the LOGIN_REDIRECT_URL setting. Vibhu On Wed, Apr 17, 2013 at 9:38 PM, Gabriel [SGT] wrote: > > still trying to

Re: Can I get away with creating login/logout.html ?

2013-04-17 Thread Gabriel [SGT]
> still trying to figure out the login part. > https://docs.djangoproject.com/en/dev/topics/auth/default/#module-django.contrib.auth.views See settings.LOGIN_REDIRECT_URL Regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Can I get away with creating login/logout.html ?

2013-04-17 Thread Vibhu Rishi
update: logout seems to be working if i change the logout url pattern to : (r'^logout/$', 'logout', {'template_name':'homepage/index.html', 'next_page':'/'}), still trying to figure out the login part. Vibhu On Wed, Apr 17, 2013 at 8:05 PM, Vibhu Rishi wrote: > Hi, >

Re: Possible Basic kwargs question.

2013-04-17 Thread Rainy
When the definition is method(self, **kwargs), you ARE asking variable named kwargs. If you want to accept one dict object, it should be: method(self, mydict). If you want to accept variable list of args, it should be method(self, *mylist) -ak On Wednesday, April 17, 2013 12:59:21 AM UTC-4,

Re: django-social-auth problem with facebook

2013-04-17 Thread Rainy
When you get this error, you need to look at your database error log, e.g. for postgres 8.4 on linux: tail -n100 /var/log/postgresql-8.4-main.log It should tell you the exact sql command that caused the first error (you might need to scroll up). On Monday, April 15, 2013 2:01:21 AM UTC-4,

Can I get away with creating login/logout.html ?

2013-04-17 Thread Vibhu Rishi
Hi, I am trying to figure out if i can get away with creating the login.html and logout.html files ? The scenario is this: - I have a navigation bar which has the username/password field in it . I am using the example at : http://twitter.github.io/bootstrap/examples/hero.html - I want the user

Re: Django-Registration/Custom Authentication Issue

2013-04-17 Thread Scott Anderson
That's good to know. How stable is it? -scott Via mobile phone On Apr 17, 2013, at 3:52 AM, James Bennett wrote: Current hg tip is actually 1.5-compatible, in the sense that if you want to use your own User model, you just subclass the provided stuff and plug in your

Re: how to fatch data from mysql database using jQuery in my django project?

2013-04-17 Thread Gerald Klein
You have to call an action from jQuery and use the results passed back, you can return it in json text etc, this will be returned to the jQuery ajax get call. $.get(url,function(data) { //use data here to inject html }); On Wed, Apr 17, 2013 at 8:57 AM, Avnesh Shakya

how to fatch data from mysql database using jQuery in my django project?

2013-04-17 Thread Avnesh Shakya
hi, please tell me someone, I want to fetch data dynamically using jquery from database.. how it is possible, give me a example... please help me, i need it in my project. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: models.ManyToManyField

2013-04-17 Thread Gabriel
Hey, I didn't quite understand what you're trying to do, so I'm covering both interpretations. 1- If you're trying to, for instance, get all the films an actor was in you can, as explained here https://docs.djangoproject.com/en/1.5/topics/db/queries/#many-to-many-relationships(the link is for

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

2013-04-17 Thread Bill Freeman
One way is to replace/wrap/monkey-patch the login view to save a copy of the last login element for the looked up user in a local variable, and then, if login is successful, and the last login was long enough ago, modify the successful login redirect to your "instructions" page. On Tue, Apr 16,

models.ManyToManyField

2013-04-17 Thread Federico Erbea
Hello everyone, I am a neophyte and maybe it's a stupid question so thank you in advance aid. My question is: can I go back and retrieve all the movies assigned to a specific actor, director, or other through the class film? Or do I have to create a specific class for each item to which I want

Re: Using postgres Users as django users

2013-04-17 Thread Alex Mandel
It's possible but you may need to split out django and non-django into a front and back end. This sounds similar to phpmyadmin or phppgadmin I think the key to this is that django only be used to store the user and connection information for each database (And provide a web interface). When a

Re: Django-Registration/Custom Authentication Issue

2013-04-17 Thread James Bennett
Current hg tip is actually 1.5-compatible, in the sense that if you want to use your own User model, you just subclass the provided stuff and plug in your model, either importing directly or using the helper function in Django 1.5. django-registration does not do this itself because 1. Using

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

2013-04-17 Thread isachin
Thanx, Btw, I solved it by creating an instance of get_profile() and then saving user and profile separately. here is the code snippet of *forms.py* if commit: profile = user.get_profile() profile.serial_num = self.cleaned_data['serial_num'] profile.save()

Re: Using postgres Users as django users

2013-04-17 Thread Maximilian Tyrtania
Am Dienstag, 16. April 2013 17:52:11 UTC+2 schrieb אברהם סרור: > > So you are saying that each user models will be using the same database > but with different connection settings? > Yes, exactly. Each user has his own username. That's what the SQL command "create user xy" is for exactly. I

Re: Possible Basic kwargs question.

2013-04-17 Thread Mario Gudelj
I think this might be a useful article for you http://agiliq.com/blog/2012/06/understanding-args-and-kwargs/ On 17 April 2013 15:45, Brad Pitcher wrote: > I see what you're saying. Maybe you're looking for something more like > this? > > def method1(self,