Re: How to order "links" in the Admin?

2011-08-11 Thread Andre Lopes
Thanks for the reply. What I need is a snipped like this one: http://djangosnippets.org/snippets/1053/ Thanks a lot for your help. Best Regards, On Wed, Aug 10, 2011 at 9:01 AM, Eric Hutchinson wrote: > This is a meta option. > > > from django.db import models

get Django url content with urllib2

2011-08-11 Thread Igor Nemilentsev
Hello everyone. I try: content = urllib2.urlopen('http://localhost:8080/').read() from inside some Django view(function) and http://localhost:8080/ is same Django server. This command do not give me any answer but hang on. But if url is foreign it is working. Is there some cycle problem? Is it

Adding new js to admin

2011-08-11 Thread Isaac
Hi there folks, I'm trying to add raw tinyMCE support for my project. I don't want to use the django-tinymce app, as it introduces some features that I don't want to load in my project. I followed instructions from https://code.djangoproject.com/wiki/AddWYSIWYGEditor and can't get it

Re: get Django url content with urllib2

2011-08-11 Thread Daniel Roseman
On Thursday, 11 August 2011 09:20:41 UTC+1, Igor Nemilentsev wrote: > > Hello everyone. > > I try: > > content = urllib2.urlopen('http://localhost:8080/').read() > > from inside some Django view(function) > and http://localhost:8080/ is same Django server. > > This command do not give me any

RedirectView with query_string = True and urlencoded unicode string

2011-08-11 Thread Slafs
Hi there! I'm having difficulties with the new class based RedirectView with query_string = True and some unicode string in QUERY_STRING. I made a sample of the error on bitbucket https://bitbucket.org/slafs/redirectviewtest/src could You please explain what I'm doing wrong? or maybe it is

Re: Adding new js to admin

2011-08-11 Thread Daniel Roseman
On Thursday, 11 August 2011 09:26:17 UTC+1, Vyrphan wrote: > > Hi there folks, > > I'm trying to add raw tinyMCE support for my project. I don't want to > use the django-tinymce app, as it introduces some features that I don't > want to load in my project. > > I followed instructions from >

Re: RedirectView with query_string = True and urlencoded unicode string

2011-08-11 Thread Daniel Roseman
On Thursday, 11 August 2011 09:35:43 UTC+1, Slafs wrote: > > Hi there! > > I'm having difficulties with the new class based RedirectView with > query_string = True and some unicode string in QUERY_STRING. > I made a sample of the error on bitbucket > >

Re: Installation Problem cant extract tar.gz file

2011-08-11 Thread damola oyeniyi
I also recently started using djangoon ubuntu and ran into no problems. Try and get django from the repositories: 1. apt-cache search python-django    you will see python-django files and other related files you might like 2. sudo apt-get install python-django Regards Damola

Re: How to pass url parameters to template url tag

2011-08-11 Thread Tom Evans
On Wed, Aug 10, 2011 at 7:06 PM, bruno desthuilliers wrote: > On 10 août, 16:35, Reinout van Rees wrote: >> >> Best solution: calculate that url in your python view code and just pass >> it along in the context. > > Definitly not the best

Re: Installation Problem cant extract tar.gz file

2011-08-11 Thread kenneth gonsalves
On Thu, 2011-08-11 at 01:51 -0700, damola oyeniyi wrote: > I also recently started using djangoon ubuntu and ran into no > problems. > > Try and get django from the repositories: do not do this - install from source, that is, download the tar.gz file from djangoproject.com. -- You received

Odp: Re: RedirectView with query_string = True and urlencoded unicode string

2011-08-11 Thread Slafs
Oh sorry. Here it is http://dpaste.com/591903/ File "/usr/local/lib/python2.7/dist-packages/django/views/generic/base.py" in get_redirect_url 146. return url % kwargsException Type: ValueError at /test/Exception Value: unsupported format character 'C' (0x43) at index 15 -- You

Re: Installation Problem cant extract tar.gz file

2011-08-11 Thread damola oyeniyi
Hi Ken, Any particular reason why not? Regards Damola From: kenneth gonsalves To: django-users@googlegroups.com Sent: Thursday, August 11, 2011 9:56:59 AM Subject: Re: Installation Problem cant extract tar.gz file On Thu, 2011-08-11

Re: Installation Problem cant extract tar.gz file

2011-08-11 Thread kenneth gonsalves
On Thu, 2011-08-11 at 02:02 -0700, damola oyeniyi wrote: > Any particular reason why not? generally distros cannot cannot keep up with the pace of django' development. And more important, the preferred modes of deployment like virtualenv or zc.buildout need the 'original' django. -- You

Re: dull look after install on ubuntu

2011-08-11 Thread Gelonida N
Hi Peter, On 08/11/2011 06:40 AM, Peter Kovgan wrote: > Why , for example, collectstatic copied not static content? > > > example, /home/peter/work/django/projects/src/mysite/polls/ - it's all > new project file, there were no statics yet > > > See there: > > > Copying >

Re: How to pass url parameters to template url tag

2011-08-11 Thread Kayode Odeyemi
On Wed, Aug 10, 2011 at 10:37 PM, bruno desthuilliers < bruno.desthuilli...@gmail.com> wrote: > On 10 août, 21:52, Kayode Odeyemi wrote: > > You don't pass anything from "one view to another". You eventually > pass data from a request to another, using either request params >

Re: Installation Problem cant extract tar.gz file

2011-08-11 Thread damola oyeniyi
Thank you, Ken From: kenneth gonsalves To: django-users@googlegroups.com Sent: Thursday, August 11, 2011 10:12:50 AM Subject: Re: Installation Problem cant extract tar.gz file On Thu, 2011-08-11 at 02:02 -0700, damola oyeniyi wrote: >

Re: How to pass url parameters to template url tag

2011-08-11 Thread Kayode Odeyemi
On Thu, Aug 11, 2011 at 9:52 AM, Tom Evans wrote: > On Wed, Aug 10, 2011 at 7:06 PM, bruno desthuilliers > wrote: > > On 10 août, 16:35, Reinout van Rees wrote: > >> > >> Best solution: calculate that url in your

Re: Inspecting objects

2011-08-11 Thread Cal Leeming [Simplicity Media Ltd]
Temporarily added to this to https://code.djangoproject.com/wiki/UsingTheMailingList Can be split into its own page another day On Wed, Jul 13, 2011 at 12:58 PM, Cal Leeming [Simplicity Media Ltd] wrote: > You know, I think that this subject deserves it own

Re: dull look after install on ubuntu

2011-08-11 Thread Peter Kovgan
Gelonida N, thanks. I believe you , I'm just unlucky programmer :) I should reinstall my linux django from scratch. Thank you for the explanation! It was very helpful. Peter. On 11 August 2011 12:21, Gelonida N wrote: > Hi Peter, > > On 08/11/2011 06:40 AM, Peter

Re: Redisplay form with different field value?

2011-08-11 Thread Jonas H.
On 08/09/2011 12:45 AM, Jonas H. wrote: Hello list! Is there any way to use a different value for a field when re-displaying a form? I.e. if a user enters '42' into an IntegerField but made the other fields not validate, how could that IntegerField be re-displayed with '43'? Jonas anyone?

Re: WORKSHOP ON DJANGO AND OTHER WEBDESIGNING STUFF

2011-08-11 Thread pankaj sharma
please visit this link http://www.facebook.com/ednect On Aug 10, 10:05 pm, pankaj sharma wrote: > hello friends there is a workshop to be conducted in india (kolkata) > by ednect services, it will also include information about django > if we want that everybody use

Why doesn't Django use same filebase backend for Cache and Session?

2011-08-11 Thread Dreampuf
The Cache backend of file: django/core/cache/backend/filebased.py The Session backend of file: django/contrib/sessions/backends/file.py I want use the Session that information store in file, but I see the code of Session backend of file, it's terrible, they save all session file in same

PYTHONPATH and Django

2011-08-11 Thread Bastian Ballmann
Hi Django lovers, I am developing Django under Arch Linux with virtualenv and Python 2.7 and I've got a strange problem with PYTHONPATH. First I construct virtualenv with virtualenv2 --no-site-packages test than I switch to it using source test/bin/activate and install latest Django version

decorator and context manager for nested transaction source code

2011-08-11 Thread aledema
Hello, I'm using Django since a couple of years and the more I use it the more I wish a support for django-managed nested transactions. In complex programs happens often to need them. So I would post here my own code of such tool, based of Django 1.3 commit_on_success(). Please help understand

Django cache separate database

2011-08-11 Thread vsnu
In my django app, I am using a separate database (not default). And I am selecting it manually by using (using= "database_name") Now I need to use the django backend cache on that database. For that straight forward approach works only for default database. For a separate database, do we need to

RE: [] Django cache separate database

2011-08-11 Thread Henrik Genssen
why are you willing to use the db-cache-backend instead of memcache? >reply to message: >date: 11.08.2011 05:02:10 >from: "vsnu" >to: "Django users" >subject: [] Django cache separate database > >In my django app, I am using a separate

Re: same form model with separate admins and data

2011-08-11 Thread brian
Hi Landy, You understand the problem correctly. I'm not sure how to implement your suggestion. I'm seeing a when I do similar to the following: - class myModel(models.Model): first_name = models.CharField( max_length=100, verbose_name='first') class

Re: 'str' object has no attribute 'resolve' when access admin site

2011-08-11 Thread Reinout van Rees
On 10-08-11 21:26, raj wrote: And yea, admin docs is in my installed list. Much appreciated. Still can't get it to work. This was my traceback: 'str' object has no attribute 'resolve' It sounds like one of those url patterns isn't a tuple, but a string or something like that. In the last

Re: making history

2011-08-11 Thread Andre Terra
I have played around with django-audit-log for a while, and so far it works great. However, I do need to work on saving the records to a separate db, as Shawn suggested. Fwiw, there's a page on the wiki about audit trail/logs, which, albeit outdated, should prove helpful. Cheers, AT On

Re: Displaying results in Template in a Table ? What is the proper way ?Any app?

2011-08-11 Thread Andre Terra
I'm personally considering serializing my objects and using ExtJS for powerful data grids. Their subtotal grouping mode looks just like what I want. Check out their example page and read through the .js file to see and example of the serialized data. Cheers, AT On 8/10/11, Adam Zedan

Re: django and extjs: works well together?

2011-08-11 Thread Reinout van Rees
On 10-08-11 17:32, william ratcliff wrote: We've used it--it's really domain specific, but you can look at tripleaxis.smallangles.net (please don't crash us :>). We do the front end with extjs and the back-end with django. We have a number of ajax calls

Messages without session?

2011-08-11 Thread fiëé visuëlle
Hello, In my custom model manager I need to send a message to the current user. I know her ID, but have no session. The old user.message_set fits my needs, but that's deprecated. I know there are other messaging solutions, but everything I found was replacements for the deprecated one. Do you

Re: django and extjs: works well together?

2011-08-11 Thread Michel van Leeuwen
ha Reinout, zie ook dit artikel: http://coderseye.com/2007/why-im-moving-from-jquery-to-extjs.html en groeten van je oud-collega :) Op 11-08-11 15:11, Reinout van Rees schreef: On 10-08-11 17:32, william ratcliff wrote: We've used it--it's really domain specific, but you can look at

Re: PYTHONPATH and Django

2011-08-11 Thread Reinout van Rees
On 11-08-11 09:37, Bastian Ballmann wrote: Now I start a new project and app, configure Django and last but not least I have to set the PYTHONPATH variable to my Django project dir in order to let Django find my apps. After setting PYTHONPATH django-admin.py looses commands like startproject

Re: 'str' object has no attribute 'resolve' when access admin site

2011-08-11 Thread raj
Fixed the issue, i looked through my urls file for like the 40th time, and I found that one of my multiline comments had some indenting issue. GRR. I found it by expanding that local vars part. Thanks for the help!!! On Aug 11, 8:35 am, Reinout van Rees wrote: > On

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

2011-08-11 Thread Kelly Nicholes
You need to set the name parameter. name="card_create_card". Once you do that, reference it in the {% url %}. On Aug 7, 6:34 pm, muhdazwa wrote: > You can add name to the url in the urlpatterns: > > urlpatterns = patterns('', >    url(r'card/create$',

Re: PYTHONPATH and Django

2011-08-11 Thread Bastian Ballmann
Hi, no seems that i got it wrong the problem was not my PYTHONPATH setting but my DJANGO_SETTINGS_MODULE setting. I imported another package that was absent and therefore django lost only some commands... Still strange at least for me, but the problem seems to be solved. Thx && Greets Basti

MySQL data export to Excel sheet

2011-08-11 Thread Dipo Elegbede
Hello All, I have a little problem, I,d like to share with you for possible solution. I have a models like this: class MyBuddyt(models.Model): location = models.CharField(blank=True, max_length=200) name = models.CharField(blank=True, max_length=200) email =

Odp: Re: RedirectView with query_string = True and urlencoded unicode string

2011-08-11 Thread Slafs
Should i report a ticket? -- 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/msg/django-users/-/tTIMaMNLV8EJ. To post to this group, send email to django-users@googlegroups.com.

"Great circle" using the django ORM?

2011-08-11 Thread Thomas Weholt
I got a model with longitude and latitude and want to be able to find other objects nearby a selected object. Can this be done using the django orm? What is the best approach to do this in a django project? I found a answer on Stackoverflow, but doesn't work with sqlite. Doing it in SQL is ok and

Re: "Great circle" using the django ORM?

2011-08-11 Thread Javier Guerra Giraldez
"great circle" doesn't mean what you think... http://en.wikipedia.org/wiki/Great_circle -- Javier -- 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

RE: [] "Great circle" using the django ORM?

2011-08-11 Thread Henrik Genssen
I do (using MySQL): where = '( 6378.137 * acos( cos( radians(%s) ) * cos( radians( `events_locations`.`latitude` ) ) * cos( radians( `events_locations`.`longitude` ) - radians(%s) ) + sin( radians(%s) ) * sin( radians( `events_locations`.`latitude` ) ) ) ) < %s' % (lat, lng, lat, dist) basic =

Django-sms

2011-08-11 Thread damola oyeniyi
Hi all, Please can someone tell me where the django-sms app is? I cannot find it on the google code repository. 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

South

2011-08-11 Thread CrabbyPete
I've used South and I love it, but when I ran it for my latest database I got this C:\> manage.py migrate base Running migrations for base: - Migrating forwards to 0001_initial. > base:0001_initial ! Error found during real run of migration! Aborting. ! Since you have a database that does

Re: same form model with separate admins and data

2011-08-11 Thread Landy Chapman
Brian, have a look at: https://docs.djangoproject.com/en/1.3/topics/db/models/#abstract-base-classes > If I understand you correctly, your situation is: > > FORM 1 --> [table 1] > FORM 2 --> [table 2] > > where FORM1 and FORM2 are *identical*, > and TABLE1 and TABLE2 are *identical* (same

Re: South

2011-08-11 Thread Shawn Milochik
You should try asking about this on the south-users Google group if you don't get an answer here. -- 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

Re: same form model with separate admins and data

2011-08-11 Thread Landy Chapman
> Also, would db sync work with this approach or would I have to > manually add the table? I'd recommend backing up your data (just in case you have a typo). db sync *should* create the new tables for you. I prefer to manually manipulate my database (I never used South.) -- You received

Re: "Great circle" using the django ORM?

2011-08-11 Thread Thomas Orozco
The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) Le 11 août 2011 17:09, "Thomas Weholt" a écrit : > I got a model with longitude and latitude and want to be able to find > other objects nearby a selected object. Can this be done using the > django orm? What is

Re: Django-sms

2011-08-11 Thread Andre Terra
http://djangopackages.com/grids/g/sms/ On Thu, Aug 11, 2011 at 12:01 PM, damola oyeniyi wrote: > Hi all, > > Please can someone tell me where the django-sms app is? I cannot find it on > the google code repository. > > Regards > > -- > You received this message because you

Re: Possible interest in a webcast/presentation about Django site with 40mil+ rows of data??

2011-08-11 Thread Cal Leeming [Simplicity Media Ltd]
Last call on this guys: https://spreadsheets.google.com/a/foxwhisper.co.uk/spreadsheet/viewform?hl=en_US=dENPX3BMUUFMbi1CbElwV3BvOEdkNmc6MQ#gid=0 If you want to register your attendance, please do so now. Thanks On Mon, Jul 25, 2011 at 2:00 PM, nicolas HERSOG wrote: > I

Re: "Great circle" using the django ORM?

2011-08-11 Thread Bill Freeman
Only on a flat earth of radius 1 radian. Henrik is correct on a spherical earth (which I find close enough). On Thu, Aug 11, 2011 at 12:43 PM, Thomas Orozco wrote: > The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) > > Le 11 août 2011 17:09, "Thomas Weholt"

Re: "Great circle" using the django ORM?

2011-08-11 Thread Thomas Orozco
Indeed! As a sidenote, once you factor in the size, to what extent do you think it is not precise? Le 11 août 2011 19:55, "Bill Freeman" a écrit : > Only on a flat earth of radius 1 radian. Henrik is correct on a > spherical earth (which I > find close enough). > > On Thu, Aug

Re: "Great circle" using the django ORM?

2011-08-11 Thread vikas ruhil
really , indeed!! On Thu, Aug 11, 2011 at 11:46 PM, Thomas Orozco wrote: > Indeed! > As a sidenote, once you factor in the size, to what extent do you think it > is not precise? > Le 11 août 2011 19:55, "Bill Freeman" a écrit : > > > Only on a flat

GenericIPAddressField validation error not translated

2011-08-11 Thread Federico Capoano
Hi all, i'm using the new GenericIPAddressField and validation errors are not translated to the language of my project. Pheraps this field hasn't been internationalized yet? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: MySQL data export to Excel sheet

2011-08-11 Thread Landy Chapman
This is not strictly a django question. What are the bounds (lower limit) for the library you are using eg is there really a row 0, col 0 in the spreadsheet? Give this a try #-- http://pastebin.com/jz6gH9yz -- You received this message

Re: MySQL data export to Excel sheet

2011-08-11 Thread Andre Terra
Take a look at the builtin enumerate() function. Cheers, AT On Thu, Aug 11, 2011 at 11:33 AM, Dipo Elegbede wrote: > Hello All, > > I have a little problem, I,d like to share with you for possible solution. > > I have a models like this: > > class

Re: "Great circle" using the django ORM?

2011-08-11 Thread Bill Freeman
The earth isn't a sphere, but is an oblate spheroid. Note the difference between the polar radius and the equatorial radius. Quite small, but measurable. A surveyor probably knows how to calculate the error. I don't. I was just noting that it exists, but that I find the difference in the

Re: "Great circle" using the django ORM?

2011-08-11 Thread Gelonida N
On 08/11/2011 06:43 PM, Thomas Orozco wrote: > The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) Try the formula close to the poles and you notice that there is something missing. Your formula is correct on a flat surface but (there you talk about x and y and not about lattitude and

Re: "Great circle" using the django ORM?

2011-08-11 Thread Thomas Orozco
Thank you both for the details! Le 11 août 2011 23:04, "Gelonida N" a écrit : > On 08/11/2011 06:43 PM, Thomas Orozco wrote: >> The distance is: Sqrt( Sqr(lat1-lat2) + Sqr(long1-long2) ) > > Try the formula close to the poles and you notice that there is > something missing. >

Re: "Great circle" using the django ORM?

2011-08-11 Thread Gelonida N
Databases with ordinary indexes are rather bad with finding something nearby. Thus some DB engines implemented rtree indexes (Look for example at http://www.sqlite.org/rtree.html ) or similiar kind of indexes allowing to locate objects within a certain latitude / longitude range.witt much less

Re: making history

2011-08-11 Thread Mike Dewhirst
Thanks Andre and everyone. It is holding me up too much at the moment. I've put it on the wish-list for post-release revision. I've kept all your suggestions and will investigate. Thanks again. Mike On 11/08/2011 10:40pm, Andre Terra wrote: I have played around with django-audit-log for a

Django, Json and Android

2011-08-11 Thread Kevin Anthony
i'm trying to interface a django json page with an android application. it seems most json applications written for android use www.somepage.com/json.php?this=that=anotherthing But that doesn't work with django, Has anyone interfaced Django and Android? and if they did, is there any reading

data modeling in Django

2011-08-11 Thread Adam Zedan
hi coming from a background dealing with Relational database, i am q bit unfamiliar to the concepts of data modelling such as one to one,one to many etc.When to use them why to use them and the drawbacks of not using them.Could anyone please suggest a good resource(books,websites..) on quickly

Re: data modeling in Django

2011-08-11 Thread Shawn Milochik
If you're already familiar with relational databases then you probably already know this stuff, just with different terminology. This should clear things up: https://docs.djangoproject.com/en/1.3/ref/models/fields/#module-django.db.models.fields.related Also, do the tutorial, then fiddle with

Running the orbited server?

2011-08-11 Thread raj
Odd question, but I'm trying to follow this tutorial which explains how to set up comet with django. I'm just confused about some stuff when I'm trying to do the tutorial. Firstly, where does the orbited.cfg file go? I just placed it at the root of my application (where the settings.py file etc.

Django NoSQL support status?

2011-08-11 Thread Nathan Hoad
Hi guys, just wondering what the status is on the official NoSQL support? I've done a lot of reading and the last official post I can see is Alex Gaynor's GSoC post, from August last year mentioning the Query refactor and how it should help down the road for NoSQL, but nothing past that.

Re: Django NoSQL support status?

2011-08-11 Thread Nathan Hoad
Hmm, silly me. I posted this to the users group, not the developers group. My mistake! On Aug 12, 1:18 pm, Nathan Hoad wrote: > Hi guys, just wondering what the status is on the official NoSQL > support? I've done a lot of reading and the last official post I can > see

Re: Running the orbited server?

2011-08-11 Thread william ratcliff
Can't write much now, but you may look at my students' prototype of a web based system for data reduction at: https://github.com/pjreddie/WRed Here, we were updating the client every time a new datapoint came off of our instrument. The README tells you how to start orbited, what to do with

Re: Running the orbited server?

2011-08-11 Thread william ratcliff
You may also want to look at some of the projects at: https://github.com/mcarter On Fri, Aug 12, 2011 at 12:58 AM, william ratcliff < william.ratcl...@gmail.com> wrote: > Can't write much now, but you may look at my students' prototype of a web > based system for data reduction at: >