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
> wrote:
> > Hi,
> >
> >
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
wrote:
> brilliant, thank you.
>
> is there a python or dj
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,
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
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 wrote:
> Using ubernostroms Django Registration app coupled with his Profile
> app, both highly recommended, got the default app up and runn
A simple "None=True" should work.
Thanks,
Subhranath Chunder.
On Sun, Jul 18, 2010 at 11:25 PM, rmschne wrote:
> I have two tables where one is a foreign key for the other. For some
> of the "children" there is no "parent". Hence I want to leave the
>
Obviously it's the user personal choice, always! :)
Thanks,
Subhranath Chunder.
On Sun, Jul 18, 2010 at 11:45 PM, Roald de Vries wrote:
> On Jul 18, 2010, at 7:19 PM, Biju Varghese wrote:
>
>> Eclipse is the best IDE for python and django.
>>
>> On Jul 17, 8
://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
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 Chund
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 wrote:
> Hello,
>
> is there a possibility to
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 wrote:
> Another one who's confused about all the deep API-Changes in Django :-(
>
> But reading the doc's is very helpfu
>
>
> 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
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 wrote:
> Member.objects.values('status&
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
wrote:
> I thought you were trying to get:
>
> I'm expecting only the four distinct r
o me atleast.
But, I'm not sure which one 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 wrote:
> statuscodes=Member.objects.values('status&
If you don't want to uniquify yourself, then why not simply do:
User.objects.values('username').order_by('username').distinct()
or, going the way that were already heading, it would be:
Visitor.objects.values('user__username').order_by('user__username
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 wrote:
> Hi,
>
> We are looking for a freelance django dev located
You should try django non-rel project.
Thanks,
Subhranath Chunder.
On Aug 23, 2010 3:08 PM, "nobosh" 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 any
such tutorials?
Surprisingl
rpose, 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 mos
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 M
...@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
reat help.
>
>
> -----
> Regards
> Subhodip Biswas
>
>
> GPG key : FAEA34AB
> Server : pgp.mit.edu
> http://subhodipbiswas.wordpress.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users"
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
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
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.com/gr
On Fri, Jun 1, 2012 at 6:57 PM, Tim Chase 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
> > that, and share the numbers to shed m
o put things in the right direction.
On Fri, Jun 1, 2012 at 7:43 PM, Javier Guerra Giraldez
wrote:
> On Fri, Jun 1, 2012 at 3:56 AM, Subhranath Chunder
> wrote:
> > how should we measure response complexity?
>
> a simple first approximation is the number of DB queries per page.
&
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 large part are the templates
On Sat, Jun 2, 2012 at 7:14 AM, Tim Chase 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
> > constrains in place)
>
> A couple of
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
ployment/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 from this group
gle 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.com/group/django-u
t;>register
> [/code]
>
> I only see this text if I use F5 to refresh the page.
>
> What I am missing here?
>
> Please give me a clue.
>
> Best Regards,
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" gro
ing 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
> wrote:
> >> Welcome {{ re
m 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 you are subscribed to the
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
gt; 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 group, send email to
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 to
> django-users+unsubscr...@googlegroups.com.
&g
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://gr
quot;?
>
> 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 wrote:
> > You may try to test the connection using the command line interface
> 'psql'.
> >
> &g
fragment identifier does not have
the problem. 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 resp
ent url in
browser is "http:///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
Aug 25, 2011 at 4:04 PM, Subhranath Chunder
> 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 as http
> 302
> > response speci
i-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 t
Added the Google+ authentication app to it.
On Wed, Aug 10, 2011 at 2:52 PM, Subhranath Chunder 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.
>
> My concerns were:
>
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
Google+ is using OAuth2 pretty much like Facebook.
On Mon, Sep 19, 2011 at 10:24 PM, Javier Guerra Giraldez wrote:
> On Sun, Sep 18, 2011 at 1:17 PM, Subhranath Chunder
> wrote:
> > I've probably made the first attempt to integrate the Google+ with Django
> > authent
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
-auth-helper
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@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@goog
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 wrote:
> Hi,
>
> I've created a small and simple Python helper module to have protected web
> APIs in Djang
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 wrote:
> All,
>
> I would like to know how to do this?
>
> For
Query, 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
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 apologize in advance i
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 PM,
Have updated my Linkedin profile with project details.
On Jul 29, 2011 7:41 PM, "Subhranath Chunder" wrote:
> Hi,
>
> I'm an experienced Django developer, with good experience in web
application
> development using Django as the underlying backbone. Have done numerous
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 instanc
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 in implementing a batch
FileUploadHandler',
> )
>
> 2) in my post upload 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='
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 relationshi
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 {% url
card.views.create_car
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 wrote:
> Have up
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:
>
> Python 2.6.7 (r267:888
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
> custom page? For instance,
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 the save method of a mo
can check
https://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-u
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 op
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
> wrote:
> > Yes, you can do that. You would have to override the default
> > chang
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 restored my app to the st
> 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
th python2.5
You might consider changing the default python link to the python2.6
instance.
>
> On 10 Aug, 10:48, Subhranath Chunder wrote:
> > You can check with the following:
> >
> > python manage.py shell
> >
> > then do the,
> > import MySQLdb
> &
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 wrote:
> Hey Guys, i have here
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 wrote:
> Hey Guys,
>
> i need a litle help in working with forms. i have a button and i want
> to output a success te
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
clean code.
Thanks,
Subhranath Chunder.
www.subhranath.com
On Sun, Aug 14, 2011 at 2:55 AM, Jonas H. 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 -- not
econds=90))
I, guess you can now work on the so called "extra complications". :)
Thanks,
Subhranath Chunder.
www.subhranath.com
On Sun, Aug 14, 2011 at 10:40 AM, Karen Rustad wrote:
> Hello all,
>
> In one of my models, I want to store a timedelta--a length of time not
>
backend in your application, I
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
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 wrote:
> hi,
>
> I've been trying to find the answer to this f
> 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
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
Thanks,
Su
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 wrote:
ers+unsubscr...@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 Google Groups
"Django users" group.
To post to this group, se
def get_actions(self, 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 wrote:
> I made what I wanted in
> def log_deletion(self, request, object, object_
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 this group, send email to
82 matches
Mail list logo