Flatpages

2009-01-21 Thread Gordon
cts/django/ /projects/ruby/ what I'm looking for is someway of automatically traversing the URLS for all the flatpages on my site so that I can generate a table of contents relative to where I am on the site. Regards Gordon --~--~-~--~~~---~--~~ You receiv

Two forms.Form one page: second form will not show any errors

2009-02-04 Thread Gordon
Hello, I have seperate django forms wrapper in one html form tag in my template. When i render, both forms display fully. When I post, errors display for the first form but not for the second. I am using a tag by tag approach to the the template. Interesting thing is I did a test to see if form

Re: Two forms.Form one page: second form will not show any errors

2009-02-04 Thread Gordon
splay errors fine. Thanks, On Feb 4, 11:14 pm, Karen Tracey wrote: > On Thu, Feb 5, 2009 at 2:03 AM, Gordon wrote: > > > Hello, > > I have seperate django forms wrapper in one html form tag in my > > template. > > > When i render, both forms display fully. W

FilePathField Saved as Unicode

2009-06-20 Thread Gordon
first_name, bro.last_name) bro.pic = FilePathField(path = p, match = m) bro.save() The problem is pic is being saved as unicode text, so I get an error when I try to call pic.path or pic.match. Thanks for the help. -Gordon --~--~-~--~~~---~--~~ You received thi

Model.save() vs. ManyToMany

2009-01-21 Thread David Gordon
Hi Folks, I'm aware that foreign key fields such as manytomany don't update during the save() method of Model, and that there are some issues surrounding relations to 'self'. I have a model which has a couple of utility functions to update two such relations, and I've found that they don't do any

Re: Model.save() vs. ManyToMany

2009-01-21 Thread David Gordon
Hi Malcom, > Please post a small example fragment demonstrating what you're trying to > do. Here's the problem code: class Xeme(models.Model): """Grapheme, phoneme, morpheme, etc - any linguistic entity representable by a string.""" text = models.CharField(max_length=15

Re: Model.save() vs. ManyToMany

2009-01-22 Thread David Gordon
I'll try simplifying the example further in case anyone is able to help... > Here's the problem code: class Xeme(models.Model):    text = models.CharField(max_length=150, db_index=True)    components = models.ManyToManyField(         'self', symmetrical=False, blank=True,         related_name=

Re: Two forms.Form one page: second form will not show any errors

2009-02-05 Thread Gordon Cassie
. So it looks like this: __all__ Error message raised by my custom validation Thanks again for previous help! On Thu, Feb 5, 2009 at 6:31 AM, Alex Gaynor wrote: > > > On Thu, Feb 5, 2009 at 2:25 AM, Gordon wrote: > >> >> Form 1 Template (rendered from view): >

Re: Two forms.Form one page: second form will not show any errors

2009-02-05 Thread Gordon Cassie
Thanks very much for the help! On Thu, Feb 5, 2009 at 12:07 PM, Alex Gaynor wrote: > > > On Thu, Feb 5, 2009 at 2:10 PM, Gordon Cassie wrote: > >> That did the trick. >> >> Another quick question. I have made some custom validations in the forms >> clean(

email as username best practice in 1.4

2012-08-09 Thread Gordon Wrigley
What is the recommended best approach for using emails as usernames in Django 1.4? I've looked in the FAQ and couldn't find anything, I see there is this issue https://code.djangoproject.com/ticket/3011 which is likely to be addressed in 1.5 but I can't wait for 1.5. Searching here, stackoverfl

Remote working job opportunity for Python/Django programmers

2011-11-10 Thread Gordon Mac
olid contributor and be willing expand the team as project grows. This an excellent opportunity for Python/Django programmers. Interested technical person, please respond to this email with resume and contact information. Our HR will call you Thanks Gordon -- You received this message because you

Creating JSON file

2013-04-08 Thread Seth Gordon
You want to output a list of one dict per object, and you want that dict to contain another dict inside it. So you don’t need dict2. Instead f = file('report.json','a+') sys.stdout = f result = [] objects = game_objects.objects.all() for obj in objects: time = time_

removing the source of a OneToOneField relationship

2011-05-03 Thread Seth Gordon
I have one Django model that points to another one with a OneToOneField, sort of like this: class Target(models.model): # stuff class Source(models.Model): target = models.OneToOneField(Target) Sometimes, given an object that is an instance of Target, I want to navigate to its Source and

Re: removing the source of a OneToOneField relationship

2011-05-04 Thread Seth Gordon
On 05/04/2011 12:43 AM, Andy McKay wrote: > > On 2011-05-03, at 2:05 PM, Seth Gordon wrote: >> I get an exception, complaining that Target.source does not allow >> null values. > > You'll probably want to allow null values on your OneToOne field then: > > h

Re: django test framework with no models.py

2010-12-30 Thread Seth Gordon
On 12/27/2010 09:58 AM, Henrik Genssen wrote: > Hi, > > I wanted to write a test for an app, that does not have a models.py itself. > Doing so I get: > django.core.exceptions.ImproperlyConfigured: App with label service could not > be found > > if I create a models.py with just a "pass" in it ev

Re: Japanese Text Sort Order

2011-01-05 Thread Seth Gordon
On 01/05/2011 07:57 AM, James Hancock wrote: > I think it does the same thing, but I was talking about how you cant set > 'ordering' under the Meta class in a model. > http://docs.djangoproject.com/en/1.2/ref/models/options/#django.db.models.Options.ordering > >

Re: icontains case-sensitive on MySQL

2015-05-31 Thread Jake Gordon
There needs to at least be a warning in the documentation. I spent a lot of time debugging only to find this was a problem with Django. On Thursday, October 16, 2008 at 6:56:07 PM UTC-4, Malcolm Tredinnick wrote: > > > On Thu, 2008-10-16 at 11:15 -0700, AndyB wrote: > > Well - someone on #Djang

Does django work with bootstrap 4

2017-11-27 Thread Gordon Neal
Looking to start a web design projects and as a python programmer I would like to use django but it seems difficult. I am planning on using bs v 4 with Sass. This is a new project. Any solution so I don't have to learn the whole ruby stuf -- You received this message because you are subscribed

Re: Choices in DecimalField - django 1.8.

2017-09-19 Thread Gordon Wrigley
In case anyone else ends up here, I've found that it's very sensitive to how you specify the Decimal, so in my example Decimal('20.00') worked but Decimal('20') and Decimal(20) did not. On Monday, April 20, 2015 at 6:44:30 PM UTC+1, eltonplima wrote: > > In the model below, using the Django admi

NOOB exposes CSRF token. Now what?

2015-09-25 Thread Gordon Reeder
I'm learning Django and still very new at it. And like a newbie, I may have made a newbie goof. I have leaked my CSRF token. I am building up a web site with Django which I have under revision control with Git. I have pushed two commits of the project out to Github. The commits included the sett

Re: NOOB exposes CSRF token. Now what?

2015-09-26 Thread Gordon Reeder
OK, thanks everyone for the replies. It looks like I'll have to regenerate the secret_key (not token). Thankfully, I have not actually deployed the site yet. So the pain should be minimal and limited to just me. On Friday, September 25, 2015 at 3:34:37 AM UTC-7, Gordon Reeder wrote: &g

invitation to collaborate on a django_yosai integration

2016-03-15 Thread Darin Gordon
Hey everyone I'm the author of Yosai, a security framework for python applications. Yosai can be used by a wide range of applications, not just web applications. The first PyPI release of Yosai is imminent -- by end of March. The release of the project coincides with the release of a few "ba

Re: URL path not working with Django ver 2.1.2

2018-11-23 Thread gordon nchy
in your url u tried to make use of regularexpression sign i.e ^$ so i suggest u will have to make it a raw string in this way ( r'^$' ). gnchy On 23 Nov 2018 10:31, "Yavin Aalto Arba" wrote: > Path is not using regular expressions. Use empty quotes and it should > work. > > On Fri, Nov 23, 201

RE: Website is running in Django and also clients want to make theMobile APP.

2018-11-23 Thread gordon nchy
I face the same problem anyone to assist please! Sent from Mail for Windows 10 From: Jani Tiainen Sent: Friday, November 23, 2018 11:21 To: django-users@googlegroups.com Subject: Re: Website is running in Django and also clients want to make theMobile APP. Hi, You can access Django site fo

Custom attributes in django forms

2018-11-25 Thread gordon nchy
hello everyone i'm facing a challenge on how to add custom attributes to django login form. i used the LoginView from django.contrib.auth.views to generate a login form, but i really need help on how to add custom attributes maybe like using widgets but i dont know how to do it..i'll appreci

Re: Custom attributes in django forms

2018-11-26 Thread gordon nchy
thanks! gnchy On 26 Nov 2018 11:22, "Yavin Aalto Arba" wrote: > Hi Gordon, > > Try starting with the documentation here and if u have any questions > please let us know: > > https://docs.djangoproject.com/en/2.1/ref/forms/widgets/ > > On Sun, Nov 25, 20

Limiting choices in a lookup by exclusion

2017-01-31 Thread Gordon R. Burgess
I have this code, and with Django 1.10 it works as expected: class Location(models.Model): name = models.CharField(max_length = 32, unique = True) street = models.CharField(max_length = 32) detail = models.CharField(max_length = 32, blank = True, null = True) city = models.CharFie