ManyToMany field creation problem

2013-12-05 Thread Mrinmoy Das
Hi, I have these tables on apps/common/models.py class UnitType(models.Model): title = models.CharField(max_length=50) def __unicode__(self): return u'%s' % self.title class UnitPrice(models.Model): project = models.ForeignKey('property.Property') unit_type =

Re: Does not generate the password hash my User

2013-12-05 Thread Ricardo
Ok Em quinta-feira, 5 de dezembro de 2013 17h54min44s UTC-2, Ricardo escreveu: > > I have a model "Cliente" and in it a field "password". > In forms.py file, I am using ModelForm, but put in the password field > Password = forms.CharField (widget = forms.PasswordInput (render_value = > True)) >

Re: Does not generate the password hash my User

2013-12-05 Thread Thomas Lockhart
On 12/5/13 3:55 PM, Ricardo wrote: Hi Thomas. Even entering rende_value = False does not. The password keeps popping up as text. did not quite understand how that password1 is inserted before the check password2. I could not see this problem. You have found the limits of my knowledge. If it

Re: Does not generate the password hash my User

2013-12-05 Thread Ricardo
Hi Thomas. Even entering rende_value = False does not. The password keeps popping up as text. did not quite understand how that password1 is inserted before the check password2. I could not see this problem. Em quinta-feira, 5 de dezembro de 2013 17h54min44s UTC-2, Ricardo escreveu: > > I have

Re: Complex validation

2013-12-05 Thread Lachlan Musicman
On 5 December 2013 18:10, Mike Dewhirst wrote: > On 5/12/2013 3:18pm, Lachlan Musicman wrote: >> >> Actually, as a corollary to my previous question, I can't tell from >> the Docs whether the model's validation process (in particular, the >> clean() method) is called at

Re: Complex validation

2013-12-05 Thread Lachlan Musicman
On 5 December 2013 18:21, Mike Dewhirst wrote: > On 5/12/2013 3:04pm, Lachlan Musicman wrote: >> The model's clean(): >> >>pn = self.part_number() >>all_parts = Part.objects.all() >>for part in all_pns: >> if pn == part.part_number(): >>

Re: How to query multiple described objects exist in a many to many field

2013-12-05 Thread Aamu Padi
Thank you so much! That was a very helpful explanation. And it worked perfectly!!! Just, one more question please. Suppose, the user wants to send a message to a group of users, how do I find the thread in this situation? Eg: user1 wants to send a message to both the user2 and user3. How to find

Re: Does not generate the password hash my User

2013-12-05 Thread Tom Lockhart
On 2013-12-05, at 11:54 AM, Ricardo Kamada wrote: > I have a model "Cliente" and in it a field "password". > In forms.py file, I am using ModelForm, but put in the password field > Password = forms.CharField (widget = forms.PasswordInput (render_value = > True)) > It

Does not generate the password hash my User

2013-12-05 Thread Ricardo Kamada
I have a model "Cliente" and in it a field "password". In forms.py file, I am using ModelForm, but put in the password field Password = forms.CharField (widget = forms.PasswordInput (render_value = True)) It turns out that the admin password field appears readable, and I do not want that to

Spammed with 'Invalid HTTP_HOST header' messages

2013-12-05 Thread Jon Dufresne
I am running Django 1.6. I receive a lot of false positive errors from my Django application when accessed with an invalid HTTP_HOST. I have verified that these are in fact HTTP_HOST values that I am not interested in. So I *do* want to return an error to the user. However, it doesn't help me as

break in template

2013-12-05 Thread fabricio
I have this code For items in% {%} formset_itens.forms {}%% If itens.errors Errors I need to make this hum breaking point {% Endif%} {% Endfor%} This is how I do. fabricio. -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: python virtual environment

2013-12-05 Thread mulianto
Hi, You can use the new manage.py in django 1.6 doc , or you generate a new project, then copy it to your existing project. I have this error also when i try my django1.3 project in django1.6 in virtenv. Hope helps, Regards, Mulianto Blog : Http://muliantophang.blogspot.com Sent from my

Re: Django application

2013-12-05 Thread Sandeep kaur
On Thu, Dec 5, 2013 at 9:39 AM, Lachlan Musicman wrote: > > > Have you read this part of the documentation? > > https://docs.djangoproject.com/en/1.6/howto/deployment/ Everything is fine with deployment of project on server with nginx. Its only with the new app I added to the

Re: need some explanation

2013-12-05 Thread Scot Hacker
On Wednesday, December 4, 2013 5:27:39 AM UTC-8, Tom Evans wrote: > > On Wed, Dec 4, 2013 at 7:20 AM, Hussain Nagri > > wrote: > > Hello, > > I am new to Django and trying to learn myself. > > My question is that when we create models in model.py then after each > class

Re: python virtual environment

2013-12-05 Thread Vibhu Rishi
so, for an existing project, how do i update the manage.py file ? create a new project in 1.6 and copy it over ? V. On Thu, Dec 5, 2013 at 9:58 PM, Timothy W. Cook wrote: > > > > On Thu, Dec 5, 2013 at 2:09 PM, Vibhu Rishi wrote: > >> I am getting the

Re: python virtual environment

2013-12-05 Thread Timothy W. Cook
On Thu, Dec 5, 2013 at 2:09 PM, Vibhu Rishi wrote: > I am getting the same error when I did an upgrade of Django to 1.6 . > Reverted back to 1.5 and it seems to work, but i am still searching for a > solution for this to work with 1.6 > > V. > > execute_manager was

How is /admin/jsi18n/ created

2013-12-05 Thread Vincent Hussey
Hi, We are looking at date formats for django and we are trying to figure out how django creates the localised formats found at the link below. After a bit of investigation we have found out how to set them using DATE_FORMAT, TIME_FORMAT etc. settings in settings.py, but we'd like to

Re: python virtual environment

2013-12-05 Thread Vibhu Rishi
I am getting the same error when I did an upgrade of Django to 1.6 . Reverted back to 1.5 and it seems to work, but i am still searching for a solution for this to work with 1.6 V. On Fri, Nov 29, 2013 at 11:14 PM, tino wrote: > > > Hello > > I am trying to run a project

Re: django add catalog category typeerror

2013-12-05 Thread Lasha Gogua
urls.py from django.conf.urls import patterns, include, url from django.views.generic import ListView, DetailView from myshop.models import * urlpatterns = patterns('django.views.generic.list_detail', url(r'^product/$', 'object_list', {'queryset':Product.objects.all()}),

Re: django add catalog category typeerror

2013-12-05 Thread Lasha Gogua
i use django 1.2 e-commerce and don't description views.py ((( On Thursday, December 5, 2013 4:50:57 PM UTC+4, Sergiy Khohlov wrote: > > Send a view.py and urls.py > > Many thanks, > > Serge > > > +380 636150445 > skype: skhohlov > > > On Thu, Dec 5, 2013 at 8:21 AM, Lasha Gogua

Re: Generate a random directory for files to be uploaded

2013-12-05 Thread Matt Lind
Disregard. I found my error. I was trying to pass something I shouldn't have. This seems to be working now. Thanks again! On Thursday, December 5, 2013 9:10:13 AM UTC-5, Daniel Roseman wrote: > > On Thursday, 5 December 2013 12:23:52 UTC, Matt Lind wrote: >> >> Ok, I get what what you're

Re: Generate a random directory for files to be uploaded

2013-12-05 Thread Matt Lind
I did miss that thanks! However, I now seem to have an issue with the def my_upload_to(instance, filename) line. Apparently "self" nor "instance" works here, and so I am getting the error 1 argument given when I need "two". @staticmethod doesn't seem to want to work properly either. Thanks

Re: Generate a random directory for files to be uploaded

2013-12-05 Thread Matt Lind
I should also state that further down in the code I make use of snippets like: basename = os.path.basename( instance.file.file.name ) So by not passing and uploading the file right away it seems like those snippets don't work anymore On Sunday, November 24, 2013 10:31:34 AM UTC-5, Michael

Re: Generate a random directory for files to be uploaded

2013-12-05 Thread Daniel Roseman
On Thursday, 5 December 2013 12:23:52 UTC, Matt Lind wrote: > > Ok, I get what what you're saying, but I seem to be having a heck of a > time getting the randDir passed into the instance to perform the upload. > > Here is the new code snippets: > > views.py > instance = Upfile( file = file) >

Re: django add catalog category typeerror

2013-12-05 Thread Sergiy Khohlov
Send a view.py and urls.py Many thanks, Serge +380 636150445 skype: skhohlov On Thu, Dec 5, 2013 at 8:21 AM, Lasha Gogua wrote: > help me please... > > TypeError at /admin/myshop/catalogcategory/add/ > > 'NoneType' object has no attribute '__getitem__' > > Request

Re: Django application

2013-12-05 Thread Sandeep kaur
On Thu, Dec 5, 2013 at 9:37 AM, Lachlan Musicman wrote: > > Which web server are you using to serve it on the host server? > > Apache, nginx are the most likely... > It's nginx. > And how do you have that web server configured? I configured it using gunicorn and supervisor.

django add catalog category typeerror

2013-12-05 Thread Lasha Gogua
help me please... TypeError at /admin/myshop/catalogcategory/add/ 'NoneType' object has no attribute '__getitem__' Request Method:POSTRequest URL: http://127.0.0.1:8000/admin/myshop/catalogcategory/add/?_popup=1Django Version:1.5Exception Type:TypeErrorException Value: 'NoneType' object has

Re: Generate a random directory for files to be uploaded

2013-12-05 Thread Matt Lind
Ok, I get what what you're saying, but I seem to be having a heck of a time getting the randDir passed into the instance to perform the upload. Here is the new code snippets: views.py instance = Upfile( file = file) instance.upload(randDir) models.py @staticmethod def upload(randDir) file

Re: Adding sign on required fields in django form

2013-12-05 Thread Larry Martell
On Thu, Dec 5, 2013 at 3:29 AM, Harjot Mann wrote: > In django form I want to add a * symbol on those fields which are > compulsory so that user can recognize from the name of the field that > this field is required field. You could use the HTML placeholder attribute.

Re: Adding sign on required fields in django form

2013-12-05 Thread Mike Dewhirst
On 5/12/2013 7:29pm, Harjot Mann wrote: In django form I want to add a * symbol on those fields which are compulsory so that user can recognize from the name of the field that this field is required field. I've never done this in Django but normally I would use a CSS class. Try looking up

Adding sign on required fields in django form

2013-12-05 Thread Harjot Mann
In django form I want to add a * symbol on those fields which are compulsory so that user can recognize from the name of the field that this field is required field. -- Harjot Kaur Mann Blog: http://harjotmann.wordpress.com/ Daily Dairy: http://harjotmann.wordpress.com/daily-diary/ -- You