how do I .............?

2016-01-13 Thread Steve Burrus
how do I connmect to the Django server on the command line? -- 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.co

How do I migrate

2009-05-18 Thread madhan...@gmail.com
Hi all, I am stuck up with something. One of our clients has a system developed using Django framework. We need to migrate the system to our servers. We basically develop PHP sites, python and Django is kinda new to us. How do I setup the system in our servers. The server people has configured us

Re: how do I .............?

2016-01-13 Thread Fred Stluka
Windows or Gates. On 1/13/16 1:43 PM, Steve Burrus wrote: how do I connmect to the Django server on the command line? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: how do I .............?

2016-01-13 Thread Tim Chase
On 2016-01-13 10:43, Steve Burrus wrote: > how do I connmect to the Django server on the command line? You can use a command-line browser: lynx http://localhost:8000 links http://localhost:8000 elinks http://localhost:8000 links2 http://localhost:8000 w3m http://localhost:8

Re: How do I migrate

2009-05-18 Thread Kenneth Gonsalves
On Monday 18 May 2009 15:54:13 madhan...@gmail.com wrote: > 1. Do we need to install and configure Django form scratch inorder to > make the system workable? yes. > 2. Is it not possible to make it work just by move the files and DB. no check the django documentation for details. Oh, and, if y

Re: How do I migrate

2009-05-21 Thread madhan...@gmail.com
Hi kg, Thanks for your prompt reply. It was really helpful. Is there any tutorial which explains on how to migrate the Applications developed using Django. Django has been setup in our server. Our task would be to setup the application in our server from the current server. Thanks again for timel

how do i do background tasks

2008-08-31 Thread sotirac
i'm creating an application that will read rss feeds. i'm using the universal feed parser library. i have a feed model (has the url to the feed) and an entry model (for each individual entry). Is there a method in the model that I have to overwrite that will allow me to retrieve rss entries in th

How Do I Extend Model form

2009-04-02 Thread mahesh
How Do I Extend Model form. I need to generate a form with some fields from User + UserProfile; However I see nothing .. class UserForm(ModelForm) : class Meta: model = User class BigForm(UserForm): class Meta(UserForm.Meta): model

How do I install the module

2012-05-15 Thread django-user59
net/django-openid-auth/+download and extracted the files and created a directory under the original location for django at the same level as django-1.4. Couple of questions: 1) How does python manage.py know where to look for the new module. 2) How do I check that the version of openid-auth is ri

How do I upgrade to 1.4.2?

2012-10-18 Thread scottc
I'm new to django, with a (vanilla) 1.4.0 install, and am knee deep in a project. Can I simply *pip install django* and have everything update properly or will that fubar my existing project? (Win7, Python 2.7.2, django installed in a virtualenv using pip) Thanks -- You received this messa

How do I monitor views.py running

2016-02-02 Thread Liu Duan
If I insert a line in views.py like: Print “Hello world.” Is there a way I can see the result? In other words, how do I monitor views.py running? Thank you. -- You received this message because you are subscribed to the Google Groups "Django users"

How do I display foriegn characters

2008-06-18 Thread Keith Mallory
Hello, I am doing a small web site in django for my friend. The web site needs to have couple of dozen pages in chinese. What should I do in django to display these characters correctly? Most of them content needs to be updated. We have tools to create the chinese text in unicode. We want the s

How do I echo template variables?

2007-07-29 Thread [EMAIL PROTECTED]
I'm coming from CakePHP and I would typically set a variable for use in my view with a call to findAll. Since there is a lot of data in the array, I typically do something like: This way, I can find out what data is available in the view and figure out how much I can scale back the recursion.

How do I do this JOIN...

2007-10-19 Thread Dr Stitch
Greeting all! CAVEAT: I'm a Django newbie. I've spent about 3 hours searching, reading, hazing over all the documentation and tutorials and it's quite likely I have missed it or I'm way too new to Django to understand the simplicity of the solution for the problem I'm presenting. So, feel free

translation question ("how do I" question)

2007-10-24 Thread alain D.
Hi, Here is a chunk of django template ... I'd like to translate it using django i18n mecanism but I'm hitting a problem (I guess it's the same I was hitting a few months ago [see history]). I guess there is no perfect solution for that right now, but a working workaround would be good enough :

How do I replace admin views?

2006-12-26 Thread Jim Fritchman
I am new to Django and web development for that matter but I saw ticket #1476 posted about related objects being displayed as lists with a link to allow the user to edit. I would like to do something very similar and I am hoping that someone can help me get on the right track. I have a person c

Sites, how do I use them

2005-11-16 Thread Ian Holsman
hi. I have a application where sites would be a great fit for. but I'm not sure how I make use of them. is it as easy as just adding a 'Site' Field to my model on all the tables,/classes and django takes care of the rest? or do I need to explictly hard code the views so that 'site' is taken into

Re: how do i do background tasks

2008-08-31 Thread Malcolm Tredinnick
On Sun, 2008-08-31 at 09:00 -0700, sotirac wrote: > i'm creating an application that will read rss feeds. i'm using the > universal feed parser library. i have a feed model (has the url to the > feed) and an entry model (for each individual entry). Is there a > method in the model that I have to

How do I define choices in ChoiceField

2009-03-27 Thread Joshua Partogi
Hi all, Let me just get straight to the point I tried these: label = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) And received these: Exception Type: TemplateSyntaxError Exception Value:Caught an exception while rendering: too many values to unpack What was wrong wit

Re: How Do I Extend Model form

2009-04-02 Thread Oli Warner
g. I hope that makes sense. On Thu, Apr 2, 2009 at 10:51 AM, mahesh wrote: > > How Do I Extend Model form. I need to generate a form with some fields > from User + UserProfile; However I see nothing .. > > class UserForm(ModelForm) : >class Meta: >

Re: How Do I Extend Model form

2009-04-02 Thread mahesh
lement. > > So you can easily have several ModelForms (or mix them with regular Forms) > inside a single tag. > > I hope that makes sense. > > On Thu, Apr 2, 2009 at 10:51 AM, mahesh wrote: > > > How Do I Extend Model form. I need to generate a form with some fields &

How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread equalium
Hello, I'm new to django. I want to retrieve a record of Customers with an empty serial field. --~--~-~--~~~---~--~~ 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@

How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread equalium
Hello, I'm new to django. I want to retrieve a record of Customers with a non empty serial field. I try with: Customer.objects.filter(serial<>'') but I get an error saying that serial is not defined. Thank you for any help. --~--~-~--~~~---~--~~ You received

How do I override __unicode__ for User?

2009-05-17 Thread Thierry
I currently have a blog model: class BlogPost(models.Model): title = models.CharField(max_length=150) body = models.TextField() author = models.ForeignKey(User) timestamp = models.DateTimeField() Right now, author is returning the default User.username. I have other models who h

How do I prevent messages getting cached?

2011-12-18 Thread Nathan Geffen
Hi I am using per-view caching in version 1.3 and would prefer to avoid caching in my templates as far as possible. However, I've hit a snag. If the messaging framework generates a message for a cached view, one of two things happen: 1. If the page is not yet in cache, the page gets cached with t

How do I create project independent apps.

2009-10-05 Thread Johan
ALLED_APPS = ('mysite2.myapp')). The second is to create the application in a common directory somewhere NOT in the directory tree of either the projects. The issue is how do I within the django framework set the path so that the application can be added to the project settings file with something

How do I filter an InlineModelAdmin ForeignKey?

2009-12-16 Thread Eric Chamberlain
I'd like PartnerRegistration's default_provider field to be filtered in PartnerRegistrationInline, like how Partner's default_provider field is filtered in PartnerAdmin. When I try the code below, I get a DoesNotExist exception in: self.fields['default_provider'].queryset = self.instan

How do I set my default language ???

2010-06-11 Thread Ariel
Hi everybody, I write in my settings.py LANGUAGE_CODE = 'fr' to make french the default language but it does'nt seem to work because the spanish is still the default language, Do I need to do something else to make french the default language ??? I need help !!! Thanks in advanced Regards -- You

How do I update a global variable?

2010-06-18 Thread aurphir
In my django application I have a global variable 'gv' which is accessed by different requests coming from the end users. Now 'gv' holds a data of 2 MB size which needs to be update at regular interval, pulling 2 MB data from the database for every request doesn't make sense. For this I have plan

How do I cache related model query

2010-09-06 Thread gaoxt1983
I have a requirement, which is, show a model's OneToMany related model's fields in a page, the problem is, if I pass the main model to simple_tag, then using filter or get or whatever methods to lookup the specific related model, it will generate db query everytime. When I have 5 simple_tag which s

How do I access a field's verbose_name?

2011-06-20 Thread Jeff Blaine
I'd like to make use of a field's verbose_name in some code instead of duplicating that sort of info. Can someone show me how? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d

How do I create dynamic django models ?

2011-06-20 Thread Satyajit Sarangi
I went through this link , but couldn't really understand where to put where . A little more help as to how to go about it would be very helpful . https://code.djangoproject.com/wiki/DynamicModels -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: How do I upgrade to 1.4.2?

2012-10-18 Thread Tom Evans
On Thu, Oct 18, 2012 at 4:32 AM, scottc wrote: > I'm new to django, with a (vanilla) 1.4.0 install, and am knee deep in a > project. > > Can I simply pip install django and have everything update properly or will > that fubar my existing project? > > (Win7, Python 2.7.2, django installed in a virt

Re: How do I upgrade to 1.4.2?

2012-10-18 Thread Babatunde Akinyanmi
Add --upgrade option On 10/18/12, scottc wrote: > I'm new to django, with a (vanilla) 1.4.0 install, and am knee deep in a > project. > > Can I simply *pip install django* and have everything update properly or > will that fubar my existing project? > > (Win7, Python 2.7.2, django installed in a

how do i run project level tests?

2013-02-14 Thread calum mchaffie
I have a django project with a couple apps. Where do i put tests for the project (as it doesnt make sense to have them in an app)? and how do i run them? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

How do I join two existing tables?

2013-02-24 Thread frocco
Hi, I have to interface with an existing php app and the key field is character. paginator = Paginator(Shopinventory.objects.exclude(list_price=0).filter(sizenum__contains=search), 20) I want to add to the above and pull the related category. Shopcategories has a character prime key calle

How do I seo in my website?

2013-05-20 Thread frocco
Hello, I notice that my site does not come up when searching in google. What do I need to do in django to resolve 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, se

How do I stopt this bot 66.249.73.7

2013-05-25 Thread frocco
Should I stop this bot at 66.249.73.7 It is causing my search log to fill up quickly. -- 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...@g

How do I install this django application?

2013-05-30 Thread Mohammad Hakim
questions/16780086/how-do-i-install-an-app-that-doesnt-have-models-or-views>. However, whenever I press the submit button I am sent to the mysite.honeypot.templates.honepot.honeypot_error.html . How do I fix this problem or is it all the app does? -- You received this message because you are s

How do I patch django.core.mail.send_mail for testing?

2015-05-19 Thread Andrew Farrell
Hi folks, I'm trying to use mock.patch to test that a particular post-save signal kicks off an email. My current approach to this is... from django.test import TestCase from mock import patch class RegisterTestCase(TestCase):

How do I code this in views.py

2017-06-26 Thread ray laurenz Monterola
I have two views function: index and login: Index should load first and check if session user id is set, if not it should call login function. login function if get renders the login.html. The problem is I'm having errors with index during run time. -- You received this message because you are

Re: How do I monitor views.py running

2016-02-02 Thread James Schneider
On Tue, Feb 2, 2016 at 9:52 AM, Liu Duan wrote: > If I insert a line in views.py like: > > Print “Hello world.” > > Is there a way I can see the result? > > > In other words, how do I monitor views.py running? > > > The preferre

Re: How do I monitor views.py running

2016-02-02 Thread Liu Duan
. 在 2016年2月2日星期二 UTC-6下午12:43:46,James Schneider写道: > > On Tue, Feb 2, 2016 at 9:52 AM, Liu Duan > > wrote: > >> If I insert a line in views.py like: >> >> Print “Hello world.” >> >> Is there a way I can see the result? >> >

How do I Iterate database object querysets

2014-06-24 Thread G Z
I am posting data from a page with a dynamic set of licenses, I'm using the license_name as they key for the post values, then im building a string from the posted values. However I can't figure out how to iterate through the database object set. There is no other way for what im doing because i

Re: How do I display foriegn characters

2008-06-18 Thread Vasiliy Gladkov
looks like you have to set character set in your database. as i remember, i had similar problem with my mysql, wich has non-utf-8 character set On 19 июн, 04:23, "Keith Mallory" <[EMAIL PROTECTED]> wrote: > Hello, > > I am doing a small web site in django for my friend. > > The web site needs to

Re: How do I display foriegn characters

2008-06-18 Thread Ramdas S
Even I am facing the same problem. Any ideas how exactly do you set in MySQL or does migrating PostGres solve it? Ramdas S 2008/6/19 Vasiliy Gladkov <[EMAIL PROTECTED]>: > > looks like you have to set character set in your database. as i > remember, i had similar problem with my mysql, wich has n

Re: How do I display foriegn characters

2008-06-18 Thread Vasiliy Gladkov
In MySql console client: ALTER TABLE tbl_name CONVERT TO CHARACTER SET utf-8; or ALTER TABLE t MODIFY latin1_text_col TEXT CHARACTER SET utf8; for each table. or something like it. look to the manual - http://dev.mysql.com/doc/refman/5.0/en/alter-table.html http://dev.mysql.com/doc/refman/5.0/en

Re: How do I display foriegn characters

2008-06-18 Thread Vasiliy Gladkov
Also you can try to change character set with MySql Workbench or any other visual tool, if you prefer visual way. Im not sure about it as im not using visual tools. On 19 июн, 14:34, "Ramdas S" <[EMAIL PROTECTED]> wrote: > Even I am facing the same problem. Any ideas how exactly do you set in MyS

How do I Sort Years in Template

2007-05-01 Thread Frank Peterson
Story archive {% for date in date_list %} {{ date.year }} {% endfor %} Not sure how to do this --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

How do I override a model method?

2007-07-02 Thread Michael Lake
Hi all I'm having problems overriding a method in a model. I have seen how to override the save and delete methods and overriding a save works fine http://www.djangoproject.com/documentation/model-api/ But I'm trying to override other automatically generated methods. Currently if I create a pr

Re: How do I echo template variables?

2007-07-30 Thread Nathan Ostgard
Try: {{ data|pprint }} On Jul 29, 10:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm coming from CakePHP and I would typically set a variable for use > in my view with a call to findAll. Since there is a lot of data in the > array, I typically do something like: > > > > > > This wa

Re: How do I echo template variables?

2007-07-30 Thread Chris Hoeppner
Nathan Ostgard escribió: > Try: {{ data|pprint }} > > On Jul 29, 10:42 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > >> I'm coming from CakePHP and I would typically set a variable for use >> in my view with a call to findAll. Since there is a lot of data in the >> array, I typically do

Re: How do I echo template variables?

2007-07-30 Thread Russell Keith-Magee
On 7/30/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > > I didn't know of that function. Nice to know. But, is there a var where > to access *all* the vars available in the template and it's contents? > I've been needing that one for debugging for ever! Try {% debug %} http://www.djangoproject.

Re: How do I echo template variables?

2007-07-30 Thread Chris Hoeppner
Russell Keith-Magee escribió: > On 7/30/07, Chris Hoeppner <[EMAIL PROTECTED]> wrote: > >> I didn't know of that function. Nice to know. But, is there a var where >> to access *all* the vars available in the template and it's contents? >> I've been needing that one for debugging for ever! >>

Re: How do I echo template variables?

2007-07-30 Thread Peter Melvyn
On 7/30/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > Try {% debug %} If you mentioned this feature: is there an easy way to reformat {% debug %} output the same/similiar way an exception error is reported? Peter --~--~-~--~~~---~--~~ You received this me

Re: How do I echo template variables?

2007-07-30 Thread Russell Keith-Magee
On 7/30/07, Peter Melvyn <[EMAIL PROTECTED]> wrote: > > On 7/30/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > Try {% debug %} > > If you mentioned this feature: is there an easy way to reformat {% > debug %} output the same/similiar way an exception error is reported? Not easily. {% de

Re: How do I echo template variables?

2007-07-30 Thread Pensee
Welcome ! On Jul 30, 2:01 pm, "Peter Melvyn" <[EMAIL PROTECTED]> wrote: > On 7/30/07, Russell Keith-Magee <[EMAIL PROTECTED]> wrote: > > > Try {% debug %} > > If you mentioned this feature: is there an easy way to reformat {% > debug %} output the same/similiar way an exception error is reported?

Re: How do I echo template variables?

2007-07-30 Thread Pensee
On Jul 30, 7:42 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > > try to pprint the variables you pass the template directly in the view fonction they will appear in the console if you use the django dev server :) --~--~-~--~~~---~--~~ You received th

Re: How do I do this JOIN...

2007-10-19 Thread Malcolm Tredinnick
On Fri, 2007-10-19 at 15:04 -0700, Dr Stitch wrote: > Greeting all! > > CAVEAT: I'm a Django newbie. I've spent about 3 hours searching, > reading, hazing over all the documentation and tutorials and it's > quite likely I have missed it or I'm way too new to Django to > understand the simplicity

Re: How do I do this JOIN...

2007-10-22 Thread Dr Stitch
On Oct 19, 10:51 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > SELECT published.title, journal_names.name, > > journal_impact_factor.impact_factor > > FROM published, journal_names, journal_impact_factor > > WHERE > > published.journal_names_id=journal_names.id > > AND > > p

Re: translation question ("how do I" question)

2007-10-24 Thread Kenneth Gonsalves
On 24-Oct-07, at 9:24 PM, alain D. wrote: > """By %}>{{ myobject.owner.username }}""" > > of course, I'd like to have : """by %(username)s""" as a key in my > translation files ... frankly I dont understand the question - are you generating html code in your view? -- regards kg http://law

Re: translation question ("how do I" question)

2007-10-25 Thread alain D.
Absolutely ... the """ is misleading ... I added it only for clarity ... here is a chunk of the content of a xxx.html file (template) This object has been created by {{ myobject.owner.username }} My question is : how can I use the django translation mecanism (blocktrans tag & co) to tr

Re: translation question ("how do I" question)

2007-10-25 Thread Kenneth Gonsalves
On 25-Oct-07, at 3:34 PM, alain D. wrote: > My question is : how can I use the django translation mecanism > (blocktrans tag & co) to translate that so that I will have > This object has been created by %(username)s" > in my po file ... you do it in the __unicode__() method in your user model

how do I install MySqldb on mac?

2007-04-05 Thread Frank Rocco
Hello, I just installed django on my mac, but cannot get mysqldb installed. I have mysql running from mamp. What do I need to do to install this? Regards, Frank Rocco [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscrib

How do I use a custom FilterSpec?

2006-06-22 Thread MattiasN
ow takes a 'model' parameter." However I don't understand what I should change. "beacause each FilterSpec now takes a model parameter" doesn't mean anything to me... How do I register the filterspec now? Where should I place it and so on. (The dirty fix i

How do I store project in subversion?

2006-08-15 Thread [EMAIL PROTECTED]
I was wondering if someone could tell me how they store the django project in subversion. I am moving a php project I have already written to django and I want to open source this project. So I am trying to figure out the best way to store my project in a subversion repository. Anything would be

How do I make something available everywhere?

2006-08-31 Thread [EMAIL PROTECTED]
I want to tap into the Amazon Web Services to provide a little revenue stream. I'm pretty confident about writing a funtion that will get the appropriate xml from Amazon and parse it out, as I'm already tapping into google maps and bringinig in an external rss feed. That part I think I've got. W

How do I do this? (Template Question)

2005-09-19 Thread Milton Waddams
I've probably missed this somewhere though can't seem to workout how to do this. I want to have a list of products listed in a 3 column table with the number of rows growing to cover all the items. eg. product 1 product 2 product 3 product 4 product 5

How do I customize registration form HTML?

2017-11-30 Thread Tom Tanner
abel text to be placeholders instead. How do I do this? If it helps, `registration_form` is `UserCreationForm()` -- 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

How do I customize form error messages?

2017-12-03 Thread Tom Tanner
hat both fields may be case-sensitive." I'd like to change this message and other error messages. How do I do this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving email

How do I use `password_reset_confirm.html` with AngularJS?

2018-03-21 Thread Tom Tanner
I want to integrate AngularJS in my custom password_reset_confirm.html template in Django. But when I fill out a new password and hit "submit," nothing happens. Here's more info in better formatting: https://stackoverflow.com/questions/49396333/how-do-i-use-password-reset-co

How Do I Authorise user using token

2021-10-06 Thread M R
Hi DRF Team, I have created tokens but i don't know how to use it for authentication. Every web page is showing in postman in google. how do i use headers in url Thanks Madhusudhan -- You received this message because you are subscribed to the Google Groups "Django users&

Re: How do I define choices in ChoiceField

2009-03-27 Thread Stephan John
Am Freitag, 27. März 2009 14:43:08 schrieb Joshua Partogi: > bel = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) it must be tuples: bel = forms.ChoiceField(choices=(('one', 'one'), ('two', 'two' ) ) --~--~-~--~~~---~--~~ You received this message becau

Re: How do I define choices in ChoiceField

2009-03-27 Thread Briel
Hi. Choices is a tuple/list of tuples/lists, so in your case it would look like this: (('one', 'one'), ('two', 'two')) You can't use dictionaries. ~Jakob On 27 Mar., 14:43, Joshua Partogi wrote: > Hi all, > > Let me just get straight to the point > I tried these: > label = forms.ChoiceField(cho

Re: How do I define choices in ChoiceField

2009-03-27 Thread Joshua Partogi
Thanks for the hints guys. It works now. :-) On Mar 28, 12:49 am, Stephan John wrote: > Am Freitag, 27. März 2009 14:43:08 schriebJoshuaPartogi: > > > bel = forms.ChoiceField(choices=({'one':'one','two':'two'}) ) > > it must be tuples: > > bel = forms.ChoiceField(choices=(('one', 'one'), ('two'

Re: How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread Alex Gaynor
On Tue, Apr 28, 2009 at 12:28 PM, equalium wrote: > > Hello, I'm new to django. I want to retrieve a record of Customers > with a non empty serial field. > I try with: > Customer.objects.filter(serial<>'') > but I get an error saying that serial is not defined. > > Thank you for any help. > >

Re: How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread John M
is it empty like " " or is it null? customer.objects.filter(serial__isnull=True) HTH On Apr 28, 9:16 am, equalium wrote: > Hello, I'm new to django. I want to retrieve a record of Customers > with an empty serial field. --~--~-~--~~~---~--~~ You received this m

Re: How do I retrieve this Customer.objects.filter(serial<>'')

2009-04-28 Thread equalium
Thank you, is the exclude what I need, the serial doesn't allow nulls, only empty strings. Thank you John and Alex. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

How do I handle urls with different names?

2009-05-11 Thread Thierry
Let's say I have a pet table: TABLE: Pet id nametype -- 1 Plutodog 2 Foo cat 3 Goo fish I can access the pet page of each of the above by the following url: Pluto: localhost/pets/1/ Foo: localhost/pets/2/ Goo: l

How do I override the __unicode__ of User?

2009-05-17 Thread Thierry
I currently have a blog model: class BlogPost(models.Model): title = models.CharField(max_length=150) body = models.TextField() author = models.ForeignKey(User) timestamp = models.DateTimeField() Right now, author is returning the default User.username. How can I customize the a

Re: How do I override __unicode__ for User?

2009-05-17 Thread Kai Kuehne
Hi, On Sun, May 17, 2009 at 10:59 PM, Thierry wrote: > > I currently have a blog model: > > [BlogPost Model] > > Right now, author is returning the default User.username.  I have > other models who has a ForeignKey to User, I want them to keep > defaulting to username while for Blogpost, I want

Re: How do I override __unicode__ for User?

2009-05-17 Thread Kai Kuehne
Sorry, pressed that button too early: You could also write a default method inside your BlogPost model. Maybe something like: class BlogPost(models.Model): ... def author_name(self): return '%s %s' % (self.author.first_name, self.author.last_name) --~--~-~--~~

RE: How do I override __unicode__ for User?

2009-05-20 Thread Will Matos
oglegroups.com] On Behalf Of Thierry Sent: Sunday, May 17, 2009 4:59 PM To: Django users Subject: How do I override __unicode__ for User? I currently have a blog model: class BlogPost(models.Model): title = models.CharField(max_length=150) body = models.TextField() author = m

Re: How do I prevent messages getting cached?

2011-12-19 Thread Andres Reyes
You could use the cache template tag https://docs.djangoproject.com/en/dev/topics/cache/#template-fragment-caching And cache only certain parts of your template and not all of it 2011/12/18 Nathan Geffen : > Hi > > I am using per-view caching in version 1.3 and would prefer to avoid > caching in

Re: How do I prevent messages getting cached?

2011-12-19 Thread Torsten Bronger
Hallöchen! Nathan Geffen writes: > I am using per-view caching in version 1.3 and would prefer to avoid > caching in my templates as far as possible. However, I've hit a snag. > If the messaging framework generates a message for a cached view, one > of two things happen: > > 1. If the page is not

Re: How do I prevent messages getting cached?

2011-12-19 Thread nathan
Thanks Torsten. This seems to be what I was looking for. On Dec 20, 12:11 am, Torsten Bronger wrote: > Hall chen! > > Nathan Geffen writes: > > I am using per-view caching in version 1.3 and would prefer to avoid > > caching in my templates as far as possible. However, I've hit a snag. > > If the

Re: How do I create project independent apps.

2009-10-05 Thread Johan
irectory from the first > project to the second, and the to add the application to the project > via the settings file(  INSTALLED_APPS = ('mysite2.myapp')). The > second is to create the application in a common directory somewhere > NOT in the directory tree of either the proje

Re: How do I create project independent apps.

2009-10-05 Thread Nan
ia the settings file( INSTALLED_APPS = ('mysite2.myapp')). The > > second is to create the application in a common directory somewhere > > NOT in the directory tree of either the projects. The issue is how do > > I within the django framework set the path so that the ap

Re: How do I create project independent apps.

2009-10-05 Thread Kevin Teague
On Oct 5, 6:45 am, Johan wrote: > Actually the TEMPLATE_DIRS does nothing. In order to get my apps to > work outside of the project directory I edited the manage.py file and > added : > > import sys > sys.path.append('..\\..\\..\\django-apps\\trunk') > > This allows me to reference my applicati

Re: How do I create project independent apps.

2009-10-06 Thread Andy Mikhailenko
Another way is to use a settings wrapper such as django-harness[1], which: * helps organize apps (by name, without the notion of project) and eliminates the need to write absolute paths for templates, sqlite database and such stuff stored in the project directory; * simplifies version control of p

Re: How do I create project independent apps.

2009-10-06 Thread Johan
Thanks for all the feedback. By nature I prefer NOT to use a to deep framework stack. So although django-harness could work I would prefer to keep my dependencies simple. I would probably go with managing the python path. It seems to be the simplest way and most transparent way of handling the sit

Re: How do I create project independent apps.

2009-10-06 Thread Torsten Bronger
Hallöchen! Johan writes: > Thanks for all the feedback. By nature I prefer NOT to use a to > deep framework stack. So although django-harness could work I > would prefer to keep my dependencies simple. I would probably go > with managing the python path. It seems to be the simplest way and > mos

Re: How do I create project independent apps.

2009-10-06 Thread Torsten Bronger
Hallöchen! Torsten Bronger writes: > [...] > > I did some research on this two weeks ago and my impression was > that there are no guidelines at all to create portable apps. On > the contrary, the template path in the official Django tutorial is ... not a good example. Tschö, Torsten. -- To

Re: How do I filter an InlineModelAdmin ForeignKey?

2009-12-16 Thread Tim Valenta
Well, you're probably getting the error on your 'extra' inlines. self.instance is unbound in that case, and so self.instance.providers cannot be looked up. I wrote a little thing to fetch a proper object though... just be sure to include your parent model's field in your fields on the inline. Then

Re: How do I filter an InlineModelAdmin ForeignKey?

2009-12-16 Thread Eric Chamberlain
Thank you. The code fixed my problem. On Dec 16, 2009, at 1:48 PM, Tim Valenta wrote: > Well, you're probably getting the error on your 'extra' inlines. > self.instance is unbound in that case, and so self.instance.providers > cannot be looked up. > > I wrote a little thing to fetch a proper o

Re: How do I set my default language ???

2010-06-11 Thread Jeliuc Alexandr
Please try 'fr-FR' On Jun 11, 5:48 pm, Ariel wrote: > Hi everybody, I write in my settings.py LANGUAGE_CODE = 'fr' to make french > the default language but it does'nt seem to work because the spanish is > still the default language, Do I need to do something else to make french > the default lan

Re: How do I set my default language ???

2010-06-11 Thread Jeliuc Alexandr
Contra question... do You use something like geoip in your application? On Jun 11, 5:48 pm, Ariel wrote: > Hi everybody, I write in my settings.py LANGUAGE_CODE = 'fr' to make french > the default language but it does'nt seem to work because the spanish is > still the default language, Do I need

Re: How do I update a global variable?

2010-06-18 Thread Daniel Roseman
On Jun 18, 7:17 pm, aurphir wrote: > In my django application I have a global variable 'gv' which is > accessed by different requests coming from the end users. > > Now 'gv' holds a data of 2 MB size which needs to be update at regular > interval, pulling 2 MB data from the database for every requ

Re: How do I update a global variable?

2010-06-18 Thread Stefan Frauenknecht
Please rethink your design! There is certainly no need for a global variable. There is may be a way to implement your requirement as a singleton that is being able to deliver the huge bag of data in a much more smarter way. Am 18.06.2010 um 20:17 schrieb aurphir : In my django application

How do I troubleshoot mod_wsgi 404 admin issues

2010-09-15 Thread dclaar
hat's it, even though I have DEBUG turned on) in production. But when I try to troubleshoot it with the development server, it works just fine! This is frustrating... So, how do I figure out why these are operating differently, and to fix it? I'm not ever sure what query that it is talking

  1   2   3   4   5   6   7   8   9   10   >