blank=True, null=True dont work with UserProfile

2011-04-30 Thread Daniel Corbe
Hello friends, I have the following models, the problem is that the fields null = True and blank = True, are being validated when they should enter zero plumb, can someone help me? class UserProfile(models.Model): sexo = models.CharField(choices=(("masculino","masculino"),("feminino","femin

Re: django-cas-consumer template question

2011-04-30 Thread Alex Kamedov
Your user must be registered on service with django-cas-provider. Insead of django-cas-consumer i recomend to use django-cas [1] [1] http://code.google.com/p/django-cas/ On Fri, Apr 29, 2011 at 8:48 PM, Stodge wrote: > Of course! Thanks - I have the template working, now I need to get the > log

Re: How do I set permissions for manual install of 1.3 for ubuntu 11.04?

2011-04-30 Thread Lachlan Musicman
On Sat, Apr 30, 2011 at 12:57, jsierra wrote: > I installed django 1.3 manually on my laptop, since ubuntu 11.04 does not > ship with 1.3 and I want to be able to run django-admin without having to > sudo the command when creating projects and subsequently having to use sudo > with manage.py. I wa

Unable to log in to admin using RemoteUserMiddleware

2011-04-30 Thread Dustin
Hello, I'm having difficulty finding a fix for this problem. Someone posted the exact same problem I am having about a year ago. Has there been any solution to this? Basically, RemoteUserMiddleware is working just fine after I followed these directions: http://docs.djangoproject.com/en/dev/howto/

Re: form input

2011-04-30 Thread Kenny Meyer
As a newbie I recommend you taking the Django tutorial. Here's the part about forms: http://docs.djangoproject.com/en/dev/intro/tutorial04/ Kenny On Sat, Apr 30, 2011 at 7:24 PM, Pulkit Mehrotra wrote: > can anyone tell me the precise way of taking an input from a form and > storing it in a da

Re: Attribute error

2011-04-30 Thread Pulkit Mehrotra
changed the name but nothing happened the django version is 1.3 -- 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+unsu

form input

2011-04-30 Thread Pulkit Mehrotra
can anyone tell me the precise way of taking an input from a form and storing it in a database or provide a good link where i can find one i am a newbie so please help me thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: probably a simple query: looping for an integer number within an html page

2011-04-30 Thread Shawn Milochik
This works: {% for val in the_list %} {{ val }} {% endfor %} -- 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

Re: Attribute error

2011-04-30 Thread Karen Tracey
On Sat, Apr 30, 2011 at 3:45 PM, Pulkit Mehrotra wrote: > 'module' object has no attribute 'CharField' > > What does this error means ??? > > View for this is: > from django.shortcuts import render_to_response > from django.http import HttpResponseRedirect,HttpResponse > from wishlist.models impor

Re: user and perms context variables from auth context processor (in Django 1.2.3)

2011-04-30 Thread Karen Tracey
On Fri, Apr 29, 2011 at 9:22 AM, simon wrote: > > I am using Django 1.2.3. I was trying to check user permissions on a > certain model using the perms context variable from > contrib.auth.context_processors.auth. As per the documentation, I > tried this (foo is the app label, Bar is the model, an

probably a simple query: looping for an integer number within an html page

2011-04-30 Thread Jason
Hi there, I am writing a list with values to a web page. Within that page a list item (somelist.int_item) takes an integer value. What I'm trying (and failing) to do is to write a for loop that repeats for the number in the integer item. So far I've got {% for number in somelist.int_item %}

Re: Print "flash" messages in templates for certain levels

2011-04-30 Thread Kenny Meyer
> Or is there other better solution? I think you should handle this in the view, like checking there if the user has sufficient privileges for seeing the message. Kenny -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Attribute error

2011-04-30 Thread Yongning Liang
class wish(models.Model): wish=models.CharField(max_length=200) what's your django version On Sun, May 1, 2011 at 3:45 AM, Pulkit Mehrotra wrote: > AttributeError at /mysite/wishlist/ > > 'module' object has no attribute 'CharField' > > What does this error means ??? > > View for this

Attribute error

2011-04-30 Thread Pulkit Mehrotra
AttributeError at /mysite/wishlist/ 'module' object has no attribute 'CharField' What does this error means ??? View for this is: from django.shortcuts import render_to_response from django.http import HttpResponseRedirect,HttpResponse from wishlist.models import wish from wishlist.forms import

Re: django uwsgi

2011-04-30 Thread CrabbyPete
Thanks Shawn, That is exactly what it is. I could have added one path up. I just changed my ROOT_URLCONF = 'urls' instead of ROOT_URLCONF = 'project.urls' in my settings and it works fine. On Apr 30, 1:42 pm, Shawn Milochik wrote: > It sounds like your project directory is not on your PYTHONPATH,

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread Shawn Milochik
You shouldn't have to. Django should be installed within the virtualenv -- that's kind of the point of virtualenv. You can have any versions of any Python packages (like Django) without any effect on your OS's Python installation or other virtualenvs. -- You received this message because you are

Input element radio button group across rows of change list view in Admin?

2011-04-30 Thread creecode
Hello all, I'm attempting to create a change list view in the Admin where the first column is a single radio button. I want the radio buttons to be a group that is shared across the rows. I want the change list view to show the Save button so that the form can be posted. When the form is pos

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread shofty
its just dawned on me what i've done. forgot to add the lines into the top of the django-admin.py to activate the virtualenv when it is used tjhanks for the help guys. On Apr 30, 6:11 pm, Andres Lucena wrote: > El 30/04/11 18:06, shofty escribi : > > > recreated the virtualenv from scratch tota

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread shofty
1.3.0 final and this time after a clean reinstall, django-admin has indeed created the settings file i was expecting. i think im coming round to the idea that i might have django installed outside of the virtualenvs and somehow the settings.py was created from that. On Apr 30, 6:11 pm, Andres Lu

Re: django uwsgi

2011-04-30 Thread Shawn Milochik
It sounds like your project directory is not on your PYTHONPATH, so when settings tries to import your default urls.py it fails. I'm not familiar with uwsgi, so maybe that's what the addsitedir is supposed to do, but other wsgi files I've seen there's always been a line like sys.path.append(pr

django uwsgi

2011-04-30 Thread CrabbyPete
I am trying to deploy a django project with nginx and uwsgi. I think I have it all set up right but when I hit the site I get the following error: No module named project.urls I know everything else is working because I still have debug on and can see that settings.py is being read. I know I'm fo

Deploy to stodgy Apache

2011-04-30 Thread Jonathan Hayward
I have a somewhat stodgy Apache server, running under SunOS, and I would like an appropriate way to deploy a Django application based at /shop/ or some other URL. The server seems set up to allow FastCGI in some form; there is an /fcgi-bin/ directory with one entry. Apache does not recognize the F

Re: django help

2011-04-30 Thread Andres Lucena
El 30/04/11 14:56, Marcos Moyano escribió: > Read the static-files docs > Also read this document: http://www.catb.org/~esr/faqs/smart-questions.html > On Sat, Apr 30, 2011 at 4:14 AM, Sunil Chugh > wrote: > > how can i used static_root > > -- > Yo

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread Andres Lucena
El 30/04/11 18:06, shofty escribió: > recreated the virtualenv from scratch totally, still got the same > result. what am i doing wrong here? really cant work it out. Exactly what is the output? What is the content of $HOME/.pip/pip.log? $ cat $HOME/.pip/pip.log Also, I don't understand what y

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread shofty
recreated the virtualenv from scratch totally, still got the same result. what am i doing wrong here? really cant work it out. On Apr 30, 4:11 pm, shofty wrote: > that folder is empty too. > > On Apr 30, 3:40 pm, christian verkerk > wrote: > > > > > > > > > Sometimes virtualenv does not delete a

Re: django-admin.py startproject mysite

2011-04-30 Thread Yongning Liang
if you tried the command django-admin.py startproject mysite and it output the usage, it mean the PATH of Python and django-admin.py is correct, maybe you type a wrong subcommand. BTW, are you install Django with setuptools(python setup.py install)? On Sat, Apr 30, 2011 at 10:16 PM, Daisy wrote:

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread shofty
that folder is empty too. On Apr 30, 3:40 pm, christian verkerk wrote: > Sometimes virtualenv does not delete an existing install out of the > MY_ENV/build directory causing an upgrade to fail. delete that build > directory and try again. > > Also using sudo can somethings screw things up... > >

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread shofty
nah, theres something else going on here, i've successfully uninstalled then downloaded 1.3 with pip but when i open up the settings file, the staticfiles stuff and the logging stuff are missing. used pip install django==1.3 -E envname but on the mac its definitely brought down the right version.

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread christian verkerk
Sometimes virtualenv does not delete an existing install out of the MY_ENV/build directory causing an upgrade to fail. delete that build directory and try again. Also using sudo can somethings screw things up... On Apr 30, 4:34 pm, shofty wrote: > is there something wrong with the packages at wh

Re: problem installing django 1.3 in virtualenv

2011-04-30 Thread shofty
just managed to install 1.3 on my mac, so i guess the problem is on the debian vps. is there some sort of package manager i need to point somewhere else? i'll go do a google. On Apr 30, 3:34 pm, shofty wrote: > is there something wrong with the packages at whatever server they are > hosted? > > p

problem installing django 1.3 in virtualenv

2011-04-30 Thread shofty
is there something wrong with the packages at whatever server they are hosted? pip install upgrade django==1.3 -E envname just isnt working. installed django into the virtualenv just this morning and its put 1.2.3 in there. can get it to upgrade to 1.3 at all. if i recall theres a possibility th

django postgresql error

2011-04-30 Thread Yasmany Cubela Medina
hi, im deploying my django app in a webhost (mochahost) and i get this error MOD_PYTHON ERROR ProcessId: 23641 Interpreter:'gruporole.com' ServerName: 'gruporole.com' DocumentRoot: '/home/gruporol/public_html' URI:'/services' Location: None Directory: '/hom

Re: django-admin.py startproject mysite

2011-04-30 Thread Daisy
I have just did what you said and the result was (no project created) and the output was: Usage: django-admin.py subcommand [options] [args] Options: -v VERBOSITY, --verbosity=VERBOSITY Verbosity level; 0=minimal output, 1=n

Re: django form inputs

2011-04-30 Thread А . Р .
2011/4/30 Pulkit Mehrotra : >from wishlist.models import wish >from wishlist.forms import wish After a quick glance: you're binding wishlist.forms and wishlist models to the same name. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

django form inputs

2011-04-30 Thread Pulkit Mehrotra
Environment: Request Method: GET Request URL: http://127.0.0.1:8000/mysite/wish Django Version: 1.3 Python Version: 2.7.1 Installed Applications: ['django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.messages', 'django.cont

Re: django help

2011-04-30 Thread Marcos Moyano
Read the static-files docs On Sat, Apr 30, 2011 at 4:14 AM, Sunil Chugh wrote: > how can i used static_root > > -- > 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 unsubs

Print "flash" messages in templates for certain levels

2011-04-30 Thread veena
Hi, django.contrib.messages is very handy and useful app. When I use it in template I'd like to print in one place in template only messages with certain level. That's not possible as I can understand it. You can print all of them (as described in documentation): {% if messages %} {% for mess

django help

2011-04-30 Thread Sunil Chugh
how can i used static_root -- 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 opt

queryset._clone() in generic views

2011-04-30 Thread Alex
What is 'queryset = queryset._clone()' statement in django.views.generic.list_detail.object_list view used for? Has it something to do with prevention of usage of cached results, to allow QuerySet to reflect changes made to the database? Should I use _clone(), too, if I'm reimplementing this view i

Re: django-admin.py startproject mysite

2011-04-30 Thread Yongning Liang
The path of django-admin.py is *YOUR_PYTHON_PATH* \Lib\site-packages\django\bin after this, you can just type django-admin.py startproject mysite to start a project. but make sure that your .py file default open by Python, if not, right-click(Shift + right-click in XP) a .py file and select open wi

Re: How do I set permissions for manual install of 1.3 for ubuntu 11.04?

2011-04-30 Thread jsierra
I figured it out, i chmod -R 775 the django directory located in /usr/local/lib/python2.7/dist-packages and was able to use the commands without sudo. Whether or not that's a good idea, I don't know, but it's my personal laptop anyway. Thanks for tying to help Shawn. Much appreciated. Regards,

Re: How do I set permissions for manual install of 1.3 for ubuntu 11.04?

2011-04-30 Thread jsierra
well, i install using sudo setup.py install and django is installed in /usr/local/lib/python2.7/dist-packages. Everything works fine when I use sudo before each command. I just want to make it less strict in that regard and allow myself to use the commands without having to sudo. I am not sure

Re: django-admin.py startproject mysite

2011-04-30 Thread Daisy
Thank you for your reply, Python is in my system PATH but How to add django-admin in my path. I mean what will be the enviroment variable for django-admin that i have to put in my system PATH? On Apr 30, 4:37 am, Yongning Liang wrote: > type this in Windows > python django-admin.py startproject m