Hey guys can anyone let me know where I can get some of good Django base web apps

2016-03-21 Thread Tibin Geo k k
I am looking for some good Django web applications, if we have any site to download some Django projects let me know -- 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 emai

Dynamic block names in template.

2013-05-01 Thread Muhammed K K
I was searching for an option to set the block name of a django template dynamically and couldn't find and good resources. I browsed through the django code base and made a hack. I am not sure if it breaks any functionalities of django. Can any one verify this. I posted a question and the hack

Re: Can't query records with my custom list order.

2009-05-08 Thread K*K
Good idea, thank you! :-D On May 8, 6:10 pm, Tim Chase wrote: > > First define some list contain random values such as: > > foo_list = (3, 4, 5, 2) > > > Then use QuerySet to query the list in a table, but it returns objects > > will increase id value. > > foo = Foo.objects.filter(id__

Re: Django-Logging

2009-05-08 Thread K*K
Actually I always prefer enable DEBUG_PROPAGATE_EXCEPTIONS = True in settings then use print to output log for debug. On May 8, 3:39 pm, Raashid Malik wrote: > Hello, > >    Please guid me to some good resource on django logging. > > Thanks, > Raashid Malik --~--~-~--~~~

Re: Django-Logging

2009-05-08 Thread K*K
You can have try this snippet: http://www.djangosnippets.org/snippets/16/ On May 8, 3:39 pm, Raashid Malik wrote: > Hello, > >    Please guid me to some good resource on django logging. > > Thanks, > Raashid Malik --~--~-~--~~~---~--~~ You received this message b

Re: QuerySet.values() for single object?

2009-05-08 Thread K*K
Simple way: >>> model = Model.objects.get(id = 1) >>> print model.__dict__ On May 8, 12:23 pm, Shadow wrote: > Hi, > > If i get a model object with Model.objects.get() > > Is their a way to turn that into a dictionary? > > Thanks --~--~-~--~~~---~--~~ You receiv

How can I verify correction of the form with SelectMultiple widget field?

2009-03-12 Thread K*K
I got a strange problem. I specify a ChoiceField as SelectMultiple widget but got problem in validation. Can django ChoiceFIeld support valid with a List ? or how can I do it ? The source code is following: # Source code of forms.py: COMPONENTS_CHOICE = [] for component in get_components():

Re: Does Django 1.1 support mulitple primary_key ?

2009-03-09 Thread K*K
gt; On Mon, 2009-03-09 at 19:22 -0700, K*K wrote: > > Are there some other solution of it ? > > I still don't understand the problem. > > > > > The more than 2000 queries is from the get_latest_text() function, it > > will be generate one query each plan. I ha

Re: Does Django 1.1 support mulitple primary_key ?

2009-03-09 Thread K*K
Yeah, I wrote the SQL before, but the requirements writer is a ex- Turbogears developer, and he said it can be implemented with SQLAlchemy. -_-# So the SQL code was deleted by him in early days. On Mar 10, 10:25 am, Alex Gaynor wrote: > On Mon, Mar 9, 2009 at 9:22 PM, K*K wrote: > &

Re: Does Django 1.1 support mulitple primary_key ?

2009-03-09 Thread K*K
Heh, I will agree with you if I am the boss. :-) But I hope the ORM of Django will be powerful enough for difference requirements more. On Mar 9, 6:59 pm, James Bennett wrote: > On Mon, Mar 9, 2009 at 4:47 AM, K*K wrote: > > Because the > > requirements wrote all of datab

Re: Does Django 1.1 support mulitple primary_key ?

2009-03-09 Thread K*K
y-none-select-params-none On Mar 9, 6:21 pm, Malcolm Tredinnick wrote: > On Mon, 2009-03-09 at 02:47 -0700, K*K wrote: > > I'm porting a old system to Django architecture. The database schema > > can not be modified because the data was existed. The new system will > >

Does Django 1.1 support mulitple primary_key ?

2009-03-09 Thread K*K
I'm porting a old system to Django architecture. The database schema can not be modified because the data was existed. The new system will running with the old system at the beginning but will run standalone in the future. The system have two tables, which one is plan and another is plan_text, pl

Re: How can I process ajax code post encodeURI string ?

2009-01-15 Thread K*K
Resolved with unquote function in urllib from urllib import unquote title = unquote(request.POST.get('title')) On Jan 15, 10:59 am, "K*K" wrote: > Hi, All. > > I'm using the Ajaxmethod to post some string after encodeURI function > processed to the Djan

How can I process ajax code post encodeURI string ?

2009-01-14 Thread K*K
Hi, All. I'm using the Ajaxmethod to post some string after encodeURI function processed to the Django server, How can I decodeURI in the server side ? Very simple question, But I'm a newbie of Django for process multi- language program. So thank you very much. --~--~-~--~~-

How can I use more than 24 hours in TimeField?

2008-12-01 Thread K*K
As you know time data type in mysql allow to be used more than 24 hours, but when there is a more than 24 hours record in the table such as 72:00:00, and then query the table with Django ORM, it will report 'ValueError hour must be in 0..23'. I'm porting a old program that record rum times of th

Re: How can I to show a 2D dictionary in template ?

2008-11-30 Thread K*K
}} {% endfor %} On Dec 1, 3:32 pm, "K*K" <[EMAIL PROTECTED]> wrote: > Hi, I'm a newbie in Django. I got I problem looks like below: > > == contents.py == > > from testcms.contents.models import * >

How can I to show a 2D dictionary in template ?

2008-11-30 Thread K*K
Hi, I'm a newbie in Django. I got I problem looks like below: == contents.py == from testcms.contents.models import * class Contents(UserDict): def get_contents_list(self): contents = Contents.objects.all() for content in contents: author = U

Re: Template custom filter doesn't work

2008-11-19 Thread K*K
it works. Thank you so much ! On Nov 19, 6:48 pm, "Alex Koshelev" <[EMAIL PROTECTED]> wrote: > You have to convert value from string to integer: > >  int(arg) > > On Wed, Nov 19, 2008 at 13:18, K*K <[EMAIL PROTECTED]> wrote: > > > I modified som

Re: Template custom filter doesn't work

2008-11-19 Thread K*K
quot;Hello World", 10) u'Hello W...' >>> cut_by_string("Hello World", 15) u'Hello World' >>> On Nov 19, 6:09 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Nov 19, 9:52 am, "K*K" <[EMAIL PROTECTED]> wrote: > > &g

Re: Template custom filter doesn't work

2008-11-19 Thread K*K
e.templatetags.extra_filters import cut_by_string >>> cut_by_string("Hello World", 3) u'Hel...' >>> cut_by_string("Hello World", 11) u'Hello World...' On Nov 19, 6:09 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Nov 19, 9:52

Template custom filter doesn't work

2008-11-19 Thread K*K
Hi, All. I create a custom filter for cut too long string for my app. Like this: from django import template from django.template.defaultfilters import stringfilter register = template.Library() @register.filter(name='cut_by_string') @stringfilter def cut_by_string(value, arg): if len

How can I print all of received variables in template ?

2008-11-11 Thread K*K
Hi, all. I want to write a page template for test my program. How can I print all of variables posted to the template? Just like Django's error page. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: How can I create a new table without primary key filed?

2008-11-10 Thread K*K
OK, I got it ;-) I will try other method to implement the application. Thx On Nov 10, 7:43 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-11-10 at 03:41 -0800, K*K wrote: > > Thank you for you reply. > > > But I mean I want to create a table w

Re: How can I create a new table without primary key filed?

2008-11-10 Thread K*K
t; wrote: > On Mon, Nov 10, 2008 at 7:59 PM, K*K <[EMAIL PROTECTED]> wrote: > > > Hi, all. > > > How can I create a new table without primary key in Django modeling. ? > > > I'm porting a old program to Django web framework. After inspect > > database t

Re: How can I create a new table without primary key filed?

2008-11-10 Thread K*K
int(11) | NO | | NULL|| +-+-+--+-+-++ 5 rows in set (0.00 sec) I don't want to create neither the id field nor other primary key field. On Nov 10, 7:20 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]&

How can I create a new table without primary key filed?

2008-11-10 Thread K*K
Hi, all. How can I create a new table without primary key in Django modeling. ? I'm porting a old program to Django web framework. After inspect database to modules.py and then syncdb, It create the id filed with primary key attribute, how can I disable this feature ? --~--~-~--~~---

Re: timeit module put my app into infinite loop

2008-10-07 Thread K*K
AIL PROTECTED]> wrote: > On 7 oct, 17:54, "K*K" <[EMAIL PROTECTED]> wrote: > > > Hi, all > > > I'm writing a program to test django's mysql performance, use timeit > > to profile. But it make my app into infinite loop. > > I'm probably a

timeit module put my app into infinite loop

2008-10-07 Thread K*K
Hi, all I'm writing a program to test django's mysql performance, use timeit to profile. But it make my app into infinite loop. always write data into database. How can I resolve it ? The source code like below: import timeit from django.shortcuts import render_to_response from testDjango.be