Re: Scaling django installation

2012-06-04 Thread Subhranath Chunder
nt is part of the deployment/setup change anyway. > > rgds > vivek > > > > -- > 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 fr

Re: Scaling django installation

2012-06-03 Thread Subhranath Chunder
On Monday, June 4, 2012, vivek wrote: > Hi, > > > To load test I used loadimpact.com and the results of which can be > found on: > http://loadimpact.com/load-test/www.reviews42.com-18774e46e8f562a6eb4... > > The test configuration consisted of 600 VUs with 10 mins step duration. > > Got around .1

Re: Scaling django installation

2012-06-02 Thread Subhranath Chunder
On Sat, Jun 2, 2012 at 7:14 AM, Tim Chase <django.us...@tim.thechases.com>wrote: > On 06/01/12 09:17, Subhranath Chunder wrote: > > (Given the fact that the server is deployed in Amazon EC2 > > Singapore location, as m1.xlarge with all it's network, memory > > constr

Re: Scaling django installation

2012-06-01 Thread Subhranath Chunder
On Fri, Jun 1, 2012 at 8:20 PM, Kurtis Mullins wrote: > To me, the biggest bottleneck in a "Django Application Installation" (not > application) is not going to be Django at all. It's going to be I/O -- > typically to the database and/or file system. Yup. > Another

Re: Scaling django installation

2012-06-01 Thread Subhranath Chunder
things in the right direction. On Fri, Jun 1, 2012 at 7:43 PM, Javier Guerra Giraldez <jav...@guerrag.com>wrote: > On Fri, Jun 1, 2012 at 3:56 AM, Subhranath Chunder <subhran...@gmail.com> > wrote: > > how should we measure response complexity? > > a simple first

Re: Scaling django installation

2012-06-01 Thread Subhranath Chunder
On Fri, Jun 1, 2012 at 6:57 PM, Tim Chase <django.us...@tim.thechases.com>wrote: > On 06/01/12 03:56, Subhranath Chunder wrote: > > With that in mind, how should we measure response complexity? > > Any particular parameter, scale? Probably I can measure against > >

Re: Scaling django installation

2012-06-01 Thread Subhranath Chunder
bed 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 options, visit this group at > http://groups.google.c

Re: Scaling django installation

2012-05-31 Thread Subhranath Chunder
Bump! On Wednesday, May 30, 2012, Subhranath Chunder wrote: > As the subject suggests, wanted to discuss, acquire and share some > knowledge on scaling django installation. > > Firstly, my current project is a product Reviews platform, and I wanted to > benchmark or load t

Scaling django installation

2012-05-30 Thread Subhranath Chunder
deployment or installation. Sort of guide. -- Thanks, Subhranath Chunder. www.subhranath.com -- 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

Re: [Error] Mixing Two databases

2012-02-09 Thread Subhranath Chunder
st 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 options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Thanks, Subhranath Chunder. www.subhran

Re: [Share] Google+ and Django

2011-09-19 Thread Subhranath Chunder
Google+ is using OAuth2 pretty much like Facebook. On Mon, Sep 19, 2011 at 10:24 PM, Javier Guerra Giraldez <jav...@guerrag.com > wrote: > On Sun, Sep 18, 2011 at 1:17 PM, Subhranath Chunder > <subhran...@gmail.com> wrote: > > I've probably made the first attempt

Editing djangoproject Community RSS feed info

2011-09-18 Thread Subhranath Chunder
I just added my tech blog to the https://www.djangoproject.com/community/ page with feeds from http://scratch-blog.appspot.com/feed/rss/ Can someone with admin privileges, please edit and change the title to 'Subhranath Chunder' from the current 'ScratchBlog - The Scratch Blog'. I had simply put

Re: [Sharing] django-custom-auths

2011-09-18 Thread Subhranath Chunder
Added the Google+ authentication app to it. On Wed, Aug 10, 2011 at 2:52 PM, Subhranath Chunder <subhran...@gmail.com>wrote: > I was working on these django applications which simplifies the use of > third-party logins for a django project without breaking any existing code. >

[Share] Google+ and Django

2011-09-18 Thread Subhranath Chunder
-and-django-authentication-backend/ Or, to go directly to the project: https://github.com/subhranath/django-custom-auths -- Thanks, Subhranath Chunder. www.subhranath.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this g

Re: [Query] http redirect to non-fragmented url coming from fragmented url

2011-08-25 Thread Subhranath Chunder
Thu, Aug 25, 2011 at 4:04 PM, Subhranath Chunder > <subhran...@gmail.com> wrote: > > Yes, I do understand that fragment identifiers are not sent to the > server. > > But, I was not talking about that. > > Infact, I was talking about the fragments send in the response

Re: [Query] http redirect to non-fragmented url coming from fragmented url

2011-08-25 Thread Subhranath Chunder
action/#hello" Now, do you see the difference. The http response did have the fragment specified while issuing the 302 in the second case. So, my original question still stands still for me. Is this behavior defined and expected? On Thu, Aug 25, 2011 at 7:20 PM, Tom Evans <tevans...@googlemail.c

[Query] http redirect to non-fragmented url coming from fragmented url

2011-08-25 Thread Subhranath Chunder
. But, the thing is, what if we want to redirect to a url without specifying any primary fragment. So, my query basically come down to: Is this behavior expected, or not expected? Or, is it the client browser whose current implementation of 302 response, the only cause for this? -- Thanks, Subhranath

Re: Could not connect postgresql database

2011-08-23 Thread Subhranath Chunder
ostgresql/.s.PGSQL. > 5432"? > > but there is no such a .s.PGSQL.5432 file. I really dont understand > what is going on > > Selcuk > > On Aug 23, 8:12 pm, Subhranath Chunder <subhran...@gmail.com> wrote: > > You may try to test the connection using the command line

Re: dynamic field display

2011-08-23 Thread Subhranath Chunder
ed 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 options, visit t

Re: Could not connect postgresql database

2011-08-23 Thread Subhranath Chunder
= '*' > > > port = 5432 > > -- > 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

Re: can django be used in destop application?

2011-08-23 Thread Subhranath Chunder
oups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Thanks, Subhranath Chunder. www.subhranath.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: How to create a sub-app directly

2011-08-21 Thread Subhranath Chunder
een Krishna R < rpraveenkris...@gmail.com> wrote: > *Is there a concept of sub-apps exist in Django !?* > *I knew some concepts like independant reusable apps.* > *You can easily handle the rest with your urls right ?! correct me? > * > > On Sun, Aug 21, 2011 at 6:

Re: How to create a sub-app directly

2011-08-21 Thread Subhranath Chunder
om. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > -- Thanks, Subhranath Chunder. www.subhranath.com -- You received this message because

Re: What I am missing is this Django "logout"?

2011-08-21 Thread Subhranath Chunder
rking as expected. The thing is that I got an URL > like this: http://localhost:8080/logout//directorio// > > This should be working like this, or this is just a mistake that works? > > > PS: Sorry my english. > > On Sat, Aug 20, 2011 at 10:35 PM, Subhranath Chunder > <subhran

Re: What I am missing is this Django "logout"?

2011-08-20 Thread Subhranath Chunder
> Best Regards, > > -- > 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

Re: extending the User profile - which way to go?

2011-08-20 Thread Subhranath Chunder
re 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 options, visit this group at > http:

Re: How to store variable timedeltas in a Django model?

2011-08-14 Thread Subhranath Chunder
"extra complications". :) Thanks, Subhranath Chunder. www.subhranath.com On Sun, Aug 14, 2011 at 10:40 AM, Karen Rustad <karen.rus...@gmail.com>wrote: > Hello all, > > In one of my models, I want to store a timedelta--a length of time not > tied to a particular

Re: Redisplay form with different field value?

2011-08-14 Thread Subhranath Chunder
, Subhranath Chunder. www.subhranath.com On Sun, Aug 14, 2011 at 2:55 AM, Jonas H. <jo...@lophus.org> wrote: > On 08/13/2011 05:00 PM, Karen Tracey wrote: > >> Plus, afaik, fields can not access form instances so this code would have >>> to live in the form subclass

Re: Connecting to the django app from outside the server

2011-08-14 Thread Subhranath Chunder
If the external IP or some domain name lands you directly on your machine, then: python manage.py runserver 0.0.0.0: would do. To access you can use: http://: This should do. Hope it helps. Thanks, Subhranath Chunder. www.subhranath.com On Sun, Aug 14, 2011 at 9:12 AM, Python_Junkie

Re: Template tag: how to output success message above input field

2011-08-14 Thread Subhranath Chunder
Setting a simple context variable in your view would solve your purpose. Thanks, Subhranath Chunder. www.subhranath.com On Sun, Aug 14, 2011 at 1:22 PM, doniyor <doniyor@googlemail.com> wrote: > Hey Guys, > > i need a litle help in working with forms. i have a button and i w

Re: Admin app_index.html

2011-08-14 Thread Subhranath Chunder
The admin is supposed to provide an easy and ready to use interface for content manipulation. If your app doesn't have models, then the admin makes no sense for it. Thanks, Subhranath Chunder. www.subhranath.com On Sun, Aug 14, 2011 at 1:26 PM, doniyor <doniyor@googlemail.com> wrote:

Re: MySQLdb module not found even though it's installed.

2011-08-10 Thread Subhranath Chunder
python2.6 instance only, and not with python2.5 You might consider changing the default python link to the python2.6 instance. > > On 10 Aug, 10:48, Subhranath Chunder <subhran...@gmail.com> wrote: > > You can check with the following: > > > > python manage.py shell > &g

Re: {django-tables} Caught NameError while rendering: global name 'name' is not defined.

2011-08-10 Thread Subhranath Chunder
ame__) > dataqs = Transaction.objects.filter(paid="TRUE") > req = request.GET.get('sort', 'created') > tx = TransactionReport().get_reports_paid(dataqs, req) > > return render_to_response('webapp/reports.html', {'table': tx, > 'rows' : tx.rows})

Re: {django-tables} Caught NameError while rendering: global name 'name' is not defined.

2011-08-10 Thread Subhranath Chunder
On Mon, Aug 8, 2011 at 5:04 PM, Kayode Odeyemi wrote: > Hello, > > Please why am I get the following error: > > Caught NameError while rendering: global name 'name' is not defined. > > Initially I did not receive this sort of error, it just surfaced all > off a sudden. I

Re: Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Subhranath Chunder
gt; default one. > > Do you know of any example or documentation on how to achive this? > > Anyway, thanks for your input :-) > > Regards, > Thomas > > On Wed, Aug 10, 2011 at 11:07 AM, Subhranath Chunder > <subhran...@gmail.com> wrote: > > Yes

Re: Generating urls for a search-engine-like application

2011-08-10 Thread Subhranath Chunder
If you are planning for reverse URL in your templates, then named URL pattern is the thing for you. https://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns Else to simply, you might also consider changing the url patterns to something like: /country// /city// If you have the

[Sharing] django-custom-auths

2011-08-10 Thread Subhranath Chunder
://github.com/subhranath/django-custom-auths Any suggestions for improvements are very welcome. Thanks, Subhranath Chunder. -- 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@google

Re: making history

2011-08-10 Thread Subhranath Chunder
You could probably consider using post_save signals and make things a bit little more generic. On Wed, Aug 10, 2011 at 1:38 PM, Mike Dewhirst wrote: > I want to update a history record whenever a particular record changes. > > Is it reasonable to call a method from within

Re: Keep filtering from change_list in admin in custom page?

2011-08-10 Thread Subhranath Chunder
Yes, you can do that. You would have to override the default change_view_template. And if required, then probably the changelist_view() too. On Wed, Aug 10, 2011 at 2:28 PM, Thomas Weholt wrote: > Is it possible to keep the filtering done in an admin change_list in a >

Re: MySQLdb module not found even though it's installed.

2011-08-10 Thread Subhranath Chunder
You can check with the following: python manage.py shell then do the, import MySQLdb If this fails then you are probably running on different python environments. On Wed, Aug 10, 2011 at 2:02 PM, babak wrote: > Hi I've installed MySQLdb om my mac and can import it: >

Re: [Commercial] Freelance developer looking for long-term/contract based work

2011-08-10 Thread Subhranath Chunder
Now I'm available for immediate start of work. Looking for long-term work only, on hourly basis. I can put in as many as monthly 100 hours if required. Please let me know if anyone is interested to hire me, asap. On Fri, Aug 5, 2011 at 8:58 PM, Subhranath Chunder <subhran...@gmail.com>

Re: how to use "{% url *** %}" in django template file?

2011-08-07 Thread Subhranath Chunder
On Sun, Aug 7, 2011 at 10:35 AM, Jimmy wrote: > Hi, > > I got the error "Caught ImportError while rendering: No module named > urls" when using: > > {% url 'card.views.create_card' %} in the template file > For django 1.2 and earlier versions you should use the syntax

Re: Calculation for each object in a QuerySet

2011-08-05 Thread Subhranath Chunder
Your model declarations are very confusing for me, and seems to be running around in circles. Very difficult to follow for me. The logical relationships are not clear. So, how to arrive at the 'rebate_pct' and 'wac' as you actually intend, is a mystery in itself for me. If you have the

Re: splitting uploaded CSV data

2011-08-05 Thread Subhranath Chunder
d routine, I opened the file using Python's CSV > manipulation library. > import csv > > fname = uploaded_data_file.temporary_file_path() > f = csv.reader(open(fname, 'rb'), delimiter=',', quotechar='"') > for line in f: > co_id = line[0] > co_name = line[1] > co_addr1 =

Re: splitting uploaded CSV data

2011-08-05 Thread Subhranath Chunder
Using the string split on CSV like this is bad in practice. Prefer using CSV manipulation library instead. Like, http://docs.python.org/library/csv.html You can use the CSV reader module for your purpose. On Sat, Aug 6, 2011 at 1:13 AM, Vasu Nagalingam wrote: > Hi - I am

Re: Count users joined ordered by month

2011-08-05 Thread Subhranath Chunder
Not the exact answer you were looking for, but I was only wondering, if you have already figured the actual SQL query then why not simply use that instead. It's not mandatory to use the model query APIs, if your query is complex. Using the raw() API would still yield you model querysets or

Re: [Commercial] Freelance developer looking for long-term/contract based work

2011-08-05 Thread Subhranath Chunder
Have updated my Linkedin profile with project details. On Jul 29, 2011 7:41 PM, "Subhranath Chunder" <subhran...@gmail.com> wrote: > Hi, > > I'm an experienced Django developer, with good experience in web application > development using Django as the underlying

Re: manage.py dumpdata json storage problem

2011-08-01 Thread Subhranath Chunder
You would probably have to wait until the django backend for postgres is modified not to fetch all the records at one go. As for now, I guess you should go ahead with writing custom serializers which specifically queries the db records in chunks. Sent from my iPad 2 On Aug 1, 2011, at 7:06

Re: Mysterious Path Issue Django & Apache

2011-07-29 Thread Subhranath Chunder
Check if the base directory is added in you current python path when running from wsgi Putting a line like "print >> sys.stderr, sys.path" in your wsgi file right after the initial import should let you verify that. On Sat, Jul 30, 2011 at 1:25 AM, Devon Young wrote: > I

[Commercial] Freelance developer looking for long-term/contract based work

2011-07-29 Thread Subhranath Chunder
, Facebook Application Development Links to some publicly available code snippets of mine: http://scratch-blog.appspot.com https://github.com/subhranath LinkedIn profile (Needs to update the projects section soon): http://in.linkedin.com/pub/subhranath-chunder/24/50/a01 Currently, I'm switching work from

Re: python threads and django views

2011-05-31 Thread Subhranath Chunder
Using the web-server to make such a request to open 10,000 odd URLs seems unrealistic approach. Rather make a separate process to do the same. Thanks, Subhranath Chunder. On Mon, May 30, 2011 at 11:29 PM, rahul jain <jainwolver...@gmail.com>wrote: > All, > > I would like to

Re: [Share] Protected web APIs (short and simple)

2011-04-25 Thread Subhranath Chunder
Updated this with a django helper (decorator) to make it work without any view code changes at the receiving end. On Fri, Apr 22, 2011 at 4:52 PM, Subhranath Chunder <subhran...@gmail.com>wrote: > Hi, > > I've created a small and simple Python helper module to have prote

Protected web APIs (short and simple)

2011-04-22 Thread Subhranath Chunder
, Subhranath Chunder. -- 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 mo

Re: Import error No module named urls to url login_in in html page

2011-04-19 Thread Subhranath Chunder
Hi, The problems seems to be with the way you are using the view prefixes in the 'patterns' function in your urls.py Refer to: http://docs.djangoproject.com/en/dev/topics/http/urls/#the-view-prefix You have used 'view' string twice. Thanks, Subhranath Chunder. On Tue, Apr 19, 2011 at 5:11 AM

Re: how to remove add and change links on admin dashboard

2011-01-23 Thread Subhranath Chunder
Override the templates. On 23 Jan 2011 07:12, "rahul jain" wrote: Hi Guys, how to remove add and change links + icons on admin dashboard ? Thanks. Rahul -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Django admin - action on delete

2011-01-07 Thread Subhranath Chunder
f, request): actions = super(SomeModelAdmin, self).get_actions(request) del actions['delete_selected'] return actions Thanks, Subhranath Chunder. On Fri, Jan 7, 2011 at 8:52 PM, galago <prog...@gmail.com> wrote: > I made what I wanted in > def log_deletion(self, request, object, object_repr)

Re: Including subfolders

2011-01-07 Thread Subhranath Chunder
ango-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > Thanks, Subhranath Chunder. -- You received this message because you are subscribed to the Goog

Re: creating apps inside sub folders

2011-01-07 Thread Subhranath Chunder
You can simply append the path to your 'lib/shared' directory to your system path in the settings.py file. sys.path.append(os.path.join(os.path.dirname(__file__), 'lib/shared')) This should do. Thanks, Subhranath Chunder. On Fri, Jan 7, 2011 at 9:20 PM, Mo Mughrabi <mo.mughr...@gmail.com>

Re: list of lists in template

2011-01-06 Thread Subhranath Chunder
rs" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http

Re: new user having trouble connecting django to postgres with psycopg2

2011-01-06 Thread Subhranath Chunder
I guess you'll have to set it to 'Australia/ACT Australia/Canberra Australia/NSW Australia/Sydney' in your settings.py instead. Thanks, Subhranath Chunder. On Fri, Jan 7, 2011 at 6:22 AM, Mark Brazil <markbra...@gmail.com> wrote: > hi, > > I've been trying to find the answer to

Re: User model being included by default

2011-01-06 Thread Subhranath Chunder
think you'll probably want to specify and use it in your settings.py as something probably like the following: AUTHENTICATION_BACKENDS = ( 'yourapp.backends.YourCustomBackend', ) So, you'll also need to have the custom backend written too. Thanks, Subhranath Chunder. On Fri, Jan 7, 2011 at 3:15

Django Developer Requirement, [Full-time] Gurgaon, India

2010-12-03 Thread Subhranath Chunder
...@gmail.com or 9717148584. Thanks, Subhranath Chunder. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-user

Re: Where do you put your business logic in django? Organizing big projects in django.

2010-09-27 Thread Subhranath Chunder
Sometimes I put it in some 'utils.py' in the app directory, and sometimes in 'views.py' itself, with leading underscores, whichever I feel is more appropriate. I guess this would be more of the developer's choice. Any better suggestions? Thanks, Subhranath Chunder. On Mon, Sep 27, 2010 at 12:43

Re: In admin, is there a post-commit hook that is executed after all models and inlines are saved?

2010-09-27 Thread Subhranath Chunder
, and the code looks cleaner too. Maybe you can try with experimenting them out sometime. Thanks, Subhranath Chunder. On Mon, Sep 27, 2010 at 8:19 AM, jonathan.morgan < jonathan.morgan@gmail.com> wrote: > Update: > > Well, I cobbled together a few things to accomplish most of

Re: DJANGO + Google App Engine, Getting Started Tutorial

2010-08-23 Thread Subhranath Chunder
You should try django non-rel project. Thanks, Subhranath Chunder. On Aug 23, 2010 3:08 PM, "nobosh" <bhellm...@gmail.com> wrote: I'm very interested in finding a up-to-date tutorial that shows steps for getting DJANGO running on Google App Engine, anyone know of an

Re: [Offtopic] Freelance django dev in Spain

2010-08-11 Thread Subhranath Chunder
I'm a Django developer working on Django since December 2009. If you are looking for freelance developer on Django, then I might be interested. Thanks, Subhranath Chunder. On Wed, Aug 11, 2010 at 10:07 PM, Matias <matiassu...@gmail.com> wrote: > Hi, > > We are looking for a freel

Re: distinct() ?

2010-07-22 Thread Subhranath Chunder
will be faster. Can anyone please let me know, which one would be faster. I'm not much considered about memory usage. Thanks, Subhranath Chunder. On Thu, Jul 22, 2010 at 12:42 AM, rmschne <rmsc...@gmail.com> wrote: > statuscodes=Member.objects.values('status').order_by('status').distinct() > &

Re: distinct() ?

2010-07-21 Thread Subhranath Chunder
I would have rather done something simple like: set(Member.objects.values_list('status', flat=True)) Thanks, Subhranath Chunder. On Thu, Jul 22, 2010 at 12:03 AM, Subhranath Chunder <subhran...@gmail.com>wrote: > I thought you were trying to get: > > I'm expecting only th

Re: distinct() ?

2010-07-21 Thread Subhranath Chunder
I thought you were trying to get: I'm expecting only the four distinct records. You'll get a ValuesQuerySet or list of dictionaries with redundant keys this way. Thanks, Subhranath Chunder. On Wed, Jul 21, 2010 at 11:40 PM, rmschne <rmsc...@gmail.com> wrote: > Member.objects.value

Re: distinct() ?

2010-07-21 Thread Subhranath Chunder
> > > Member.objects.values('status').order_by('status').distinct() > > I don't think this will ever work, to achieve what is required by him. Thanks, Subhranath -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Plese guide to solve this

2010-07-21 Thread Subhranath Chunder
Must be using very old docs: Use these instead: http://docs.djangoproject.com/en/dev/ Thanks, Subhranath Chunder. On Wed, Jul 21, 2010 at 8:47 PM, n3ph <n...@terminal21.de> wrote: > Another one who's confused about all the deep API-Changes in Django :-( > > But reading th

Re: import model from other module

2010-07-18 Thread Subhranath Chunder
Obviously it can be done. Just make sure to add the app to your INSTALLED_APPS and use the proper path while importing. Things should go fine if properly done. Thanks, Subhranath Chunder. On Mon, Jul 19, 2010 at 1:28 AM, Andreas Pfrengle <a.pfren...@gmail.com>wrote: &

Re: can foreign key fields be empty?

2010-07-18 Thread Subhranath Chunder
Ohh yes it's "null=True". Meant to say set field as None while using. Eg: class YourClass(models.Model): your_model_field = models.ForeignKey('RelatedModel', null=True) ... instance = YourClass.objects.create(your_model_field=None, ...) Thanks, Subhranath Chunder. On Mon, Ju

Tutorial: Custom Feed Generation using Django Syndication Feed Framework

2010-07-18 Thread Subhranath Chunder
://scratch-blog.appspot.com/blog/2010/07/18/tutorial-custom-feed-generation-using-django-syndication-feed-framework-12-and-later/ Thanks, Subhranath Chunder. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django IDE

2010-07-18 Thread Subhranath Chunder
Obviously it's the user personal choice, always! :) Thanks, Subhranath Chunder. On Sun, Jul 18, 2010 at 11:45 PM, Roald de Vries <downa...@gmail.com> wrote: > On Jul 18, 2010, at 7:19 PM, Biju Varghese wrote: > >> Eclipse is the best IDE for python and django. >> >>

Re: can foreign key fields be empty?

2010-07-18 Thread Subhranath Chunder
A simple "None=True" should work. Thanks, Subhranath Chunder. On Sun, Jul 18, 2010 at 11:25 PM, rmschne <rmsc...@gmail.com> wrote: > I have two tables where one is a foreign key for the other. For some > of the "children" there is no "parent". Henc

Re: Error with passing 'form_class' arg in urls.py for Django Profiles app

2010-07-15 Thread Subhranath Chunder
Could you provide the code for the custom ProfileForm class and the views first. Thanks, Subhranath Chunder. On Thu, Jul 15, 2010 at 2:49 AM, Ricko <rickentr...@gmail.com> wrote: > Using ubernostroms Django Registration app coupled with his Profile > app, both highly reco

Re: problem models.py code

2010-07-14 Thread Subhranath Chunder
I'm not exactly sure what you want. So, I'm only assuming that you might be trying to do something like: jono = models.AutoField(unique=True) instead of what you're currently using. Thanks, Subhranath Chunder. On Wed, Jul 14, 2010 at 11:08 PM, Jagdeep Singh Malhi < singh.malh...@gmail.

Re: Comparing DateTimeField to datetime.now()

2010-07-14 Thread Subhranath Chunder
How did u import the datetime module? If you did: a> import datetime Then, use 'datetime.datetime.now()' instead of 'datetime.now()' b> from datetime import datetime Then 'datetime.now()' should work correctly. Thanks, Subhranath Chunder. On Wed, Jul 14, 2010 at 9:13 PM, Chris M

Re: return number instead of string in admin

2010-07-14 Thread Subhranath Chunder
Alan, This is simple python string formatting. You may refer to the following for more details: http://docs.python.org/library/stdtypes.html#string-formatting Thanks, Subhranath Chunder. On Wed, Jul 14, 2010 at 5:31 PM, alan-l <alan.lough...@essexcricket.org.uk>wrote: > brilliant,

Re: return number instead of string in admin

2010-07-14 Thread Subhranath Chunder
Try this instead: def __unicode__(self): return u"%d" % (self.mynumber, ) On Wed, Jul 14, 2010 at 3:57 PM, Nuno Maltez wrote: > Hi, > > Why not > > def __unicode__(self): >return u"%d" % self.mynumber > > ? > > Nuno > > On Wed, Jul 14, 2010 at 11:15 AM, alan-l >