Re: newbie problem with accepting form input

2010-12-14 Thread john doe
On Tue, Dec 14, 2010 at 9:17 PM, john doe wrote: > > > On Tue, Dec 14, 2010 at 2:15 PM, Titan, Jer-ming Lin wrote: > >> maybe your view function gets wrong. post it! XDD >> > looking at the request.POST itself I see: [code] [/code] which shows the type choices for report and incident as BR and S

Re: running projects on the back of a base URL and having issues with the homepage

2010-12-14 Thread mongoose
:'( On Dec 11, 9:22 pm, mongoose wrote: > Hi there, > > I've got a base url.http://baseurl.com/ > I'm trying to run projects on the back of it. For > examplehttp://baseurl.com/mongoose/ > The projects run but the URL don't work properly because they all > reference the base url. So for 'About Me

Re: newbie problem with accepting form input

2010-12-14 Thread john doe
On Tue, Dec 14, 2010 at 2:15 PM, Titan, Jer-ming Lin wrote: > maybe your view function gets wrong. post it! XDD > > Thanks Titan :-). The code I use for my view function is below [code] #validate user def check_user_login(request): username = request.POST['username'] password = request.POST['p

urllib .urlopen problem

2010-12-14 Thread sami nathan
my django site was running successfully but now it s giving me the following error IO ERROR [Errno socket error] (11004, 'getaddrinfo failed' my view looks like this and i am running in proxy settings but i included that in my code proxie = {'http': 'http://192.168.1.100:8080'} word = requ

Re: No module named _md5

2010-12-14 Thread NavaTux
Same problem occurs; " (blogg)hire...@hirelex-laptop:~/Desktop/blogg/src$ *find -iname '*.pyc' -exec rm -f '{}' \;* (blogg)hire...@hirelex-laptop:~/Desktop/blogg/src$ cd .. (blogg)hire...@hirelex-laptop:~/Desktop/blogg$ ls bin blogsrc include lib src (blogg)hire...@hirelex-laptop:~/Desktop/b

Re: I don't get the big picture (admin, etc.)

2010-12-14 Thread Lachlan Musicman
On Wed, Dec 15, 2010 at 02:50, cocolombo wrote: > Thanks so much Mike, Christophe, Venkatraman, and whoever joins in, > for your answers. > > To Venkatraman S: > > Yes quite a lot of the applications is written an are functioning > independently. > > As I described it's the "big picture" I have di

Revisioning and fullhistory help needed

2010-12-14 Thread Tanis
I have an app that contains an Item model. I want to track changes to this model so that I can see that on day X item looked like this and on day Y it looked like that. Since fullhistory seemed to be the most recently updated module for this, I decided to go with that. However, it doesn't seem to

Re: newbie problem with accepting form input

2010-12-14 Thread Titan, Jer-ming Lin
maybe your view function gets wrong. post it! XDD BR Titan On Dec 15, 1:50 am, john doe wrote: > On Tue, Dec 14, 2010 at 9:19 AM, john doe > wrote: > > > > > > > On Tue, Dec 14, 2010 at 5:16 AM, Jer-ming Lin wrote: > > >> Hi John, > > >>    plz modify the Incident Model like Report Model, > >

Re: Mailing list service written in Django?

2010-12-14 Thread Dan Fairs
> We use the Zope-based GPL http://GroupServer.org platform with good > success, but we are interested in ways to connect it to possible > future Django run sites. Don't throw the baby out with the bathwater (unless you really don't like the baby). It's pretty straightforward to connect Zope to a

Mailing list service written in Django?

2010-12-14 Thread Steven Clift
Is there one? We use the Zope-based GPL http://GroupServer.org platform with good success, but we are interested in ways to connect it to possible future Django run sites. Steven Clift E-Democracy.org P.S. We had a few Django folks at our Neighborly hackathons: http://e-democracy.org/neighborly

Re: Django-Facebook (yet another thread)

2010-12-14 Thread Aljoša Mohorović
first step is to setup your fb canvas app to use oauth 2.0 - http://developers.facebook.com/docs/authentication/canvas howto ask use to authorize your app? you need to point user to proper url - http://developers.facebook.com/docs/authentication/#authenticating-users-in-a-web-application this cod

Re: No module named _md5

2010-12-14 Thread Cal Leeming [Simplicity Media Ltd]
Hi NavaTux, I have seen this happening a few times, and usually it's something to do with really messed up .pyc files in the site-packages directory. Try running this on your site-packages directly: find -iname '*.pyc' -exec rm -f '{}' \; This will remove any compiled python scripts. If this

Admin inline adding one too many extra rows to the form

2010-12-14 Thread Nick
I have three models. Two are inlines of another model in the Admin. I have their extra parameters set to 0 so: class model1(admin.StackedInline): model = Model1 extra = 0 class model2(admin.StackedInline): model = Model1 extra = 0 class model3(admin.ModelAdmin): inline = [

Re: How to move inline into or above fieldsets in django admin?

2010-12-14 Thread wayne
On Dec 12, 1:30 am, mongoose wrote: > mind giving a short example? > From what I see in the template > > {% for fieldset in adminform %} >   {% include "admin/includes/fieldset.html" %} > {% endfor %} > > {% for inline_admin_formset in inline_admin_formsets %} >     {% include inline_admin_forms

Django-Facebook (yet another thread)

2010-12-14 Thread Orazio
Hi all, Last day I got the bright idea to start building a facebook app in django. I was convinced that documentation would be good given that django docs are very well written and facebook is a big project. Insteadaaarrg On facebook side, there are old and messy docs full o

Re: slightly complicated radio input question

2010-12-14 Thread Andre Terra
My idea would be to use the MultiWidget class with some templating to do the HTML part. http://www.hoboes.com/Mimsy/hacks/django-forms-edit-inline/multiwidgets-templates/ shine some light on the subject, but I'm not sure how outdated it might be (the blog post is from 2007 IIRC...) I'm at work ri

Re: newbie problem with accepting form input

2010-12-14 Thread john doe
On Tue, Dec 14, 2010 at 9:19 AM, john doe wrote: > > > On Tue, Dec 14, 2010 at 5:16 AM, Jer-ming Lin wrote: > >> Hi John, >> >>plz modify the Incident Model like Report Model, >> >> class Incident(models.Model): >> report = models.ForeignKey(Report) >> INCIDENT_CHOICES = ( >> ('S

Re: newbie problem with accepting form input

2010-12-14 Thread john doe
On Tue, Dec 14, 2010 at 5:16 AM, Jer-ming Lin wrote: > Hi John, > >plz modify the Incident Model like Report Model, > > class Incident(models.Model): > report = models.ForeignKey(Report) > INCIDENT_CHOICES = ( > ('SF', 'SegFault'), > ('ML', 'Memory Leak'), > ('MC'

Re: more than one querys LIKE in the same field

2010-12-14 Thread Łukasz Rekucki
On 14 December 2010 09:10, marcoarreguin wrote: > Hi friends! > > I mean do something like this: > > SELECT * FROM table WHERE tags LIKE '%candy%' AND  tags LIKE '%milk%' > > > I've tried: > > table.objects.filter(tags__icontains='candy', tags__icontains='milk') > > I've tried too: > > list = ['ca

Re: more than one querys LIKE in the same field

2010-12-14 Thread Chris Lawlor
Not to second guess your intent, but are you sure you don't mean to OR the two? Your current SQL / Django query will only return tags that have both 'candy' and 'milk' in the tags string. If you do want to OR the queries, you can use Q objects: from django.db.models import Q table.objects.filter(

Re: I don't get the big picture (admin, etc.)

2010-12-14 Thread cocolombo
Thanks so much Mike, Christophe, Venkatraman, and whoever joins in, for your answers. To Venkatraman S: Yes quite a lot of the applications is written an are functioning independently. As I described it's the "big picture" I have difficulty with, not coding the individual parts that I need. Tha

Re: __init__.py file executed twice ?

2010-12-14 Thread Brian Bouterse
Why do things get started twice in django sometimes? I see the framework being started twice here. Also if you overload the __init__(self): of models, that too gets called twice. I've never understood this, but the singleton pattern seems to provide a nice workaround. Brian On Mon, Dec 13, 201

Re: Paginator and foreign key

2010-12-14 Thread bruno desthuilliers
On 13 déc, 19:49, refreegrata wrote: > thanks for the answer, but the solution don't show anything. I must be > doing something wrong. > if now I have > --- > class Myline(models.mode): >    fk_myDoc = models.ForeignKey(MyDoc, related_name="") > --- >

Re: Showing some extra HTML in a ModelForm

2010-12-14 Thread derek
Assuming its the same images you want to display for a given model, you could create a custom form for that model. See: http://docs.djangoproject.com/en/dev/ref/contrib/admin/#templates-which-may-be-overridden-per-app-or-model On Dec 14, 3:25 am, "Elmar A." wrote: > Hi > > I'd like to add some a

more than one querys LIKE in the same field

2010-12-14 Thread marcoarreguin
Hi friends! I mean do something like this: SELECT * FROM table WHERE tags LIKE '%candy%' AND tags LIKE '%milk%' I've tried: table.objects.filter(tags__icontains='candy', tags__icontains='milk') I've tried too: list = ['candy', 'milk'] table.objects.filter(tags__icontains=list And nothing

ManyToManyField('self') doesn't works as expect

2010-12-14 Thread Shuge Lee
I created a model to save map, a map is contains many room(RoomConfig). # model class RoomConfig(models.Model): room_name = models.CharField(max_length = 64) room_to_room = models.ManyToManyField('self', through = 'RoomToRoomConfig') class RoomToRoom(models.Model): DIRECTION_CHOICES =

No module named _md5

2010-12-14 Thread NavaTux
I am running my django blog application inside virtualenv;it got executed before sometimes;now it mess up it shows the error (blogg)hire...@hirelex-laptop:~/Desktop/blogg/blogsrc$ python manage.py runserver Traceback (most recent call last): File "manage.py", line 11, in execute_manager(se

Re: I don't get the big picture (admin, etc.)

2010-12-14 Thread Mike Seidle
Cocolombo - Actually, you are asking some pretty good questions because all of them are fundamental, and everyone starting with Django has to answer them. On Monday, December 13, 2010 10:25:45 pm cocolombo wrote: > I read a lot of documentation and books but there are still some very > basic t

www prefix in sitemap.xml

2010-12-14 Thread ozgur yilmaz
Hi, I'm using sitemap with django. But because of the django_site config in DB, sitemap.xml displays domain without WWW prefix. If i use PREPEND_WWW = True, when i use IP address in browser, the setting prepend www to the IP, so address looks like: www.11.111.11.111. Is there any solution method

Re: Send email : from_email ignored

2010-12-14 Thread mart
On 14-12-10 10:09, Dan Fairs wrote: >> I'd like to send an email from django. This is the code I'm using : >> >> # views.py >> def hello(request): >>send_mail('subject', "body", "anot...@email.com", ["d...@gmail.com"]) >>return render_to_response('hello.html', locals()) >> >> # settings.py

Re: Send email : from_email ignored

2010-12-14 Thread Dan Fairs
> I'd like to send an email from django. This is the code I'm using : > > # views.py > def hello(request): >send_mail('subject', "body", "anot...@email.com", ["d...@gmail.com"]) >return render_to_response('hello.html', locals()) > > # settings.py > EMAIL_USE_TLS = True > EMAIL_HOST = "smt

Re: ForeignKey search

2010-12-14 Thread Michele JD Granocchia
Ys thanks a lot :) > > Why not just: > > cl2 = > Class2.objects.filter(fieldwfk__field1__icontains=searchtext).order_by('-id') -- 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...@google

Send email : from_email ignored

2010-12-14 Thread mart
Hi, I'd like to send an email from django. This is the code I'm using : # views.py def hello(request): send_mail('subject', "body", "anot...@email.com", ["d...@gmail.com"]) return render_to_response('hello.html', locals()) # settings.py EMAIL_USE_TLS = True EMAIL_HOST = "smtp.gmail.com"