Re: Getting an AttributeError while creating a Django project

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 4:39 PM, Olga Zasenko wrote: > Hi, everybody! > I'm following the instructions on website docs.djangoproject.com and trying > to create my very first Django project. > The only result I get is a confusing error: > > AttributeError: 'module' object

Re: Django 1.5 tutorial error: 'module' has no attribute 'StackedInLine'

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 3:32 PM, +Emmanuel wrote: > Hello there, > > I am working through the django tutorial at djangoproject.com. So far > everything works out fine until Section 2.4.6 (customizing the admin form). > Django throws an error: 'module' has no attribute

Re: Avoiding Sessions

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 1:35 PM, Venkatraman S wrote: > So, if i am right, usage of sessions makes an extra call to the DB for every > view with login_required. > > SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", > "auth_user"."is_superuser",

Re: Using values_list and extra on same queryset

2013-03-27 Thread Tom Evans
On Wed, Mar 27, 2013 at 12:38 PM, Larry Martell wrote: > Ignore my last message - I was seriously sleep deprive3d when I made > it. But my original question remains - how can I use values_list and > extra on same queryset? It just seems to WFM:

Re: Django problem:AttributeError:Manage isn't accessible via Link instances

2013-03-21 Thread Tom Evans
On Thu, Mar 21, 2013 at 7:49 AM, simon xue wrote: > Hi,When I read the book named "Learning Website Development With > Django",step by step to doing the example,When I read to page 31,"To get an > object by ID,type the following:>>>Link.object.get(id=1) " I got

Re: PostgresSQL or MySql with django?

2013-03-21 Thread Tom Evans
On Thu, Mar 21, 2013 at 1:06 PM, frocco wrote: > Has anyone used this? > > https://github.com/lanyrd/mysql-postgresql-converter/ > > I cannot get this working, says cannot find the file > Why not use dumpdata as I suggested? Add your postgresql database connection in Django as

Re: Looking for best practices regarding Development and production server paths

2013-03-21 Thread Tom Evans
On Thu, Mar 21, 2013 at 11:35 AM, DJ-Tom wrote: > Hi, > > I'm still a beginner and currently I'm trying to get more familiar with > Django. > > I'm looking for any more detailed best-practices-type description on how the > development cycle is meant to be managed. > > In

Re: PostgresSQL or MySql with django?

2013-03-20 Thread Tom Evans
On Wed, Mar 20, 2013 at 1:54 PM, frocco wrote: > Hello, > > I know this is not django related, but can someone help me with the syntax > to port mysql to postgresql? > I tried the mysqldump command with the postgresql compatibility option, but > I still cannot import the data.

Re: Trouble in getting django session on app engine

2013-03-20 Thread Tom Evans
On Wed, Mar 20, 2013 at 10:19 AM, Suja C Varghese wrote: > I have read this and tried using django sessions. And i got error - > ImproperlyConfigured: settings.DATABASES is improperly configured. Please > supply the ENGINE value. Check settings documentation for more details.

Re: save as

2013-03-20 Thread Tom Evans
On Wed, Mar 20, 2013 at 11:28 AM, Larry Martell wrote: > Yes, I have convinced them to not require this. Now my issue is how to > cause a file to be saved and to also render a template. When I return > this: > > response = HttpResponse('This is what I want to

Re: Can't create an object with a foreign key

2013-03-20 Thread Tom Evans
On Tue, Mar 19, 2013 at 5:13 PM, Cody Scott wrote: > I get the error when I try to make an object. > >> Cannot assign "u'Category object'": "Course.category" must be a "Category" >> instance. > > > here is my admin form > > admin.py > > admin.site.register(Category,

Re: Session values (occasionally) not being persisted

2013-03-18 Thread Tom Evans
On Mon, Mar 18, 2013 at 11:30 AM, Philip Goh wrote: > Dear list, > > This is a question that was asked on Stackoverflow more than a week ago, but > I haven't had an answer so I am posting this to the Django mailing list as > well. >

Re: Settings object has no attribute 'ROOT_URLCONF' while deploying using apache and mod_wsgi

2013-03-18 Thread Tom Evans
On Sun, Mar 17, 2013 at 9:20 AM, Navid Shaikh wrote: > Hi folks, > > (Before posting I searched in archive and the question is kind of similar to > thread [1].) > > I am getting error: > AttributeError: 'Settings' object has no attribute 'ROOT_URLCONF' Hi Navid Can you

Re: plugin for selecting files

2013-03-15 Thread Tom Evans
On Fri, Mar 15, 2013 at 12:59 PM, Larry Martell wrote: > On Thu, Mar 14, 2013 at 5:08 PM, Shawn Milochik wrote: >> On Thu, Mar 14, 2013 at 6:03 PM, Larry Martell >> wrote: >>> >>> I have been googing this for 2 days and

Re: Django on Mediatemple DV (4.0) in Virtualenv

2013-03-15 Thread Tom Evans
On Thu, Mar 14, 2013 at 9:37 PM, Tim Walzer wrote: > I am currently trying to install Django on a Mediatemple DV (4.0) server and > have the installation be within a virtualenv. The django app will be run > from a subdomain, parts.domain.com, while the root domain

Re: Problem with ManyToManyField related table search

2013-03-13 Thread Tom Evans
On Wed, Mar 13, 2013 at 4:57 PM, Frank Schima wrote: > > Hello, > > > I'm clearly missing something obvious with a ManyToManyField. I just want to > return a result list for the related table in a View. > > So here is my Model: > > class Supply(models.Model): > > name

Re: django templates and tex/latex

2013-03-13 Thread Tom Evans
On Wed, Mar 13, 2013 at 2:43 PM, Tom Evans <tevans...@googlemail.com> wrote: > On Wed, Mar 13, 2013 at 2:01 PM, Ken <t...@anl.gov> wrote: >> I would like to write a tex/latex file with django tags in it. Load it with >> the template loader and render it with a conte

Re: django templates and tex/latex

2013-03-13 Thread Tom Evans
On Wed, Mar 13, 2013 at 2:01 PM, Ken wrote: > I would like to write a tex/latex file with django tags in it. Load it with > the template loader and render it with a context. The problem is that my > tex/latex file has quite a few '{%' in them. They are conventional in TeX > for

Re: Django 1.5 and url tag ( {% url 'django.contrib.auth.views.login' %})

2013-03-13 Thread Tom Evans
On Wed, Mar 13, 2013 at 1:33 PM, VVilku wrote: > Hello, > > I have problem with: > > Reverse for 'django.contrib.auth.views.login' with arguments '()' and > keyword arguments '{}' not found. > > > Request Method: GET > Request URL:

Re: how do I run a django script from command line or Pycharm?

2013-03-13 Thread Tom Evans
On Wed, Mar 13, 2013 at 12:42 AM, frocco wrote: > I want to run the code below in a file called migration.py > 3 options: 1) Setup the django environment manually in your scripts:

Re: Access Model data from a ModelFormset form

2013-03-12 Thread Tom Evans
On Tue, Mar 12, 2013 at 2:24 PM, Jim Kalafut wrote: > Hi, > > I often want to use a ModelFormset by showing some editable fields, and then > showing some static data that is from the related model instance. For > example, I want to bulk edit a group of Person object phone

Re: error- A server error occurred. Please contact the administrator.

2013-03-12 Thread Tom Evans
On Tue, Mar 12, 2013 at 3:26 PM, Mike Doroshenko II wrote: > I thought the error was "A server error occurred. Please contact the > administrator." > > I hate when errors say to contact your system administrator, I am my system > administrator and am frustrated by invalid

Re: Is there any database ( or other ) magic going on with django properties?

2013-03-12 Thread Tom Evans
On Tue, Mar 12, 2013 at 6:09 AM, Doug S wrote: > I'm considering using django properties on some models that are mostly > tabulated numerical data. > I'm want to derive some numerical scores from some of the columns of data I'm > using as input. > If I use properties for

Re: How to display large data by scrolling html page using python and django?

2013-03-11 Thread Tom Evans
On Mon, Mar 11, 2013 at 2:47 PM, Avnesh Shakya wrote: > ya i m trying to display data from database on html page, but it's showing > 20-25 rows of data from database..Actually i want to display 25 rows of data > after that i want show 25 rows of data,that time last 20 rows

Re: django login/registration validation error message issue

2013-03-11 Thread Tom Evans
On Mon, Mar 11, 2013 at 1:28 PM, sri wrote: > Hi, > > I am relatively new to Django and trying to create a Django application > using 1.5 and created a pop up modal login and registration form using > twitter bootstrap. The example i used to create the drop down >

Re: Upgrade to 1.5 issues

2013-03-11 Thread Tom Evans
On Mon, Mar 11, 2013 at 2:21 PM, Tom Evans <tevans...@googlemail.com> wrote: > On Mon, Mar 11, 2013 at 2:00 PM, jayhalleaux <jay.halle...@gmail.com> wrote: >>>> Any ideas on question 1? how to use named urls in settings.py? >> > > The problem with having nam

Re: Upgrade to 1.5 issues

2013-03-11 Thread Tom Evans
On Mon, Mar 11, 2013 at 2:00 PM, jayhalleaux wrote: >>> Any ideas on question 1? how to use named urls in settings.py? > The problem with having named URLs in settings.py (also some other places, models.py for instance) is that at this point, the URL resolving

Re: python

2013-03-11 Thread Tom Evans
On Mon, Mar 11, 2013 at 1:05 PM, Bill Freeman wrote: > I wouldn't call that "compiling", but it is a step that many people take in > order to make it slightly more convenient to run. > > While "compiling" does happen, it is done automatically as a side effect of > running the

Re: Template inheritance

2013-03-11 Thread Tom Evans
On Sat, Mar 9, 2013 at 10:28 AM, Tomas Ehrlich wrote: > Hi Nenad, > you can wrap your meta-refresh line in another block and then delete > it's content in templates which shouldn't be refreshed. > > # base_site.html > {% block extrahead %} > {% block extrahead-refresh

Re: Template inheritance

2013-03-11 Thread Tom Evans
On Sat, Mar 9, 2013 at 9:41 AM, Nenad Cikic wrote: > Hello, > I am using django admin for my project so I am not writing much templates by > myself, therefore I am not very skilled with them, so excuse me if I ask > dumb question. > I have extended base_site.html to add

Re: Error: App with label world could not be found. Are you sure your INSTALLED_APPS setting is correct?

2013-03-11 Thread Tom Evans
On Mon, Mar 11, 2013 at 11:35 AM, jesmine chaudhuri wrote: > Error: App with label polls could not be found. Are you sure your > INSTALLED_APPS setting is correct? in django 1.3 project and mysql. > > I am new in Django and Python. Please anyone help me. > > Thanks

Re: Question modelformset_factory with initial values

2013-03-08 Thread Tom Evans
On Fri, Mar 8, 2013 at 4:42 AM, carlos wrote: > > Hi > is posible fill forms with initial values for example > > -- models.py - > class Model1(models.Model): > field1 = models.CharField() > field2 =models.CharField() > > CHOICE_ONE = ( > (1,'one'),

Re: How do i set div dynamically in template?

2013-03-08 Thread Tom Evans
On Fri, Mar 8, 2013 at 2:34 PM, frocco wrote: > Hello > > I need to have a div set the on the first pass and then changed on the > second pass > > for row in data >first row > > > >second row > endfor > > in PHP I could just assign a variable to the div and

Re: p.choice_set.all() error

2013-03-08 Thread Tom Evans
On Fri, Mar 8, 2013 at 3:39 AM, Hugo Guzman wrote: > Hey there. I'm working through Part I of the "Writing your first Django app" > tutorial and everything was going smoothly until I tried executing the > following command: > p.choice_set.all() > > When I try running

Re: How to order queries by exact match first

2013-03-06 Thread Tom Evans
On Wed, Mar 6, 2013 at 11:58 AM, Alexander Todorov wrote: > Hi guys, > I have this type of query: > > .filter(name__icontains='celery') > > and will possibly replace it with > > .filter(Q(name='celery') | Q(name__icontains='celery')) > > > I want to get the results

Re: Extending the base file depending on User type

2013-03-06 Thread Tom Evans
On Tue, Mar 5, 2013 at 9:06 PM, Sandeep kaur wrote: > I want to extend the base template file into the child file depending > on the condition, like if the user is superuser or staff or active > user, the file to extended should ll be different. > For Eg : > > {% if

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-06 Thread Tom Evans
On Tue, Mar 5, 2013 at 6:48 PM, <7equivale...@gmail.com> wrote: > Alright guys, thanks for the input, I need something a bit more specific to > my case due to my ignorance on the subject at hand, so I am posting the code > for my View, Template, and JQuery. So, basically I want to take the

Re: Impossible? Django with NTLM SSO auth on windows?

2013-03-06 Thread Tom Evans
On Tue, Mar 5, 2013 at 9:45 PM, Anton wrote: > Hmmm > > the bad support (as you mention "it hasn't been updated in quite some time") > seems to be a major problem in this domain. The NTLM/SSPI protocols haven't changed in a long time. Why should the projects that support this

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-05 Thread Tom Evans
On Tue, Mar 5, 2013 at 4:57 PM, <7equivale...@gmail.com> wrote: > Well, I definitly can't just throw a variable into the Javascript using the > {{ }} tags. I tried it and it didn't work. I'm sure Shawn Milochik is > correct about consuming the view with AJAX, however that is going to take >

Re: how to add prefix in generic_inlineformset_factory?

2013-03-05 Thread Tom Evans
On Tue, Mar 5, 2013 at 11:40 AM, Witold Greń wrote: > I need to create two formset (generic_inlineformset_factory). When i create > formset in template used formset_create_company and formset_create_private, > field names are the same. > > c['form_create_company'] =

Re: how to add prefix in generic_inlineformset_factory?

2013-03-05 Thread Tom Evans
On Tue, Mar 5, 2013 at 9:20 AM, Witold Greń wrote: > How to add prefix in generic_inlineformset_factory()? This is posible? > I don't understand precisely what you mean, but two of the arguments to generic_inlineformset_factory() are 'form' and 'formset', allowing you to

Re: empty static_url

2013-03-04 Thread Tom Evans
On Sat, Mar 2, 2013 at 4:47 PM, Phil wrote: > Hi, > > I'm using django1.4.3 > > I have a django project with 3 apps. All 3 apps templates extend 'app.html'. > On 2 of my projects the CSS loads fine, but on third one the CSS doesn't get > loaded because it's not adding

Re: Getting only the models related to my queryset.

2013-03-04 Thread Tom Evans
On Fri, Mar 1, 2013 at 7:11 PM, Gabriel Koscky wrote: > Hi, I've been having some trouble with filtering the related models of a > queryset, > and I'm not sure if I'm approaching this wrong or if Django can't actually > do it. > > Basically I have some models with ManyToMany

Re: Daemonize django server

2013-03-01 Thread Tom Evans
On Thu, Feb 28, 2013 at 6:23 PM, Tim Johnson wrote: > I'm having a hell of a time getting fastcgi to work on my mac, so > for the time being I'll just stick with using the django server. > > Is it possible to daemonize the server? I would prefer that in some > cases. > > From

Re: os.system() is not working in django while working on server centos

2013-03-01 Thread Tom Evans
On Fri, Mar 1, 2013 at 11:29 AM, JAI PRAKASH SINGH wrote: > import sys,os > sys.stderr = open('/dev/null') > import paramiko > sys.stderr = sys.__stderr__ > > os.system("echo \'s3\' >> myfile.txt ") #debug first in ssh2 > def ssh2_connect(host, user, pswd, port=22):

Re: Announcement: django-quickview 0.3 - putting the nitro in rapid web development

2013-02-28 Thread Tom Evans
On Wed, Feb 27, 2013 at 7:39 PM, Thomas Weholt wrote: > pypi : https://pypi.python.org/pypi/django-quickview/ > Source at https://bitbucket.org/weholt/django-quickview > > Documentation and tutorial at >

Re: Use variable in my template?

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 2:40 PM, Maria wrote: > No I dont have a problem to find the images, i already used a variable to > insert images from the static folder. Its just that I cant use my "marke" > variable because it is in an external .py file and I would like to learn how

Re: Problem with two databases

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 1:45 PM, MoonWolf wrote: > I'm making simple application to manage equipment. I've > used django-ldapdb > (http://opensource.bolloretelecom.eu/projects/django-ldapdb/) for user > management (not for authentication, for which i'm using PAM). After

Re: default filtering model admin (crud) using user obj attribute

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 7:37 AM, Bino Oetomo wrote: > Dear All.. > > Currently I have custom authentication backend, > This backend return user-object with additional attributes > > START > Python 2.7.3 (default, Aug 1 2012, 05:16:07) > [GCC 4.6.3] on linux2 >

Re: Does Django support general reusable UI widgets?

2013-02-28 Thread Tom Evans
On Thu, Feb 28, 2013 at 10:46 AM, Dong Wang wrote: > It seems "django.forms.widgets" is designed to support only reusable input > widgets used in forms, does Django support general reusable UI widgets like > tornado.web.UIModule ? > Yes, Django allows you to define custom

Re: how to evaluate "cities/countries of the world" static table for an application.

2013-02-25 Thread Tom Evans
On Mon, Feb 25, 2013 at 12:47 PM, Johan ter Beest wrote: > > On Feb 25, 2013, at 8:05 AM, Fatih Tiryakioglu wrote: > > Hello all, > > Is there any shortcut for evaluating such a database table, or should I > collect myself all this information. Please help.

Re: how to create attribute for image in django models.py

2013-02-20 Thread Tom Evans
On Wed, Feb 20, 2013 at 12:36 PM, Avnesh Shakya wrote: > thanks alot plz share any small project for beginners, if u have > If you haven't done the tutorial, you should do that first. https://docs.djangoproject.com/en/1.4/intro/tutorial01/ Then you can extend the

Re: how to create attribute for image in django models.py

2013-02-20 Thread Tom Evans
On Wed, Feb 20, 2013 at 12:26 PM, Avnesh Shakya wrote: > plz help me... i want to store image in database using model,how is it > possible...? > https://docs.djangoproject.com/en/1.4/ref/models/fields/#imagefield Cheers Tom -- You received this message because you

Re: form media (css+js)

2013-02-20 Thread Tom Evans
On Tue, Feb 19, 2013 at 9:07 PM, yakoub abaya wrote: > i read this page : https://docs.djangoproject.com/en/1.4/topics/forms/media > but i don't understand how those files gets rendered into the page template > is it our responsibility when creating template files to make

Re: Call Class based view from another class based view

2013-02-19 Thread Tom Evans
On Tue, Feb 19, 2013 at 12:14 PM, psychok7 wrote: > What do you mean not returnig?? i have a return statement. how should i do > it? > You have this code: if u.username == username: if request.GET.get('action') == 'delete': #some logic here and then:

Re: Call Class based view from another class based view

2013-02-19 Thread Tom Evans
On Tue, Feb 19, 2013 at 11:34 AM, psychok7 wrote: > hi, i am trying to call a class based view and i am able to do it, but for > some reason i am not getting the context of the new class > > class ShowAppsView(LoginRequiredMixin, CurrentUserIdMixin, TemplateView): >

Re: Migrating existing auth.User users to Django 1.5 Custom User table

2013-02-18 Thread Tom Evans
On Mon, Feb 18, 2013 at 4:33 PM, Ben Roberts wrote: > I assume, when Django 1.5 hits the public in 2014 >;) that many will want to > take advantage of some facet of the new pluggable User models. You may, > like me, want to add an additional column (field) or two in your

Re: Custom Http404 like exception

2013-02-18 Thread Tom Evans
On Mon, Feb 18, 2013 at 2:41 PM, Serge G. Spaolonzi wrote: > Thanks Pankaj, In this case I could not use an HttpResponse because the > helper method I am developing doesn't return a respose it returns a dict or > raises an exception if the user is not authenticated. > For

Re: Designing the email processing system. What path should I follow?

2013-02-15 Thread Tom Evans
On Fri, Feb 15, 2013 at 12:57 PM, Andre Lopes wrote: > Hi all, > > I'm building a Django website. Currently I'm searching for the best > way to design the email processing system. > > The website is a Ads site. I need to send emails in a regular basis to > the users. I'm

Re: Using template fragment caching *inside* a sitewide cache: possible?

2013-02-14 Thread Tom Evans
On Mon, Feb 11, 2013 at 1:42 PM, Matt Andrews wrote: > Hi all, > > I've been experimenting with an expensive query I need to call (essentially > grabbing data from some Google APIs). I tried this experiment: > > A sitewide cache with a long (days) expiry time > A template

Re: Is there an easy way to popup forms?

2013-02-13 Thread Tom Evans
On Wed, Feb 13, 2013 at 4:12 PM, frocco wrote: > I have a form I want to popup and am having trouble getting this to work. > This is not in the admin page. > > Can someone give me an example? > > Thanks > An easy way to do a pop up form is to use a jqueryui dialog¹

Re: Replacing a model instance's __dict__

2013-02-11 Thread Tom Evans
t shouldn't be saved. You can also then uses > setattr(self, key, value) instead of accessing self.__dict__, leaving you > the flexibility for some of these attributes to be properties, if that turns > out to be useful. > > Bill > > On Fri, Feb 8, 2013 at 12:50 PM, Tom Evans <

Replacing a model instance's __dict__

2013-02-08 Thread Tom Evans
Hi all I have a curious problem with a complex data replication issue. Basically, we use SalesForce as a CRM system. We also have a bunch of users who aren't allowed a SF license due to cost reasons, and they interact with SF via our own Django website that communicates to SF via an API. With

Re: Any good books for learning django?

2013-02-08 Thread Tom Evans
On Fri, Feb 8, 2013 at 10:13 AM, vijay shanker wrote: > do u have the pdf ? > will u share it at some place (or please mail it to me deont...@gmail.com) Please don't use this list to arrange or ask others to pirate books. The author of any django book almost certainly is a

Re: How to create a Django Group in case of multiple databases.

2013-02-07 Thread Tom Evans
On Thu, Feb 7, 2013 at 12:16 PM, laxglx wrote: > > Hello Everybody, > > I'm going to create a Group using Django Group. > > I have two databases one is "master" and another is "slave" > In master I created a user and group as usual. > > And in slave database I tried like this:

Re: Any good books for learning django?

2013-02-07 Thread Tom Evans
On Thu, Feb 7, 2013 at 5:49 PM, frocco wrote: > Hello, > Most of what I find are dated, 2008,2009. > Are these still good for learning django 1.4? > > Which books do you recommend? > > Thanks An often overlooked resource is the django documentation itself. The index page is

Re: post_save signal getting called twice !

2013-02-07 Thread Tom Evans
On Thu, Feb 7, 2013 at 1:54 PM, vijay shanker wrote: > Hi > I am using django version 1.4.3 > I am using two signals in my models.py > one is m2m_changed, so i can have a counter field (numcounter) of number of > m2m fields attached, and another is post_save so i can decide

Re: initial argument in forms not working for me

2013-02-01 Thread Tom Evans
On Mon, Jan 28, 2013 at 5:35 AM, Nikhil Verma wrote: > Hi > > I am using django 1.4.3 and have a field in form > > > PROFILE_TYPE = ( > ('public', 'Public'), > ('private', 'Private'), > ) > profile_type = forms.CharField(max_length=10,

Re: Special SELECT and UPDATE for a field

2013-01-31 Thread Tom Evans
On Wed, Jan 30, 2013 at 8:14 PM, Yarden Sachs wrote: > Hello, > i want to create a field class for geometry (not using geodjango). > here's the field code: http://pastebin.com/yADpZykJ > > i want 2 things i can't seem to do: > 1. I want the select to wrap the column with MySql

Re: Kindly help for an interview with Google on python django

2013-01-31 Thread Tom Evans
On Thu, Jan 31, 2013 at 5:25 PM, Larry Martell wrote: > Books have been written about interviewing at google. Google > 'interviewing at google' and you'll find a plethora of stories. After > reading them you may not want to interview there. I was offered a > chance to

Re: Can I set a "global" variable after user login, to use in my view?

2013-01-31 Thread Tom Evans
On Tue, Jan 22, 2013 at 8:01 PM, Fellipe Henrique wrote: > The problem is, I need to pass this request.user to one form, using a > inlineformset_factory..in these code: > > class PedidoItensForm(ModelForm): > class Meta: > model = ItensPedido > > def

Re: an elusive ValueError: 'str' object not callable -- lost.

2013-01-31 Thread Tom Evans
On Wed, Jan 30, 2013 at 6:59 PM, Maurice Asimov wrote: > Hey guys. > > I recently started getting a ValueError complaining that an str is not > callable -- in a very wierd place. > > This happens to some calls to messages.info(request, 'somethingsomething'), > in one of

Re: Getting a no such column error when adding data and syncdb is not syncing

2013-01-18 Thread Tom Evans
On Fri, Jan 18, 2013 at 3:38 PM, Nick wrote: > This is my first django project outside of the tutorials and it's > frustrating to stumble over something so simple. > > I'm getting this error when I try to add a product: >> >> DatabaseError at /admin/products/product/add/ >>

Re: static files, runserver debug=True

2013-01-17 Thread Tom Evans
On Wed, Jan 16, 2013 at 11:31 PM, Fred Kingham wrote: > perfect thanks Javier. > > I guess my question should have been phrased, if debug = False, does the > runserver serve static files from the STATIC_ROOT. Clearly that's no. > > Thanks again. > > Fred Even with

Re: difficulty with static files

2013-01-16 Thread Tom Evans
On Wed, Jan 16, 2013 at 10:38 AM, Fred Kingham wrote: > not sure if this is the right place to post this, but doesn't this - > > https://docs.djangoproject.com/en/dev/howto/static-files/#serving-static-files-in-development > > "If using runserver for local development (and

Re: Field pre-load hook?

2013-01-14 Thread Tom Evans
On Sun, Jan 13, 2013 at 8:00 PM, Matt Barry wrote: > Hi, > > I'm creating a model from an external database that has some encrypted > columns. Initially I was thinking of creating a custom field type: > > class EncryptedField(models.Field): > def db_type(self,

Re: "Principle of least privilege" in accessing a DB from an app

2013-01-14 Thread Tom Evans
On Sun, Jan 13, 2013 at 5:05 PM, Isaac Perez wrote: > Hi guys, > > I'm creating a new app and I'd like to know how would be the best way to > implement the principle of least privilege. > At the moment the DB has 5 users: > > 1 is the root user for the DB (which I

Re: DateTimeField received a naive datetime (2013-01-10 00:00:00) while time zone support is active.

2013-01-11 Thread Tom Evans
On Fri, Jan 11, 2013 at 8:23 AM, Jeff Hsu wrote: > Hi all, > >I kept getting DateTimeField received a naive datetime (2013-01-10 > 00:00:00) while time zone support is active. but I can't figure out where > it's receiving a naive datetime. I have USE_TZ set to True

Re: Execution time of a long process results in an Internal Server Error 500

2013-01-10 Thread Tom Evans
On Thu, Jan 10, 2013 at 1:21 PM, Mauro Sánchez wrote: > Hello, I have a process that takes about 2 or 3 minutes to execute. The > problem is that sometimes (not always) it results in an Internal Server > Error 500 because of the time it takes. > Is there a way to configure

Re: How to get self.id when saving a new object?

2013-01-09 Thread Tom Evans
On Wed, Jan 9, 2013 at 12:55 PM, Andre Lopes wrote: > Hi, > > I'm without a clue on how to get the sef.id when creating a new object > in Django. I've created a question in StackOverflow. Can someone give > me a clue on this subject? > > Please read the question: >

Re: virtualenv setup

2013-01-09 Thread Tom Evans
On Sat, Dec 29, 2012 at 10:01 PM, Phil wrote: > Is it because at the top of my "manage.py" it is pointing to my system wide > python(#!/usr/bin/env python) instead of my virtualenv one? If so how do I > fix this? I tried changing the path at the top of the manage.py file but >

Re: Django admin save error: get_db_prep_value() got an unexpected keyword argument 'connection'

2013-01-04 Thread Tom Evans
On Thu, Jan 3, 2013 at 1:51 PM, Glyn Jackson wrote: > I really struggling with my understanding of the following issue and how to > resolve > > > > > > When I try and save (using the Django standard admin interface) I get the >

Re: getting "DateTimeField received a naive datetime" error but have no DateTimeFields

2012-12-17 Thread Tom Evans
On Fri, Dec 14, 2012 at 5:46 PM, bobhaugen wrote: > RuntimeWarning: DateTimeField received a naive datetime (2012-12-14 > 17:39:38.878379) while time zone support is active. > > This is happening in my tests, but not in normal code. > > From dropping a trace in, it looks

Re: Project path

2012-12-13 Thread Tom Evans
On Wed, Dec 12, 2012 at 9:32 PM, Chris Cogdon wrote: > The BIG advantage here is that you're not checking anything into the SCM > that must remain secret, or must change (or very likely to change) between > installations, but all other settings are source controlled. The big

Re: IntegerField and SmallIntegerFields maps to the same db type on Oracle.

2012-12-13 Thread Tom Evans
On Thu, Dec 13, 2012 at 4:50 PM, Michał Nowotka wrote: > I agree, but if you map SmallIntegerField to say NUMBER(9) you will save > some space, correct? > Oracle may use the exact same datatype underneath for all NUMBER (speculation). The value in brackets could simply be the

Re: Weird problem in common_settings include

2012-12-13 Thread Tom Evans
On Thu, Dec 13, 2012 at 8:24 AM, florian wrote: > Hi, > > for my project, i hav a mobile_manage.py and a manage.py. Each has its > specific settings, but has also lots of sommon settings. Er, why have two versions of manage.py? One of the arguments manage.py takes is

Re: Implementing a monitoring system with django.

2012-12-12 Thread Tom Evans
On Mon, Dec 10, 2012 at 7:41 PM, Marc Aymerich wrote: > Hi, > I'm considering to implement a simple monitorization system that > basically gathers some data from a set of nodes (<1000 nodes). The > gathered data should be stored in order to let users perform some > queries

Re: Django Celery FIFO ORDER

2012-12-11 Thread Tom Evans
On Tue, Dec 11, 2012 at 12:32 PM, psychok7 wrote: > i need to get my queue back from the worker when i need to add a new task to > the queue (if it isn't yet executed) in order to keep a FIFO order, i read > somewhere that i cant do that and that its not a good idea. > > do you

Re: Loading XSD file into memory ONCE

2012-12-10 Thread Tom Evans
On Sun, Dec 9, 2012 at 8:05 AM, Dwayne Ghant wrote: > Hello All, > > I will be short and sweet. I have a simple (well at least I think it's > simple) question. First let me explain, I'm writing a RESTful webservice > that uses validates xml submissions using an xsd (440kb

Re: Set Permissions in User model from views

2012-12-06 Thread Tom Evans
On Thu, Dec 6, 2012 at 8:10 AM, Nikhil Verma wrote: > Hi All > > I am developing a simple app in which i have to play with user permissions.I > register a user(during a sign up process) with this method :- > > def register_user(data): > """ > This method is used

Re: django + fastcgi + lighttpd outlog and errlog not working

2012-12-05 Thread Tom Evans
On Wed, Dec 5, 2012 at 6:44 AM, Gontran Magnat wrote: > So you mean there is no way to get this kind of log with fastcgi mode: > There is always a way, it just doesn't do it by default. If you require this output even in fastcgi mode than you can create a trivial

Re: Thumbnail resizing issue, strange behavior

2012-11-30 Thread Tom Evans
On Fri, Nov 30, 2012 at 6:45 PM, Mo J. Al-Mughrabi wrote: > Hi, > > I've been trying to resolve this issue for a day without luck, its > very strange error, i tried to post it on stackoverflow but still no > luck. > > >

Re: Drop foreign key, add another - keep data

2012-11-30 Thread Tom Evans
On Fri, Nov 30, 2012 at 11:56 AM, Peter Edström wrote: > Hello, > > I'd like to drop a ForeignKey-field and add another using south (mysql > database), but it won't work. Googling it takes me not far, but it seems to > be a problem with dropping foreign key constraints with

Re: difficulty with static files

2012-11-29 Thread Tom Evans
On Thu, Nov 29, 2012 at 6:00 PM, Sammy wrote: > Hello django experts > I am unable to get my static files to work. Here are my settings: > > projectfiles > | > |-myproject > | | > | |-static > | | | > | | |-css > | | |-js >

Re: how to use named urls from apps

2012-11-29 Thread Tom Evans
On Thu, Nov 29, 2012 at 2:32 PM, Mike wrote: > I'm trying to use the url template tag to call the login view from > contrib.auth. I've tried the following but none work: > > {% url login %} > {% url auth:login %} > {% url auth.login %} > {% url contrib.auth.login %} > > Can

Re: Error: No module named books

2012-11-29 Thread Tom Evans
On Thu, Nov 29, 2012 at 4:51 AM, Chris Recher wrote: > Hi all, > > I'm working through the Django book and I've run into an error that wasn't > predicted. I've got a project called mysite. I used "python manage.py > startapp books" to create an app called books

Re: 504 Gateway Timeout

2012-11-29 Thread Tom Evans
On Thu, Nov 29, 2012 at 1:01 PM, Jirka Vejrazka wrote: >> I'm just facing a problem with little longer runnig SQL select command, >> and DJago framework returns a "504 Gateway Timeout" after aprox 10 seconds. >> My sql command is executed on Oracle SQL database through

Re: 504 Gateway Timeout

2012-11-29 Thread Tom Evans
On Thu, Nov 29, 2012 at 11:58 AM, bikeridercz wrote: > Dear all, > > I'm just facing a problem with little longer runnig SQL select command, and > DJago framework returns a "504 Gateway Timeout" after aprox 10 seconds. My > sql command is executed on Oracle SQL database through >

Re: Where to put PDF files + how to authenticate the urls requesting them

2012-11-29 Thread Tom Evans
On Thu, Nov 29, 2012 at 11:30 AM, Loai Ghoraba wrote: > I am still new to sreving stuff (in fact I know barely anything about it :)) > Then you instruct to have something like this > > url(r'^media/(?P.*)$', 'myview,func', { > 'document_root': MEDIA_ROOT, >

Re: Where to put PDF files + how to authenticate the urls requesting them

2012-11-29 Thread Tom Evans
On Wed, Nov 28, 2012 at 6:27 PM, Loai Ghoraba wrote: > Thanks for the reply, but I am still new to the web technology world, so I > would like to fully use Django now before , moving to another ways to host > my files. > Actually I am totally new to serving stuff, so if there

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