Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-30 Thread JJ Zolper
I have never heard of Guess Additions thanks for the tip! Right now I am going to remove my Ubuntu installation and re-install to give it more RAM and Video memory as well as install guest Additions! Thanks, JJ -- You received this message because you are subscribed to the Google Groups

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-30 Thread Sam Lai
On 29 January 2012 16:49, JJ Zolper wrote: > Sam, > > I have set up VirtualBox with Python and Django. Things have gone > flawlessly. > > Only thing I've noticed is it seems to be running a tad bit slow. I feel > this way because I had a native installation before and it ran

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-29 Thread JJ Zolper
Going forward I'll make sure to post only once. I don't use these Google Groups mailing lists that much besides the occasional community question so I'll make sure not to spam you all next time! : / Yes well I bought my laptop through my school (Virginia Tech) and we had a few options for

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
lawgon, I have set up VirtualBox with Python and Django. Things have gone flawlessly. Only thing I've noticed is it seems to be running a tad bit slow. I feel this way because I had a native installation before and it ran quite well. Before I go too far into writing code I was hoping to

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Sam, I have set up VirtualBox with Python and Django. Things have gone flawlessly. Only thing I've noticed is it seems to be running a tad bit slow. I feel this way because I had a native installation before and it ran quite well. Before I go too far into writing code I was hoping to

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Jonathan, I have set up VirtualBox with Python and Django. Things have gone flawlessly. Only thing I've noticed is it seems to be running a tad bit slow. I feel this way because I had a native installation before and it ran quite well. Before I go too far into writing code I was hoping to

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread JJ Zolper
Steven, I have set up VirtualBox with Python and Django. Things have gone flawlessly. Only thing I've noticed is it seems to be running a tad bit slow. I feel this way because I had a native installation before and it ran quite well. Before I go too far into writing code I was hoping to

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:25 -0800, JJ Zolper wrote: > Thanks a lot I was thinking I would learn the Google Maps API. Have > you worked with OSM? > > Do you have any input if you have used OSM and if you have used Google > Maps what your comments are? google maps are proprietary. OSM in open

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:24 -0800, JJ Zolper wrote: > That's really all I am trying to understand. From A to B. A being > where I am able to develop once I finally am able to make that > decision and B how smart I picked A so that the move from my local > computer to my server is smooth and

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread kenneth gonsalves
On Fri, 2012-01-27 at 12:18 -0800, JJ Zolper wrote: > Since I will be deploying my Python code on a server that is based on > Linux wouldn't it be smart that I develop my Python code on something > similar to my VM for Django? yes -- regards Kenneth Gonsalves -- You received this message

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-28 Thread Jonathan Paugh
Developing on a Linux-based OS will give you indispensable understanding of your production environment. On the other hand, it will probably be very unfamiliar if you haven't worked on Linux before, and easy tasks will become very difficult again, for a while. You should ultimately develop your

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread JJ Zolper
Thanks a lot I was thinking I would learn the Google Maps API. Have you worked with OSM? Do you have any input if you have used OSM and if you have used Google Maps what your comments are? Thanks, JJ Zolper -- You received this message because you are subscribed to the Google Groups

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread JJ Zolper
Thanks a lot I was thinking I would learn the Google Maps API. Have you worked with OSM? Do you have any input if you have used OSM and if you have used Google Maps what your comments are? Thanks, JJ Zoler -- You received this message because you are subscribed to the Google Groups "Django

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread JJ Zolper
> ActivePython for Windows includes the win32 extension libraries (if > one wants to go to native Windows code -- though the now standard ctypes > library permits similar capability if one knows the API), and PythonWin > IDE (as I recall, this started life as an included demo of the win32 >

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread JJ Zolper
Since I will be deploying my Python code on a server that is based on Linux wouldn't it be smart that I develop my Python code on something similar to my VM for Django? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread Steven Elliott Jr
On Jan 25, 2012, at 9:14 PM, JJ Zolper wrote: > > The keywords were 'in production'. The development server (i.e. python > > manage.py runserver) works fine under Windows. But when you want to > > make the website accessible to your audience (the internet, company > > etc.), you should host that

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-27 Thread Jonathan Paugh
On 01/23/2012 03:58 PM, JJ Zolper wrote: Yes I knew I was in the Python shell I just never saw anything that described you couldn't make Django commands within the Python interpreter. I mean it is based on Python isn't it? That's where I thought logically you could make Django calls from in

LEARNING DJANGO- NEED HELP (ERROR 404)

2012-01-27 Thread Dharmendra Verma
NEED HELP- I started learning Django, and was following tutorial from http://www.djangobook.com/en/1.0/chapter02/ , but when i started server after editing view file (followed tutorial as it is) getting error- Page not found (404) Using the URLconf defined in mysite.urls, Django tried these URL

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread kenneth gonsalves
On Wed, 2012-01-25 at 09:41 -0800, JJ Zolper wrote: > Okay I am glad to hear that something I knew was on the right track! > Thanks Kenneth! However what is OSM? Open Street Maps? maybe you could > tell me a little bit more about it as I have not heard of it http://www.openstreetmap.org/ --

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread JJ Zolper
> When you are developing your Django app, the development server that > comes with Django (python manage.py runserver) works fine on Windows. > When you are ready to move things into production for everyone else > access, you should not use the development server; instead you should > use a

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread Sam Lai
On 26 January 2012 13:14, JJ Zolper wrote: >> The keywords were 'in production'. The development server (i.e. python >> manage.py runserver) works fine under Windows. But when you want to >> make the website accessible to your audience (the internet, company >> etc.), you

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread JJ Zolper
> The keywords were 'in production'. The development server (i.e. python > manage.py runserver) works fine under Windows. But when you want to > make the website accessible to your audience (the internet, company > etc.), you should host that on Linux. I still don't quite understand. Can you

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread Sam Lai
On 26 January 2012 12:05, JJ Zolper wrote: >>  Unless you have a >>  preference for Windows though, I wouldn't use it as a Django app web >>  server in production; there's far less support on the net to help you >>  out when things go wrong. > > Let me see if this what you

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread JJ Zolper
> Unless you have a > preference for Windows though, I wouldn't use it as a Django app web > server in production; there's far less support on the net to help you > out when things go wrong. Let me see if this what you mean... so when I want to run "python manage.py runserver," a Django

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread Sam Lai
On 26 January 2012 04:50, JJ Zolper wrote: > In many of the (I)DEs (PythonWin, IDLE, probably the various EMACS > and VI configurations, SciTE), one can edit a file, save it (some will > save for you if needed), then hit some key combo which will spawn a > Python interpreter

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread JJ Zolper
Not really I don't have any preference. Any input is welcome! -- 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/-/VoMln37CSU8J. To post to this group, send

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread william ratcliff
Just curious--is there any particular reason that you were using Visual Studio? On Wed, Jan 25, 2012 at 12:50 PM, JJ Zolper wrote: > In many of the (I)DEs (PythonWin, IDLE, probably the various EMACS > and VI configurations, SciTE), one can edit a file, save it (some will >

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread JJ Zolper
In many of the (I)DEs (PythonWin, IDLE, probably the various EMACS and VI configurations, SciTE), one can edit a file, save it (some will save for you if needed), then hit some key combo which will spawn a Python interpreter passing it the file for execution. You may even be prompted to supply

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-25 Thread JJ Zolper
Okay I am glad to hear that something I knew was on the right track! Thanks Kenneth! However what is OSM? Open Street Maps? maybe you could tell me a little bit more about it as I have not heard of it? -- You received this message because you are subscribed to the Google Groups "Django users"

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-24 Thread kenneth gonsalves
On Tue, 2012-01-24 at 19:19 -0800, JJ Zolper wrote: > I am interested in PostgreSQL. I've heard it is good to use along with > Django. More specifically to work with GIS. I'm very interested in the > Geographical uses of Django. In particular GeoDjango. As I continued > to learn more about this

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-24 Thread JJ Zolper
Sam Lai, I am interested in PostgreSQL. I've heard it is good to use along with Django. More specifically to work with GIS. I'm very interested in the Geographical uses of Django. In particular GeoDjango. As I continued to learn more about this web framework I hope to be able to work with

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-24 Thread JJ Zolper
Sam Lai, Thank you so much for taking the time to explain all that to me. Being new to all this I feel that I might need to just start out with a command prompt working with Django and something else... another command prompt or VS to create my python files. However, having read what you

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-24 Thread Sam Lai
On 24 January 2012 07:58, JJ Zolper wrote: > Yes I knew I was in the Python shell I just never saw anything that > described you couldn't make Django commands within the Python interpreter. I > mean it is based on Python isn't it? That's where I thought logically you > could

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread JJ Zolper
Yes I knew I was in the Python shell I just never saw anything that described you couldn't make Django commands within the Python interpreter. I mean it is based on Python isn't it? That's where I thought logically you could make Django calls from in Python? SO Is your best advice to have

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread JJ Zolper
For sanity purposes I removed my "hack" or start up script that had "import django" and "import IPython" Here it is: >>> import sys >>> sys.path ['c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE', 'C:\\Python27\\lib\\site-packages\\setuptools-0.6c11-py2.7.egg',

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread Andre Terra
the >>> indicates you are IN a python shell, which is different from your OS prompt. Try exiting the shell first (with exit()) and then run "python manage.py runserver" from a command prompt or terminal window. Cheers, AT On Mon, Jan 23, 2012 at 4:11 PM, JJ Zolper wrote: >

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread JJ Zolper
Here is the error: >>> python manage.py runserver File "", line 1 python manage.py runserver ^ SyntaxError: invalid syntax >>> You've left out the most important bit - the actual traceback error. What is it? If it can't find something, then it could be a PYTHONPATH

Re: I need help with Python Tools for Visual Studio 2010 and Django

2012-01-23 Thread Sam Lai
On 23 January 2012 15:22, JJ Zolper wrote: > Hello everyone, > > I was able to install Django to my machine and before I was using the > command prompt. Django's path is in my Windows 7 64 bit Enterprise > Environment variable. Python worked fine as well too. I also installed

I need help with Python Tools for Visual Studio 2010 and Django

2012-01-22 Thread JJ Zolper
Hello everyone, I was able to install Django to my machine and before I was using the command prompt. Django's path is in my Windows 7 64 bit Enterprise Environment variable. Python worked fine as well too. I also installed IPython because I heard it was useful but I haven't tried that yet.

Re: Need help with userena - assign user to group at signup

2012-01-20 Thread Jesramz
>you just make your choice in the backend depending what your database says Would I have to go into the admin myself? (please, I have the mind of a four year-old) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Need help with userena - assign user to group at signup

2012-01-20 Thread Andres Reyes
What do you mean with the employee choosing the employer option? You normally don't give a choice in the frontend, you just make your choice in the backend depending what your database says 2012/1/19 Jesramz : > > > The problem with that, if I'm understanding

Re: Need help with custom search using admin queryset

2012-01-20 Thread Raoul
Is there nobody using such extended search functions in Django? Does anyone have a similar method for filtering querysets before returning to admin result list? Thanks for any hint! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Need help with userena - assign user to group at signup

2012-01-19 Thread Jesramz
The problem with that, if I'm understanding correctly, is that a person who is meant to be an employee can easily choose the employer option. I want to add permissions such that an employer can see employee profiles while the employee can't (a separate form might add a tiny bit more security, I

Re: Need help with userena - assign user to group at signup

2012-01-19 Thread Andres Reyes
I don't think you need two different login forms, it looks more like a UserProfile with field in it saying something like EMPLOYEE_CHOICES = ( (1, 'employer'), (2, 'employee'), ) employee_type = models.IntegerField(choices=EMPLOYEE_CHOICES) 2012/1/19 Jesramz

Need help with userena - assign user to group at signup

2012-01-19 Thread Jesramz
I would like to separate users into two different groups, employer or employee, at signup. I think the usual approach is to make two different sign-up forms one for the employer group and another for the employee group. I'm currently using django-userena. What would I have to do to get this

Re: Need help in renaming template tags

2012-01-02 Thread CareerDhaba tech
Sent the previous email without reading the thread. I tried both {% import %} and {% load %}, but it errors out when trying to access either of the thumbnails in the app, spitting out an unpacking error. I have opened an issue on the github page, but haven't heard from the original developer yet.

Re: Need help in renaming template tags

2012-01-02 Thread CareerDhaba tech
I am using two because django-userena uses easy_thumbnail, but I'd like to use sorl-thumbnail for actual thumbnail use in my app. - Harshil On Mon, Jan 2, 2012 at 8:07 PM, francescortiz wrote: > Why are you using two thumbnail providers? > > On Dec 26 2011, 3:01 pm,

Re: Need help in renaming template tags

2012-01-02 Thread CareerDhaba tech
Hi Andre, Thanks for looking into this. Have you come across this django app? https://github.com/codysoyland/django-smart-load-tag The app claims to have a fix for this problem, but I had trouble getting it to work (unpacking issue). If you can keep me in the loop regarding the ticket, that

Re: Need help in renaming template tags

2012-01-02 Thread francescortiz
Why are you using two thumbnail providers? On Dec 26 2011, 3:01 pm, CareerDhaba tech wrote: > Hey everyone, > > I am running into an issue where two third party apps easy_thumbnail and > sorl_thumbnail are using the custom template tag called thumbnail. Hence, I > am

Re: Need help in renaming template tags

2012-01-02 Thread Andre Terra
I now realize the problem is much more complex than what I though originally. My suggestion to you is to use this nifty third-party tool called django-smart-load-tag[1]. Once you get it up and running, try using {% import %} instead of {% load %}. Cheers, AT [1]

Re: Need help in renaming template tags

2012-01-02 Thread Andre Terra
Hello, I looked into your problem and realized the current implementation of {% load %} doesn't allow for homonimous tags. I plan on working toward a patch to fix this, but this can take a little while. Meanwhile, your best bet would be to fork one of the two projects and change the tag's name, I

Re: Need help in renaming template tags

2012-01-01 Thread CareerDhaba tech
Just bumping this up in case anyone can help. Thanks, Harshil On Mon, Dec 26, 2011 at 7:31 PM, CareerDhaba tech wrote: > Hey everyone, > > I am running into an issue where two third party apps easy_thumbnail and > sorl_thumbnail are using the custom template tag called

Re: Need help for using easy_thumbnails

2012-01-01 Thread francescortiz
I wrote a thumbnailing app myself: https://github.com/francescortiz/image The main advantages of this are: - You set the center of attention for images through the admin section. This way, when you crop your image it looks properly aligned, whatever crop you do. This is the reason why I created

Need help in renaming template tags

2011-12-26 Thread CareerDhaba tech
Hey everyone, I am running into an issue where two third party apps easy_thumbnail and sorl_thumbnail are using the custom template tag called thumbnail. Hence, I am actually unable to use the tag at all. I would like to change it so that the template tag from sorl_thumbnail is renamed as

Need help with custom search using admin queryset

2011-12-14 Thread Raoul
Dear Django list, I need some help with a custom queryset I use in a project to extend standard admin search function. Unfortunately the model has no relation, as the Customers table is running on an external unmanaged Database. Here is the code snippet from my admin.py to lookup the Status

Need help for using easy_thumbnails

2011-12-07 Thread Nibil M.S
I am using Django Development trunk version on Fedora 15. I tried to enable the thumbnails option on my project followed by the instructions given in https://github.com/SmileyChris/easy-thumbnails . But the thumbnail is not working. Only the image is loading. Please help to fix the problem.

Need help for using easy_thumbnails

2011-12-07 Thread Nibil M.S
I am using Django Development trunk version on Fedora 15. I tried to enable the thumbnails option on my project followed by the instructions given in https://github.com/SmileyChris/easy-thumbnails . But the thumbnail is not working. Only the image is loading. Please help to fix the problem.

Re: Need help upgrading old view/url to new syntax...

2011-11-10 Thread Andres Reyes
Glad to be able to help 2011/11/10 Micky Hulse > On Thu, Nov 10, 2011 at 3:47 PM, Micky Hulse wrote: > > Whoa! That works perfectly! > > Ack! I spoke too soon. > > My context variable name of "user" conflicted with the current > logged-in user (looks like

Re: Need help upgrading old view/url to new syntax...

2011-11-10 Thread Micky Hulse
On Thu, Nov 10, 2011 at 3:47 PM, Micky Hulse wrote: > Whoa! That works perfectly! Ack! I spoke too soon. My context variable name of "user" conflicted with the current logged-in user (looks like there's already a "user" variable floating around at the template level... I

Re: Need help upgrading old view/url to new syntax...

2011-11-10 Thread Micky Hulse
Hi Andres, thanks so much for the quick reply, I really appreciate it. On Thu, Nov 10, 2011 at 1:00 PM, Andres Reyes wrote: > See https://gist.github.com/1356199/bd1af5e81d51ef32a3f4aa29a7a9120c9a8ffe85 > The problem is that you're overriding get_queryset when you should be >

Re: Need help upgrading old view/url to new syntax...

2011-11-10 Thread Andres Reyes
See https://gist.github.com/1356199/bd1af5e81d51ef32a3f4aa29a7a9120c9a8ffe85 The problem is that you're overriding get_queryset when you should be overriding get_object 2011/11/10 Micky Hulse > Hello, > > I am in the process of upgrading this "old" functional code: > >

Need help upgrading old view/url to new syntax...

2011-11-10 Thread Micky Hulse
Hello, I am in the process of upgrading this "old" functional code: urls_old.py: views_old.py: Here's what I have so far: urls.py: views.py:

Need help on Pinax and Django

2011-09-04 Thread О . Тэмүлэн
Hello. I need help on django. I'm using Django project with Pinax. And i need to translate default login page also sign up page fields. But i can't find where should i translate. I found the signup.html but it uses this: ** *{% csrf_token %}* ** *{{ form

Re: Need Help Regarding Forms.py

2011-09-01 Thread chandrakant kumar
just see the output in the interactive shell , you can see the id of the form elements. On 9/1/11, Showket Bhat wrote: > Thanks for presious reply Sir, > I have used such type of forms before but what if i need to adjust the > size of fields, Color of my form, design

Re: Need Help Regarding Forms.py

2011-09-01 Thread Showket Bhat
Thanks for presious reply Sir, I have used such type of forms before but what if i need to adjust the size of fields, Color of my form, design and CSS of such forms.. How can i make that colorful..IS there a way... On Sep 1, 3:47 pm, Oscar Carballal wrote: > You can use

Need Help Regarding Forms.py

2011-09-01 Thread Showket Bhat
Hi All I am new to Django and I have created a small application for learning Django.. Well I have not used forms in my application.. Is it necessary to use forms in Django.. Can't we work without forms.. If yes then I want to create a form where in i ll be inserting field values for a

Re: Need Help Regarding Forms.py

2011-09-01 Thread Oscar Carballal
You can use ModelForms, it is the easiest way of creating the forms for your template: https://docs.djangoproject.com/en/dev/topics/forms/modelforms/ That will generate the necessary form and you just need to put the form templatetags in your template. An example for your code would be: forms.py

Re: Need Help Regarding Forms.py

2011-09-01 Thread Showket Bhat
Sir, I am not much familier with forms. even i have practiced a little but found forms not to be so helpfull... If i need to customize my own formswith my own design and flow... Thats the reason..Please help me with my actual query.. I ll be very much thankful to U... Thanks On Sep 1, 3:37 pm,

Re: Need Help Regarding Forms.py

2011-09-01 Thread bruno desthuilliers
On Sep 1, 12:31 pm, Showket Bhat wrote: > Hi All > > I am new to Django and I have created a small application for learning > Django.. Well I have not used forms in my application.. Is it > necessary to use forms in Django.. Can't we work without forms.. You "can"

Re: Need help on admin page

2011-08-23 Thread Kejun He
Visit the django official document about admin https://docs.djangoproject.com/en/1.3//ref/contrib/admin/ On Tue, Aug 23, 2011 at 2:01 PM, Temulen Odbayar wrote: > I don't understand about admin page site thing. What should i do with > this thing??? Sorry my bad english. Any

Need help on admin page

2011-08-23 Thread Temulen Odbayar
I don't understand about admin page site thing. What should i do with this thing??? Sorry my bad english. Any help ^__^ -- 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

Re: Need help on django admin site

2011-08-22 Thread О . Тэмүлэн
thanks for reply ^__^ On Mon, Aug 22, 2011 at 9:50 PM, Jaspreet Sarao wrote: > On Mon, Aug 22, 2011 at 12:11 PM, Temulen Odbayar > wrote: > > I'm creating a web with people registration site. And also companies > > can register people... I think i

Re: Need help on django admin site

2011-08-22 Thread Jaspreet Sarao
On Mon, Aug 22, 2011 at 12:11 PM, Temulen Odbayar wrote: > I'm creating a web with people registration site. And also companies > can register people... I think i can use admin site to do these things > and don't need to create another page with registration form. But if >

Need help on django admin site

2011-08-22 Thread Temulen Odbayar
I'm creating a web with people registration site. And also companies can register people... I think i can use admin site to do these things and don't need to create another page with registration form. But if companies can use admin site they may do anything they want. So i think i can use group

Re: I need help with reverse and url patterns

2011-08-20 Thread Daniel Roseman
On Saturday, 20 August 2011 20:20:12 UTC+1, Joshua Russo wrote: > > I setup this patter in url.py > > url(r'^events/(?P\d{4})/(?P\d{2})/$', events, > name="eventsMonth") > > in my template I have this tag > > {% url eventsMonth year=month.prev.year month=month.prev.month %} > > but I keep

Re: I need help with reverse and url patterns

2011-08-20 Thread Joshua Russo
Never mind I got it. I changed my url patter to url(r'^events/(?P\d{4})/(?P\d{1,2})/$', events, name="eventsMonth") I'm still not very sharp on my regex skills. I realized that {2} required a 2 digit number -- You received this message because you are subscribed to the Google Groups

I need help with reverse and url patterns

2011-08-20 Thread Joshua Russo
I setup this patter in url.py url(r'^events/(?P\d{4})/(?P\d{2})/$', events, name="eventsMonth") in my template I have this tag {% url eventsMonth year=month.prev.year month=month.prev.month %} but I keep getting Caught NoReverseMatch while rendering: Reverse for 'eventsMonth'

Re: need help regard to setup a web-hosting environment for Django

2011-08-17 Thread Andre Terra
*Best Right way to install django, python packages:* http://www.saltycrane.com/blog/2009/05/notes-using-pip-and-virtualenv-django/ *Install nginx and serve django apps through fcgi: *https://docs.djangoproject.com/en/dev/howto/deployment/fastcgi/*

need help regard to setup a web-hosting environment for Django

2011-08-17 Thread vikas ruhil
Hey I am using Ubuntu as My OS, hey want to setup a local web-hosting environment on my machine for a open source project for a django website , so please any can help me in this how to setup i know set up a local web hosting of php not for python can anybody help me, I try about 20 times i

Re: Need help writing join Django query for this simple model..

2011-08-09 Thread Shawn Milochik
This is where using the related_name kwarg comes in. You can also use the default value, which in this case is academics_set. I see you made most of the recommended changes to your model definitions. I'd just like to reiterate two: Remove the underscore in your model name. Remove the

RE: Need help writing join Django query for this simple model..

2011-08-09 Thread Hayyan Rafiq
ine 1, in AttributeError: 'int' object has no attribute 'gpa' My question is how can i make it work both ways ?? Is that even possible??? Date: Tue, 9 Aug 2011 08:50:48 -0400 Subject: Re: Need help writing join Django query for this simple model.. From: kmtra...@gmail.com To: django-users@goog

RE: Need help writing join Django query for this simple model..

2011-08-09 Thread Hayyan Rafiq
t_Info.objects.all() >>> obj=list[0] >>> obj Now i got the Student_info object. and i know Student_Info is linked to Academics via Roll_No.. so now how could i read the GPA in Academics any suggestions?? Date: Tue, 9 Aug 2011 08:50:48 -0400 Subject: Re: Need help writing join Djang

Re: Need help writing join Django query for this simple model..

2011-08-09 Thread Karen Tracey
On Mon, Aug 8, 2011 at 11:49 PM, Hayyan Rafiq wrote: > so i tried this now > > > class Student_Info(models.Model): > Roll_No = models.IntegerField(primary_key=True) > Cell_No = models.IntegerField() > > E_mail = models.EmailField(max_length=30) > > class

RE: Need help writing join Django query for this simple model..

2011-08-08 Thread Hayyan Rafiq
k (most recent call last): File "", line 1, in AttributeError: 'Academics' object has no attribute 'E_mail' >>> obj.Student_Info.GPA Traceback (most recent call last): File "", line 1, in AttributeError: 'Academics' object has no attribute 'Student_Info' Any ide

RE: Need help writing join Django query for this simple model..

2011-08-08 Thread Hayyan Rafiq
Tried "Without a related name: >> obj.student_set.all()[0].E_mail " Btw student_set ?? Anyways it doesn't work.. Still trying to figure out the solution... Date: Mon, 8 Aug 2011 23:07:59 -0400 From: sh...@milochik.com To: django-users@googlegroups.com Subject: Re: N

Re: Need help writing join Django query for this simple model..

2011-08-08 Thread Shawn Milochik
Make your life a little easier and add a related_name argument to your Roll_No foreign key. Example: Roll_No = models.ForeignKey('Student_Info',to_field='Roll_No', related_name = 'students') Then: obj.students.all()[0].E_mail Without a related name: obj.student_set.all()[0].E_mail

RE: Need help writing join Django query for this simple model..

2011-08-08 Thread Hayyan Rafiq
gt;>> recs[0] >>> obj=recs[0] >>> obj.E_mail Traceback (most recent call last): File "", line 1, in AttributeError: 'Academics' object has no attribute 'E_mail' Date: Mon, 8 Aug 2011 22:58:21 -0400 From: sh...@milochik.com To: django

Re: Need help writing join Django query for this simple model..

2011-08-08 Thread Shawn Milochik
On 08/08/2011 10:55 PM, Hayyan Rafiq wrote: Tried that >>> recs=Academics.objects.all() >>> recs[0] >>> obj=recs[0] >>> obj.Cell_No Traceback (most recent call last): File "", line 1, in AttributeError: 'Academics' object has no attribute 'Cell_No' Am i missing something?? Yes,

RE: Need help writing join Django query for this simple model..

2011-08-08 Thread Hayyan Rafiq
; Date: Mon, 8 Aug 2011 22:48:05 -0400 > From: sh...@milochik.com > To: django-users@googlegroups.com > Subject: Re: Need help writing join Django query for this simple model.. > > It would just be: > > recs = Academics.objects.all() > > Because that table has all t

Re: Need help writing join Django query for this simple model..

2011-08-08 Thread Shawn Milochik
It would just be: recs = Academics.objects.all() Because that table has all those fields. Also, some style notes: It's non-standard to put underscores in class names. It's non-standard to put capital letters in field names. It's non-standard (and grammatically incorrect) to name

Need help writing join Django query for this simple model..

2011-08-08 Thread Hayyan Rafiq
Suppose I have the following 2 Classes in models. class Student_Info(models.Model): Roll_No = models.IntegerField(primary_key=True) E_mail = models.EmailField(max_length=30) class Academics(models.Model): Roll_No = models.ForeignKey('Student_Info',to_field='Roll_No') GPA =

Re: need help with calling following complex query

2011-07-11 Thread Roshan Mathews
On Mon, Jul 11, 2011 at 10:36, Venkatraman S wrote: > Raw-sql and the snippet provided by me would end up generating the same sql. > > One advantage of my snippet is, if your db does not support sin/cos > functions(like sqlite3), > then you can go ahead defining funcs which

Re: need help with calling following complex query

2011-07-11 Thread Venkatraman S
On Mon, Jul 11, 2011 at 10:36 PM, Jonas Geiregat wrote: > > > > results.extra(select={ > > 'distance': > '(acos(sin(latitude)*sin(%(latitude)f)+cos(latitude)*cos(%(latitude)f)*cos(%(longitude)f-longitude)))' > % { > >

Re: need help with calling following complex query

2011-07-11 Thread Venkatraman S
On Tue, Jul 12, 2011 at 4:36 AM, sanket wrote: > Thanks @Venkatraman, I really appreciate your help. > ability to create a function is pretty cool. > Thanks. Actually, i stumbled on this solution due to my use case - i test all my apps in sqlite3 and then move to other

Re: need help with calling following complex query

2011-07-11 Thread sanket
Thanks @Venkatraman, I really appreciate your help. ability to create a function is pretty cool. Thanks again, sanket On Jul 11, 1:06 pm, Jonas Geiregat wrote: > > results.extra(select={ > >                             'distance': > >

Re: Need help intercepting SQL

2011-07-11 Thread bruno desthuilliers
On 11 juil, 16:47, Eric B wrote: > > @OP: I think your better bet would be to implement your own db > > backend, deriving from django's mysql backend. > > I agree and looked into this, but the backend in Django 1.2 actually > defers to the MySQLdb library. Of course it does

Re: need help with calling following complex query

2011-07-11 Thread Jonas Geiregat
> > results.extra(select={ > 'distance': > '(acos(sin(latitude)*sin(%(latitude)f)+cos(latitude)*cos(%(latitude)f)*cos(%(longitude)f-longitude)))' > % { > 'latitude': latitude, > 'longitude': longitude

Re: Need help intercepting SQL

2011-07-11 Thread DrBloodmoney
I think that you would probably have better luck coming at it from the other end. That is, in the database itself (stored procedure or otherwise). -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Need help intercepting SQL

2011-07-11 Thread Eric B
> I am taking a very wild guess, as i have not pored over the docs, > but does a middleware which proxies the sqls help you? I think > i saw one such in djangosnippets. I searched djangosnippets.org for "proxy sql" and only found http://djangosnippets.org/snippets/1913/. That's not exactly what

Re: Need help intercepting SQL

2011-07-11 Thread Eric B
> @OP: I think your better bet would be to implement your own db > backend, deriving from django's mysql backend. I agree and looked into this, but the backend in Django 1.2 actually defers to the MySQLdb library. I couldn't find any references online that talked about or showed examples for

<    2   3   4   5   6   7   8   9   10   11   >