Re: Django Development environment

2011-08-26 Thread kenneth gonsalves
On Fri, 2011-08-26 at 15:07 +0100, Simon Connah wrote: > Mercurial or Git (depends on whether the project is open source or > not) Could you elaborate please. -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Installation

2011-08-26 Thread PremAnand Lakshmanan
Guys, I have corrected the following, *1. Uninstalled Python 3.x & Installed Python 2.7.1* Python 2.7.1 (r271:86832, Nov 27 2010, 18:30:46) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. *2. Created a PYTHONPATH variable * PYTHONPATH and

Re: Format DateTimeField in Django

2011-08-26 Thread Guevara
I am getting messages saying I'm a spammer. What happened to this list? People are infested with viruses? On 26 ago, 16:43, Guevara wrote: > Hello! > A date is sent from another server via POST to my app in this format > > date = datetime.now().strftime('%d/%m/%Y

Format DateTimeField in Django

2011-08-26 Thread Guevara
Hello! A date is sent from another server via POST to my app in this format date = datetime.now().strftime('%d/%m/%Y %H:%M:%S') output: 26/08/2011 16:30:03 And must enter the default format DateTime.Now (). This format can save, but the date is generated on another server, then have to store in

Re: Unable to work with Django API

2011-08-26 Thread Yves S. Garret
Yeah, I just resolved that issue. And yes, I messed up my DB setup. It works now. I didn't set it up properly for sqllite. On Aug 26, 3:06 pm, Jirka Vejrazka wrote: > Hi there, > >   your database is not set up properly - are you sure you went through > the "database

Re: Unable to work with Django API

2011-08-26 Thread Jirka Vejrazka
Hi there, your database is not set up properly - are you sure you went through the "database setup" section of the tutorial? HTH Jirka -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Unable to work with Django API

2011-08-26 Thread Yves S. Garret
Hi all, This is my issue: After I installed Django and got it somewhat working, I started down this tutorial: https://docs.djangoproject.com/en/dev/intro/tutorial01/ All was going well until I hit the part called "Playing with the API". I'm doing this in Windows 7 Enterprise.

Re: Custom Validation on Inline Generic Foreign Key

2011-08-26 Thread John
Any ideas? In the inline model's validation I could hardcode checks for data that I expect will only be in one of the models, but that does not seem like the best option. I am still hoping for a simpler alternative to this. Thanks. -- You received this message because you are subscribed to the

error: [Errno 104] Connection reset by peer - dev server IE 9

2011-08-26 Thread dm03514
When I am testing my applications using django 1.2 and 1.3 dev server on IE 9. Every other requests gives me: Traceback (most recent call last): File "/home/dmican/Envs/monetization/lib/python2.6/site-packages/ django/core/servers/basehttp.py", line 281, in run self.finish_response()

Aw: Re: can django be used in destop application?

2011-08-26 Thread Juergen Schackmann
if you still want to go down the "use django for desktop application" road, you might want to have a look at pyjamas to build your frontend: pyjs.org -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: Django Development environment

2011-08-26 Thread Simon Connah
Mac OS X (soon to switch to Arch Linux). Vim and numerous plugins. SQLite for local database testing during development Virtualenv Mercurial or Git (depends on whether the project is open source or not) Navicat South Selenium Firebug -- You received this message because you are subscribed to the

Re: Installation

2011-08-26 Thread donaldww
Django is not compatible with version 3.x of Python. The django library was most likely installed into your 2.x lib. DW On Aug 25, 11:47 pm, prem wrote: > Hi, > > Im trying to install Django but Im not succcessfull. > > The python has been installed properly. > > This is my

Re: Installation

2011-08-26 Thread Jirka Vejrazka
Prem, your Django does *not* have to be on your PATH, but it either has to be in your PYTHONPATH or there must be a link from your Python site-packages directory. The easiest way is to add c:/Django-1.0.4 (notice the forward slash) to your Windows PYTHONPATH environment variable (or create

Re: find_template Django 1.3

2011-08-26 Thread demalexx
Thank you for workaround. In my case I solved it in different way. I know that all email templates are in db, and we use django-dbtemplates to get them as any other template. So instead of using Django's `find_template`, I use dbtemplate loader directly, and it returns template source. However

Re: Installation

2011-08-26 Thread Thomas Orozco
You needn't have Django in your path but the parent directory so you can import it. Le 26 août 2011 14:07, "prem" a écrit : > Hi, > > Im trying to install Django but Im not succcessfull. > > The python has been installed properly. > > This is my python shell, > > Python 3.2.1

Installation

2011-08-26 Thread prem
Hi, Im trying to install Django but Im not succcessfull. The python has been installed properly. This is my python shell, Python 3.2.1 (default, Jul 10 2011, 21:51:15) [MSC v.1500 32 bit (Intel)] on win32 Type "copyright", "credits" or "license()" for more information. When I try import

Value Checking in Custom save method of admin site

2011-08-26 Thread Yaşar Arabacı
Hi, I have implemented a custom save method for one of my models like this: def save_model(self,request,obj,form,change): if obj.slug == "" or obj.slug is None: obj.slug = slugify(obj.title) # I get database representation of the object to check if # it was

Re: Integrity Error

2011-08-26 Thread Thomas Orozco
Glad I could help! Le 26 août 2011 12:53, "Torsten" a écrit : > Thanks Thomas you helped me a lot these are my first step in python > and django. > And I really starting to like it > > Torsten > > On 26 Aug., 12:23, Thomas Orozco wrote: >>

Re: Integrity Error

2011-08-26 Thread Torsten
Thanks Thomas you helped me a lot these are my first step in python and django. And I really starting to like it Torsten On 26 Aug., 12:23, Thomas Orozco wrote: > While we're at it, here are a few suggestions. > So long as you can, you should use unicode inside python

Re: django themes

2011-08-26 Thread Reinout van Rees
On 25-08-11 21:04, sjtirtha wrote: I'm looking a solution to have themes in django like in wordpress. Currently, I'm starting implement it by myself. But I face some issue namely. In wordpress all themes files: php, html, css, javascript, images are in one folder. So we only need to upload

Re: Integrity Error

2011-08-26 Thread Thomas Orozco
While we're at it, here are a few suggestions. So long as you can, you should use unicode inside python code. The main logic would be that input should be converted to unicode as soon as possible, and that output should be encoded (likely to UTF-8) as late as possible. Consequently, you might

Re: Integrity Error

2011-08-26 Thread Thomas Orozco
Actually, the line "invoice = models.ForeignKey(Invoice)" tells Django "An invoice item should always be attached to an invoince". You must realize that models are what they claim to be... models. They are not items of their own, they just define how you would model a particular item in your

Re: Integrity Error

2011-08-26 Thread Torsten
Thanks Thomas your are right concerning the sum there is no need for that. But you say: Your invoice items have no invoice attribute, as the error says. Isn't this line which defines the attribute ? invoice = models.ForeignKey(Invoice) Thanks Torsten On 26 Aug., 11:41, Thomas Orozco

Re: Integrity Error

2011-08-26 Thread Thomas Orozco
That would be blank = True Le 26 août 2011 11:58, "Kejun He" a écrit : > Sometime, set null = true would allow a field to be empty > > On Fri, Aug 26, 2011 at 5:41 PM, Thomas Orozco wrote: > >> Your invoice items have no invoice attribute, as the

Re: Integrity Error

2011-08-26 Thread Kejun He
Sometime, set null = true would allow a field to be empty On Fri, Aug 26, 2011 at 5:41 PM, Thomas Orozco wrote: > Your invoice items have no invoice attribute, as the error says. > > By the way, although I'm not sure of what you're trying to achieve, let me > point out

Re: Integrity Error

2011-08-26 Thread Thomas Orozco
Your invoice items have no invoice attribute, as the error says. By the way, although I'm not sure of what you're trying to achieve, let me point out that there is not really a need for a sum field in your invoice as you can just sum all the invoice items' amount (and respect the DRY principle -

Integrity Error

2011-08-26 Thread Torsten
Hi I have the following model: class Invoice(models.Model): customer = models.ForeignKey(Customer) project = models.ForeignKey(Project, blank=True, null=True) sum = models.FloatField(default=0) tax = models.IntegerField(default=16) payed_at = models.DateField(blank=True,

Re: Drag and drop functionality?

2011-08-26 Thread Yaşar Arabacı
It is my understanding that, drag and drop functionality depends on browser capabilities. You may want to see these two links: https://developer.mozilla.org/en/drag_and_drop_javascript_wrapper https://developer.mozilla.org/en-US/demos/detail/motivational-poster 2011/8/26 francescortiz

Re: Help with Django code.

2011-08-26 Thread Yaşar Arabacı
Try this, always worked for me, import os import sys # assuming this file resides at the same directory at settings file PROJECT_FOLDER = os.path.abspath(os.path.dirname(__file__)) UPPER_PATH = os.path.abspath(PROJECT_FOLDER + "/../") sys.path.append(UPPER_PATH)

I can't span relationships in list_filter

2011-08-26 Thread Alex
Django 1.3 supposedly supports spanning model relationships in list_filter, but when I try to use this feature, the admin page redirects me to an unfiltered page. For example, I have an admin list page for a class that looks like: class PlayerAdmin(admin.ModelAdmin): model = Player

Re: Drag and drop functionality?

2011-08-26 Thread francescortiz
By your comment it seems that your question is more about browser capabilities than django. If this is the case, check HTML5 to see what can be used for drag and drop, like files in gmail. On Aug 24, 7:22 pm, glenn hafstrom wrote: > Hi Reinout > > Thanks for your input. >

Re: Setting default form value in template

2011-08-26 Thread Mike Dewhirst
I think you need a bit of R here. The general advice I've seen is to get it working without javascript and then find a js solution. I feel it is difficult. Back at the server you only have the data the browser sends you. If I understand what you are saying, your problem is to write some