Problem with ModelForm

2009-11-22 Thread jorge
hi i have a problem when i try to render my form without information . so my code is : models.py class Obra(models.Model): cod_obra= models.CharField("código da obra",max_length=15,primary_key=True) nome_da_empreitada= models.CharField(max_length=100) data_de_incio =

Import csv file in admin

2010-10-27 Thread Jorge
I'm trying to poblate a database with a csv file using the modelform in Admin site. Here's the files: Models.py: class Data(models.Model): place = models.ForeignKey(Places) time = models.DateTimeField(blank=True) data_1 = models.DecimalField(max_digits=3, decimal_places=1,

Re: Import csv file in admin

2010-10-27 Thread Jorge
On Oct 27, 1:58 pm, Jirka Vejrazka wrote: > If you don't mind me asking, why do use ModelForm and not the ORM > directly? I'm just curious as using just a model (possibly wirh model > validation) seems like easies approach. > >   Cheers > >     Jirka Hi Jirka! The idea behind the modelform is

Re: Import csv file in admin

2010-10-27 Thread Jorge
On Oct 27, 7:43 pm, Jorge wrote: > > On 27/10/2010, Daniel Roseman wrote: > > > > You're setting the values on `self` in the form's save method. In > > > other words, you're setting them on the *form*, not the instance. You > > > should be s

Re: Import csv file in admin

2010-10-28 Thread Jorge
> > Hang on, what you're doing here is repeatedly setting the data values > for each line to the *same* form_input model. Presumably what you > actually want to do is to create new Data instances for each line in > the CSV, with the place set to the value of the form. > > In this case, I'd recommen

Re: Import csv file in admin

2010-10-29 Thread Jorge
Jirka I need an easy method inside the admin to upload the csv file with an web interface. I guess with your method the admin will need access to the server and the command line, and something like this is not what i try to do, because the admin (not me) is not a django developer, not even a user

Re: Import csv file in admin

2010-10-30 Thread Jorge
. > > Instead, you should create a standard form with a single FileField to > upload the CSV file, save it temporarily or just keep it as a file > object and then process it as Jirka pointed out. > > Regards, > Felix > > On 29.10.2010 18:31, Jorge wrote: > > > Jir

Re: Import csv file in admin

2010-11-02 Thread Jorge
replace the modelform created by the admin for the > > "Data" model with a standard form as the Django docs says, i created a > > view to replace the "add" view generated by the admin and put a > > standard form: > > Jorge, > >   I think you need to g

Serialize in django witha query set that contains defer

2011-01-04 Thread jorge
Hi, i have i little problem, and that is how can serialize a django query with defer ? I have this model : class Evento(models.Model): nome=models.CharField(max_length=100) descricao=models.CharField(max_length=200,null=True) data_inicio= models.DateTimeField()

Re: Serialize in django witha query set that contains defer

2011-01-05 Thread jorge
i have propose one solution here : http://stackoverflow.com/questions/4593139/serialize-in-django-witha-query-set-that-contains-defer On Jan 4, 12:21 pm, jorge wrote: > Hi, i have i little problem, and that is how can serialize a django > query with defer ? > I have this model : >

Re: populating forms using models

2008-11-01 Thread Jorge Bastida
To populate select field you have many options. First is using ModelChoiceField. The ModelChoiceField have an argument named queryset, you can use like this example provincia = forms.ModelChoiceField(queryset=Provincia.objects.all() ..) If you can't have a FK of Provincia table you can use a C

Django Model key limits

2008-11-01 Thread Jorge Bastida
Hello !I'm working in a project using django an postgresql and probably i will manage a big model table. I have a few questions about the limits of the primary key in django model. By default the pk was defined in postgresql as a SERIAL NOT NULL with the integer data type. I search for the limits

Re: two forms in the same view

2008-12-18 Thread Jorge Bastida
Or use prefix theform(request.POST,prefix='form1Prefix') theform2(request.POST,prefix='form2Prefix') 2008/12/18 Stefan Tunsch > > You simply have to avoid using the same field name in the two forms. > > On 12/18/08, Alfredo Alessandrini wrote: > > > > Hi, > > > > can I use two form in the same

Re: prepopulate_from

2008-08-18 Thread Jorge Vargas
On Mon, Aug 11, 2008 at 1:26 AM, Donn <[EMAIL PROTECTED]> wrote: > > On Monday, 11 August 2008 08:56:13 Oleg Oltar wrote: >> I want to use text stored in field title to generate slugs. > In the svn (> 0.96) you have to use ModelAdmin like this: > > clas Toon(models.Model): > title = models.CharFi

Re: prepopulate_from

2008-08-19 Thread Jorge Vargas
On Tue, Aug 19, 2008 at 12:33 AM, Daniel Roseman <[EMAIL PROTECTED]> wrote: > > On Aug 19, 6:18 am, "Jorge Vargas" <[EMAIL PROTECTED]> wrote: >> On Mon, Aug 11, 2008 at 1:26 AM, Donn <[EMAIL PROTECTED]> wrote: >> >> > On Monday, 11 August 2

Re: wsgi in django for hgwebproxy

2008-08-22 Thread Jorge Vargas
On Thu, Aug 21, 2008 at 12:54 PM, Faheem Mitha <[EMAIL PROTECTED]> wrote: > > Hello everyone, > > The version control system mercurial (hg) has some functionality to allow > its repositories to be viewed via the web. However, it does not have a > builtin authentication system. > There is another a

Re: Announcing pytagram

2008-08-22 Thread Jorge Vargas
That seems nice, but have you check out sphinx's module index? http://sphinx.pocoo.org/modindex.html it's really a web thing but it can be printed. On Thu, Aug 21, 2008 at 9:00 AM, Giuliani Vito Ivan <[EMAIL PROTECTED]> wrote: > > Hi, > I recently started a little project named pytagram (http://

Re: ANN: django-morsels

2008-08-22 Thread Jorge Vargas
thanks seems interesting. On Thu, Aug 21, 2008 at 3:19 AM, Itai Tavor <[EMAIL PROTECTED]> wrote: > > At first glance (and, quite possibly, second and third) django-morsels > might look like a clone of django-chunks > (http://code.google.com/p/django-chunks/ > ). Both apps attempt to solve the sa

Re: Django questions

2008-09-10 Thread Jorge Bastida
You are in thre wrong list. This is the django-users list , no the django-no-users list. 2008/9/10 Krommenaas <[EMAIL PROTECTED]> > > Thx for the replies. > > This is still unclear though: > > > 4) I read somewhere in the documentation that you can use other > > > templating systems than Django's

Set booleanfield to True on shell?

2008-09-24 Thread Jorge Romo
Hello guys, maybe this is a kinda dumb question but i just can't figure it out! I have set to False as default for a is_finished field. If something is finished it should turn to True, but i just can't make it happen. Any idea? I tried with .objects.update but it updated all my model objects hah

Re: Set booleanfield to True on shell?

2008-09-24 Thread Jorge Romo
Woah it was so obvious! Thanks a lot Daniel! On Sep 24, 2:23 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 24, 8:00 pm, Jorge Romo <[EMAIL PROTECTED]> wrote: > > > Hello guys, maybe this is a kinda dumb question but i just can't > > figure it out! &

Error while rendering comments

2008-10-08 Thread Jorge Romo
Hello, I have this issue: Caught an exception while rendering: Reverse for '' with arguments '()' and keyword arguments '{}' not found. The second line is what is causing me trouble: 1 {% load comments %} 2 3 {% for field in form %} 4 {% if field.is_hidden %} 5 {{

geodjango: installation comments.

2008-10-18 Thread Jorge Vargas
Hello, first of all I'll like to thank everyone that worked on this, it's really cool and a lot of knowledge has been put into one place for easy consumption. I did found some inconsistencies on the docs I'll like to point out: 1- the different installation docs use a methodology with little chan

variables in forms.py?

2008-10-19 Thread Jorge Romo
Hell guys, I have this little doubt: I want to validate a form, but it has several different options. It has to take a value_a and the see if it is bigger, smaller or equal to another value_b. The issue (or maybe not :p) is that the value_b is entered by the user, so it is always different, it wo

Prepopulate form from URL?

2009-03-18 Thread Jorge Romo
Hello! I was trying to see if there's a way (I'm pretty sure there is a way) to prepopulate a form field from an url. For example: /foo?=bar and that in my form field "bar" is displayed. I have to work with java? there is another way? --~--~-~--~~~---~--~~ You rece

Re: Prepopulate form from URL?

2009-03-18 Thread Jorge Romo
Thank you so much to both of you! I was looking at the wrong documentation lol kudos! --~--~-~--~~~---~--~~ 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@googlegrou

Re: Ajax in Django

2009-08-12 Thread Jorge Bastida
I' currently working in/with Dajax. http://code.google.com/p/dajaxproject/ I hope it helps you. -- neo2001[at]gmail.com jorge[at]thecodefarm.com neo[at]art-xtreme.com --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: GeoDjango, Convert List of Polygon Objects to a Single Polygon Object

2009-08-20 Thread Jorge Bastida
think I need to use the buffer feature, > but am not sure how to. Is there a way to use a buffer feature or do > I need to code this out in Python. > > Gregory Roby > > > > > > > > -- neo2001[at]gmail.com jorge[at]thecodefarm.com neo[at]art-xtreme.com -

Re: ManyToMany relationship being 'lost'?

2009-04-27 Thread Jorge Bastida
es because it can be blank and null. The solution? Include "friend" in the exclude list of the model Form. You are using the default Admin, i was using own forms / templates, but i suppose internally, django generate forms with modelForms-like classes. Hope this help you. -- neo2001

Fwd: Autorload urls Django

2009-05-05 Thread Jorge Baron
sorry for this last message.I solucionate it.I have no noticed about that failed until now jeje.Thanks -- Forwarded message -- From: kingbaron Date: 2009/5/5 Subject: Autorload urls Django To: Django users Hello, i have the next problem with django. It automatically when pass

Re: Form trouble

2009-05-17 Thread Jorge Bastida
2009/5/17 zayatzz > > Thanks > > I actually tried that form.cleaned_data at one point but then i got > error that was something like: form object has no cleaned_data > attribute. Call if form.isvalid(): # use cleaned_data Jorge > > > Anyway, its working

Re: Form trouble

2009-05-17 Thread Jorge Bastida
> > > Call > if form.*is_valid()*: Sorry > > # use cleaned_data > > Jorge > > >> >> -- neo2001[at]gmail.com jorge[at]thecodefarm.com neo[at]art-xtreme.com --~--~-~--~~~---~--~~ You received this message becau

Re: Django with ajax

2009-06-02 Thread Jorge Bastida
6/2 Aldo > > Hey, > > I have some ajax running on my pages. > > I want to have it pass back some objects. However, I am unsure if I > can pass a list of objects back. So far I have only ever passed back > raw xml or text. Can objects be passed and then iterated via the html &g

import model from another project-app

2009-10-08 Thread Jorge Ercoli
If i have, my Proj1 with mi App1 and your Model, and in the Views.py i should import a model from an App of another Project : this command cause an error, i'm tried to put "Proj2.App1" in Proj1 settings.py Installed-Apps; but not work. Any ideas or examples?, thanks in advance. --~--~---

Re: import model from another project-app

2009-10-08 Thread Jorge Ercoli
Ok Karen , cleaning my post: I have this two projects with 1 application each other: ProjectA with AppA (with your model) and ProjectB with AppB (with your model). In the views.py of AppA , i should import the model from AppB: from ProjectB.AppB.models import * (** without brackets, i

Re: using ajax with django

2009-10-19 Thread Jorge Bastida
pecial library to use ajax in django, but if you need an "easy-way" try http://dajaxproject.com/ it may help you. Greetings -- jorge[at]thecodefarm.com neo2001[at]gmail.com neo[at]art-xtreme.com --~--~-~--~~~---~--~~ You received this message because you

Re: Prevent brute-force password attacks?

2009-11-09 Thread Jorge Bastida
mes, etc. > > Adam > > > > > -- Benito Jorge Bastida jo...@thecodefarm.com thecodefarm SL Av. Gasteiz 21, 1º Derecha 01008 Vitoria-Gasteiz http://thecodefarm.com Tel: (+34) 945 06 55 09 --~--~-~--~~~---~--~~ You received this message because you are subscri

Django podcasting software?

2010-08-08 Thread Jorge Vargas
Hello, A couple of friends want to start a podcast and have come to me for the technical side. And I will like it to be python, because I don't want to go with podpress for that site. I will like to know if anyone has any good/bad experiences with http://github.com/jefftriplett/django-podcast ?

How long is a model validation heavy testsuite supposed to run?

2010-10-12 Thread Jorge Vargas
Hello, I recently inherited a project that uses a lot of model validations and is mainly just a model (we have two django apps that use it as their backend). The test suite currently returns Ran 460 tests in 980.347s That is running on a SQLite db. Is this normal/expected behavior ? is there a

Re: Google maps routes in geodjango

2010-01-25 Thread Jorge Bastida
roup, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Benito Jorge Bastida jo...@thecodefarm.com thecodefarm SL Av. Gasteiz 21, 1º Derecha 01008 Vitoria-Gasteiz http://thecodefarm.com Tel:

Re: Problem with Django webserver on HP

2010-01-28 Thread Jorge Bastida
eceived this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options,

Re: Problem with Django webserver on HP

2010-01-28 Thread Jorge Bastida
ver/yours ip. http://server-ip:8000/ -- Benito Jorge Bastida jo...@thecodefarm.com thecodefarm SL Av. Gasteiz 21, 1º Derecha 01008 Vitoria-Gasteiz http://thecodefarm.com Tel: (+34) 945 06 55 09 -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Dajaxice and geodjango problem

2010-02-03 Thread Jorge Bastida
this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Benito Jorge Bastida jo.

Re: Dajaxice and geodjango problem

2010-02-03 Thread Jorge Bastida
What version of dajaxice are you using? The server console hasn't got any output? Try to print out the logging info: import logging logging.basicConfig(level=logging.DEBUG) 2010/2/3 Alexis Selves > Hello DAJAXICE_DEBUG = True > in my settings.py is set already.. > > On 3

Re: kss with django

2010-02-04 Thread Jorge Bastida
instructions. > > Best regards > Ogi > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send emai

Re: how to start with django

2010-03-08 Thread Jorge Silva
...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Com os melhores cumprimentos / Best regards, Jorge Rodrigues Silva -- You received this message because you are subscribed to the Google Groups "Djan

Re: Erro ao tentar importar DjangoGateway

2010-03-08 Thread Jorge Silva
"Django users" group. > To post to this group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=

Re: ANN: Django-fr.org is out!

2007-06-25 Thread Jorge Gajon
On 6/22/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > Dice que estas en #django-es en freenode o un otra network? Estoy en > #django-es ahora. > > (Como se dice "network"?) > Se dice "red" Saludos! --~--~-~--~~~---~--~~ You received this message because you ar

Re: Passing form initial values from one view to another?

2008-01-22 Thread Jorge Gajon
d get redirected to process_task, there should be a value in the 'newcontext' request parameter, and the form will render with that context selected. Also note that this line: return HttpResponseRedirect( request.META['HTTP_REFERER'] ) will cause you problems because after crea

Re: Passing form initial values from one view to another?

2008-01-24 Thread Jorge Gajon
public facing site and you would be interested in search engines indexing all your entries. Plus it makes it easier to tell someone over the phone how to get to a specific entry. In your case I'm guessing you are developing an application which requires a log-in before using it. Your application

Re: Best Practice for Ajax and Django. Please share your thoughts.

2008-01-29 Thread Jorge Sousa
o scroll a lot and search for a specific line /method inside a large file. In the end we have to IMPORT everything we need to use so we have the freedom to decide where to put them, theres no magic paths like other frameworks. And i like this! Just my thoughts Jorge On 1/30/08, Julien <[EMAIL

Re: Dumping objects in templates

2008-02-08 Thread Jorge Gajon
ve debugger can not be matched by any amount of "print" statements in your code (or debug() calls) -- that was the PHP way but Python is a different animal. Regards, - Jorge --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Newfroms - How to get the id for a field

2008-02-18 Thread Jorge Sousa
Hi, {{ fields }} is rendered by the as_widget() method of the BoundField class. Jorge On Feb 15, 2008 8:58 PM, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > > > > On Feb 14, 4:15 am, shabda <[EMAIL PROTECTED]> wrote: > > When using newforms, I want to get the id se

Shell reloading

2008-03-29 Thread Jorge Sousa
ve to import everything again. Thanks Jorge Sousa --~--~-~--~~~---~--~~ 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 t

Re: how do designers create content

2008-04-22 Thread Jorge Vargas
On Sun, Apr 20, 2008 at 2:33 AM, lee <[EMAIL PROTECTED]> wrote: > > I am new to django, but I think it is really cool. I have used other > web dev systems before like zope/plone and php. I am a little new to > the template type system of django and I was wondering how most web > designer creat

Re: Calling self.related_object.save() from self.save() ???

2008-04-22 Thread Jorge Vargas
On Tue, Apr 22, 2008 at 4:47 PM, Don Spaulding <[EMAIL PROTECTED]> wrote: > > I think I must have fallen through the cracks of "nobody will ever > want to do *this*" when building this app. Given the following two > models (simplified for clarity): > > class Order(models.Model): > total =

Re: How to get ':' in address?

2008-04-22 Thread Jorge Vargas
On Tue, Apr 22, 2008 at 12:01 PM, James Aylett <[EMAIL PROTECTED]> wrote: > > On Tue, Apr 22, 2008 at 05:36:35PM +0200, Thomas Guettler wrote: > > > AFAIK ':' is not allowed in a URL path. > > RFC 2396 section 3.3 ("Path Component") suggests otherwise. ":" is a > "reserved" character in the UR

Re: Announcing the Django Dash!

2008-04-23 Thread Jorge Vargas
I'm a bit concern about that. my main development team is composed of 3 people one back one designer and one that takes care the the first two not killing each other. looking at the ratings it seems that if we take one of our 3 people out then we'll lose many points. and chance to get 3? maybe by

Re: Calling self.related_object.save() from self.save() ???

2008-04-23 Thread Jorge Vargas
gives me the correct order.total > > > > > My guess is that even though I've saved the item before calling > > > order.save(), the order objects still doesn't know that the new item > > > is related to it. Anybody know if this is expected behavior? &

Re: mod_python vs. mod_wsgi

2008-05-06 Thread Jorge Vargas
On Tue, May 6, 2008 at 3:45 PM, Brot <[EMAIL PROTECTED]> wrote: > > Hello, > > today webfaction announced > (http://blog.webfaction.com/django-setup-improvements) that they have now a > one-click django/mod_wsgi > installer. > > What's your opinion with mod_wsgi? Is it better than mod_python

Re: mod_python vs. mod_wsgi

2008-05-06 Thread Jorge Vargas
On Tue, May 6, 2008 at 5:43 PM, Adam Fast <[EMAIL PROTECTED]> wrote: > > I'll check in the panel, but I get this when going to that URL (and > mentioned going to the main blog to find it, it's not there either): > > "Not Found > > The requested URL /django-setup-improvements was not found on t

Get just one object id at the time in view assignment issue.

2008-05-16 Thread Jorge Romo
Hello guys! I have another little (i'm sure it is) problem (i have like 3 days trying to resolve it by myself but i just gave up lol), i'm using django-tagging so I can tag some records, the problem here is that i don't know how to take one object, take its id and then keep the cycle. this is wha

Re: Get just one object id at the time in view assignment issue.

2008-05-16 Thread Jorge Romo
I feel I'm getting close to an answer... I hope you guys can help me out... I get this TypeError: Records() takes exactly 3 non-keyword arguments (2 given) def Records (request, UserName, Name): gamer = Artist.objects.get(UserName=UserName) record = Record.objects.get(Name=Name) tags

Adding database table to Selection Widget on newforms

2008-05-18 Thread Jorge Romo
Hello again guys! I'm using django-registration and i wanna use django-countries with it so i can ask my new user for its country. But i don't know how to call it... this is my django-registration country code: Country = forms.CharField(widget=forms.Select(attrs=attrs_dict, choices=()), labe

Re: Adding database table to Selection Widget on newforms

2008-05-19 Thread Jorge Romo
gt; > I hope this is correct and will help you. > > V > > [1]:http://www.djangoproject.com/documentation/newforms/#choicefield > > On May 19, 6:32 am, Jorge Romo <[EMAIL PROTECTED]> wrote: > > > Hello again guys! > > > I'm using django-registration an

Re: Serving Media through mod_proxy.

2007-02-27 Thread Jorge Gajon
Apache instance. Personally I've been using Lighttpd with FastCGI and it has been working great. In fact Lighttpd only redirect the traffic to the Django FastCGI instance, it doesn't have to load any python code itself so it is very light-weight and very good for serving media files.

Re: Interesting problem importing

2007-04-06 Thread Jorge Gajon
ant to do it yourself, then what you need to do is something like this (in your shell of course): ~$ export DJANGO_SETTINGS_MODULE=myproject.settings ~$ python The 'export' thing is how you define an environment variable. I'm assuming here that your are using a Linux machi

Re: Import, referencing modules across packages

2007-04-06 Thread Jorge Gajon
On 4/6/07, Trey <[EMAIL PROTECTED]> wrote: > > Alright, I would like to reuse one of the forms, say Form1 inside of > the views for app2. So inside of the function I try this: > > def viewfunction(request): > from app1.forms import Form1 > > which fails pretty badly, I have also tried this: > > d

Re: Interesting problem importing

2007-04-07 Thread Jorge Gajon
using "python manage.py shell", which means that you don't have to worry about setting the DJANGO_SETTINGS_MODULE environment variable; manage.py already did it for you. I apologize if I did things confusing before. Cheers, Jorge --~--~-~--~~~---~-

QUESTION .-

2007-04-24 Thread Jorge Dominguez
defined in settings.py of my site .- Is possible to do this and if this is affirmative how i can to do it ? Thanks in advance .- Best regards .- -- Jorge Dominguez --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Form data inside another Form

2007-12-21 Thread Jorge Sousa
'1' : { id: YY, }, '2': { id: ZZ , } }} and so on, so each row could be fed into a Detail0Form instances for validation The above code seem very clumsy to me, but it was the only way i was able to do it. Is there an easy way to write it down and use a List instead of

Re: Form data inside another Form

2007-12-28 Thread Jorge Sousa
framework!!! Thanks again for showing me the right "WAY" to do it. Maybe i'll write a mini guide about what i ended up. Its a "complex form" (to me) that maps to 4 tables. Happy new year to all. Jorge Sousa On Dec 22, 2007 4:44 AM, Malcolm Tredinnick <[EMAIL PROTECTED]&

Re: Generating a choices set from data

2006-10-30 Thread Jorge Gajon
irst element is the choice value (e.g. the id of the object) and the second element is the label that you want to display in the select field for that value (in this example we assume that obj has an appropriate __str__() method). Hope it helps. Regards, Jorge --~--~-~--~~~

Re: Custom manipulator

2006-10-30 Thread Jorge Gajon
just do course.teacher > without instantiating a teacher object? > No, course.teacher must be a Teacher object. And since you are using a custom manipulator, you'll need to fetch that object in the save() method. Or, as you already noted, you can use course.teacher_id and assign i

Re: Error importing settings.py

2006-10-31 Thread Jorge Gajon
You probably only need to change this line in your apache config: SetEnv DJANGO_SETTINGS_MODULE /var/www/closed/ce/settings.py for this one: SetEnv DJANGO_SETTINGS_MODULE ce.settings Regards, Jorge --~--~-~--~~~---~--~~ You received this message because you a

Re: setting and using an object variable without using a field

2006-11-04 Thread Jorge Gajon
On 11/3/06, Rob Slotboom <[EMAIL PROTECTED]> wrote: > And. it's working. > Just one question: Is this the right way to do such things? > I don't see any problem with it, as long as the template doesn't care where "voted_by_remote_add" comes from or how it is constructed. --~--~-~--~-

Re: Accessing request and session objects from templates

2006-11-06 Thread Jorge Gajon
instance=RequestContext(request) ) Take a look at the documentation here: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext Hope it helps. Regards, Jorge --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Help with Contact Form

2006-12-01 Thread Jorge Gajon
kyou" url, and get it from request.GET on that view. The other option is, as you said, to use sessions. I would personally use sessions, or store the data into the database. Regards, Jorge --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Calling Methods from Admin

2006-12-02 Thread Jorge Gajon
/sendreminder/' url. To do that you need to decorate your view with a 'staff_member_required' decorator like this: <<< from django.contrib.admin.views.decorators import staff_member_required from django.views.decorators.cache import never_cache def send_reminder(request, person_id):

Re: Setting checkbox to check as default value

2006-12-04 Thread Jorge Gajon
_default' argument to the CheckboxField constructor, like this: forms.CheckboxField(field_name="current", checked_by_default=True), Regards, Jorge --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Re: Validation 3 steep complicate form

2006-12-04 Thread Jorge Gajon
uld then check in the session that the flag for the previous view is set. If you will later need the supplied information then store it in the session too, do not use hidden fields to carry it over different views. Sessions documentation: http://www.djangoproject.com/documentation/sessions/ Regard

Re: Admin login problem

2006-12-13 Thread Jorge Gajon
ewriteRule ^(.*)$ django.fcgi/galeria/$1 [L] Remember that in your urls.py file you will need to include the admin urls like this: (r'^galeria/admin/', include('django.contrib.admin.urls')), Hope it helps. Regards, Jorge --~--~-~--~~~---~--~-

Re: Request data in inclusion tag

2006-12-21 Thread Jorge Gajon
ed a second parameter called 'takes_context' set to True, ie: mytag = register.inclusion_tag('template.html', takes_context=True)(mytag) See: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext/ Regards, Jorge --~--~-~--~~--

Re: dynamic query key asignment

2006-12-23 Thread Jorge Gajon
ere: Actividad.objects.filter(nombre__icontains='fabri') [] dyn_key = '%s__icontains' % 'nombre' kwargs = {} # a dictionary kwargs[dyn_key] = 'fabri' # the value to the key kwargs {'nombre__icontains': &

Re: Extrange behavior with get 'self' FK in admin view

2006-12-24 Thread Jorge Gajon
parents_repr has a higher indentation that the rest of the code, although it shouldn't really matter, you should probably check it just to be sure. Regards, Jorge class Subdivision(models.Model): code = models.CharField(_('Code'), maxlength=10, primary_key=True)

Re: Can't get my URLs right.

2006-12-27 Thread Jorge Gajon
s/i/abc.png (should be i/abc.png). I don't really want to keep recurring and linking my file system to make this work. Hi Jason, You need to write absolute urls in your html, for example, instead of: You have to: Notice the slash at the beginning of "/css/styles.

Re: Curious error

2007-01-02 Thread Jorge Gajon
will not have an 'id' field which you are trying to access in __str__(). Remove the 'primary_key' attribute from the date field in your model, or else, modify your __str__() method. Regards, Jorge --~--~-~--~~~---~--~~ You received this messa

Re: problem with inclusion_tag

2007-01-04 Thread Jorge Gajon
case it will try to load the file /project/templatetags/showmenu.py If the .py file with your custom tags had a different name, for example "mytags.py" then you would need to type a {% load mytags %} in your template before using your cu

Re: problem with inclusion_tag

2007-01-04 Thread Jorge Gajon
On 1/4/07, stoKes <[EMAIL PROTECTED]> wrote: On Jan 4, 12:10 pm, "Jorge Gajon" <[EMAIL PROTECTED]> wrote: > Hi Adam, > > On 1/3/07, stoKes <[EMAIL PROTECTED]> wrote: > > > base.html > > {% showmenu %} > > {% for serv

Re: model referencing itself

2007-01-04 Thread Jorge Gajon
Hi Aljosa, On 1/4/07, Aljosa Mohorovic <[EMAIL PROTECTED]> wrote: i'm trying to create a model which referencing itself and for this code i get this error: "name 'Chapter' is not defined" how do i do this or something similar? code: >>> from django.db import models class Chapter(models.Mode

Re: Question

2006-05-08 Thread Jorge Gajon
> In my urls.py I use > (r'^shop/(?P.*?)/','shopproject.apps.shop.views.shop.Index') > but also > (r'^TradeOffice/','shopproject.apps.shop.views.shop.TradeOffice'), > > so that I can not change simply > (r'^shop/(?P.*?)/','shopproject.apps.shop.views.shop.Index') > into > (r'^(?P.*?)/','shopproj

Re: No Subclassing in models yet? How would you guys do the following:

2006-05-10 Thread Jorge Gajon
He is using a common joke found in the slashdot community. See http://en.wikipedia.org/wiki/Slashdot_culture But then again, this is not slashdot. So yeah, maybe he was drunk. On 5/10/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hmm - were you drunk when you posted this? > > > > > --~-

Re: Forms: SelectField with default value

2006-05-10 Thread Jorge Gajon
om view of yours. I have not done that, but you could search about it in the mailing list. Regards, Jorge On 5/10/06, Juancho <[EMAIL PROTECTED]> wrote: > > Hello, > > I am trying to get a SelectField to render with a default value, i.e., > a pre-selected choice. > > Wit

Re: Foreign keys in views

2006-05-26 Thread Jorge Gajon
t one. With a custom manipulator you don't have this field name discrepancy, and don't need to do that value copying. I now prefer to use a custom manipulator. Cheers, Jorge On 5/25/06, Christian Schneider <[EMAIL PROTECTED]> wrote: > Hi all, > > I've written (wel

Re: How to validate CheckboxField?

2006-05-27 Thread Jorge Gajon
t; attribute, otherwise the validatior wouldn't be called if the field was empty. You could also add a validate_second() method, but in this case is not necessary since you only want to check if any of the two fields is checked. Regards, Jorge On 5/26/06, Jaroslaw Zabiello <[EMAIL PROTE

Re: Ajax support, there is no need for reinventing the wheel

2006-06-03 Thread Jorge Gajon
application, it is a "contributed" application which could use any ajax library without, it shouldn't introduce any complexity to "Django as a framework". Cheers, Jorge --~--~-~--~~~---~--~~ You received this message because you are subs

Re: Initial data for sites framework?

2006-06-04 Thread Jorge Gajon
Hi, This is not exactly what you are asking for, but you can modify your own local copy of Django. The file to modify is: trunk/django/contrib/sites/management.py Change the line that looks like this: s = Site(domain="example.com", name="example.com") Cheers, Jorge

Re: The only click to add any class

2006-06-15 Thread Jorge Gajon
> And when I save form, got this error: > Invalid value: 'region' should be a 'serp2.apps.common.models.Region'> instance, not a Request The hint is in the error message. You must pass a Region object to the region parameter, new_data['region'] contains only the id that the user selected from t

Re: custom form view not keeping information

2006-06-20 Thread Jorge Gajon
Hi, Why don't you post some code to see if we can understand better your problem and what modifications could be done? On 6/19/06, hotani <[EMAIL PROTECTED]> wrote: > > I'm pretty much giving up on this -- unless i find an alternative, I'm > going to end up using hidden fields with the generic

Re: Limiting Choices in AddManipulator

2006-07-02 Thread Jorge Gajon
display2 . etc Regards, Jorge On 7/1/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > > How can I limit the choices in an AddManipulator? > > I have a m2m relation to User, and it presents all users. I'd like to > filter and only present a subset.

  1   2   3   4   >