edit form cannot be generated for django comments

2012-07-03 Thread Sachin Gupta
I wanted to have a functionality to be able to edit the comments posted using the comments app (not from the admin, from the site). As much as I know Django, to render an edit form we need to pass an instance of the object to the form which has to be edited like form = SomeForm(instance=some_ob

Re: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-07-03 Thread Timothy Makobu
I'm in. On Tue, Jul 3, 2012 at 2:35 AM, Cal Leeming [Simplicity Media Ltd] < cal.leem...@simplicitymedialtd.co.uk> wrote: > Just in case anyone missed the URL, you can book your slot here: > > http://www.doodle.com/8ptehyqr6uezhtsy > > Voting open until 14th July. > > Cal > > On Mon, Jul 2, 2012

Re: geocoding - getting latlng from JavaScript, send to server, store into MongoDB

2012-07-03 Thread Markus Gattol
Answering to my own question: this is what I ended up using http://dajaxproject.com/maps/ to send coordinates (latlng) back to the server (from the users browser) and then store it in MongoDB. I can then easily query MongoDB for near points, send the data back to the users browser and draw mark

custom500 page does not show up ?

2012-07-03 Thread Nikhil Verma
HI All I have made a custom and a very simple 500.html page. However when i make debug=False and some error come in website still it show basic server error message. "A server error has occurred.Please contact the administrator" I want whenever there is some error it should show my custom 500 pa

Re: Dumpdata and serialization issues

2012-07-03 Thread natasha.ba...@utoronto.ca
Hm, I think the functionality to do this -- at least if I understand correctly what I read here: http://stackoverflow.com/questions/1113096/django-dump-data-for-a-single-model I'd be fine dumping the data for the entire app -- but the reason I did it this way is because when I do this, the cat

Re: Use regular expression to retrieve all image tags from a given content

2012-07-03 Thread Tim Chase
On 07/03/12 13:55, Melvyn Sopacua wrote: > On 3-7-2012 20:38, Tim Chase wrote: >> < img ... > > > Which should fail. It depends on what the OP is using it for. If it's just for extraction of images on the page to list them out, and such a tag comes through, then the OP may be willing to let s

Re: Decoupling Urls

2012-07-03 Thread Nikolas Stevenson-Molnar
Sorry, I missed the second part of your first question. I would consider 'polls.urls' to be a full path from your project root. Depending on your configuration, it may also be something like 'myproject.polls.urls'. _Nik On 7/3/2012 5:14 PM, Smaran Harihar wrote: > Hey Nik, > > Thanks for the repl

Re: Decoupling Urls

2012-07-03 Thread Nikolas Stevenson-Molnar
Hi Smaran, Yes, by full path, I mean, for example, 'polls.urls'. And yes, it is a string. Django interprets it as a module path when it builds up the URLs. It's the same thing that happens in the polls.urls module when mapping the URL patterns to functions. The functions are all quoted as well (in

Re: Decoupling Urls

2012-07-03 Thread Smaran Harihar
Hey Nik, Thanks for the reply. When you say, provide full path for the lazy quoted version, do you mean 'polls.url' ? Is that not relative path? Also having the path in quotes 'polls.url', is it not a string? Thanks, Smaran On Tue, Jul 3, 2012 at 5:02 PM, Nikolas Stevenson-Molnar < nik.mol...@c

Re: Decoupling Urls

2012-07-03 Thread Nikolas Stevenson-Molnar
If I understand correctly, you're asking about the difference between include('polls.urls') and include(admin.site.urls)? Django will often let you reference modules, functions, and classes 'lazily', meaning you don't need to import them first. You could use the unquoted version for polls as well,

Super slow authentication

2012-07-03 Thread Ali Mesdaq
Hey everyone, I got a situation where I have SUPER slow authentication like approx 5min to authenticate with both LDAP and default authentication mechanisms. So my issue is two parts first is why and how is my authentication so slow? Second is now I am having some remote users timeout on their aut

Decoupling Urls

2012-07-03 Thread Smaran Harihar
Hi Djangoers, I just completed the tutorial 3 and got a little confused on the last sectionof the tutorial, urlpatterns = patterns('', url(r'^polls/', include('polls.urls')), url(r'^admin/', include(admin.sit

Re: Controlling access

2012-07-03 Thread Larry Martell
On Tue, Jul 3, 2012 at 12:31 PM, Larry Martell wrote: > On Tue, Jul 3, 2012 at 11:55 AM, Robert Steckroth > wrote: >> Django is a very open-ended framework. The admin system is built around >> developer/user customization. > > > Yes, I realize that. But I was asking if there was something that ju

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Min Hong Tan
\(^o^)/ On Tue, Jul 3, 2012 at 4:53 PM, Nikolas Stevenson-Molnar < nik.mol...@consbio.org> wrote: > You are welcome. Glad you got it working :) > > _Nik > > > On 7/3/2012 3:33 PM, Min Hong Tan wrote: > > Thx nik, > > I'm confused , your words has aroused me from the word. > "You won't use Http

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Nikolas Stevenson-Molnar
You are welcome. Glad you got it working :) _Nik On 7/3/2012 3:33 PM, Min Hong Tan wrote: > Thx nik, > > I'm confused , your words has aroused me from the word. > "You won't use HttpResponse at all, just EmailMessage (using > message.attach). " > > problem solved by using below: > > > > from io

Re: Conditionals in Templates

2012-07-03 Thread Javier Guerra Giraldez
On Tue, Jul 3, 2012 at 3:39 PM, Bill Freeman wrote: > The obvious ways are: > > 1. Provide a model method that returns a string representing the type > of the instance, compare against that > 2. Decorate the instance with an attribute giving the name of the type > as a string... 3. write a templa

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Min Hong Tan
Thx nik, I'm confused , your words has aroused me from the word. "You won't use HttpResponse at all, just EmailMessage (using message.attach). " problem solved by using below: from io import BytesIO buffer = BytesIO() book.save(buffer) excel = buffer.getvalue() buffer.close() and just ma

Re: Dumpdata and serialization issues

2012-07-03 Thread Bill Freeman
In fact, I think dumpdata takes an app name, not a table or model name. On Tue, Jul 3, 2012 at 5:54 PM, Bill Freeman wrote: > I think that you have to dumdata one or both of the models at the ends > of the many to many, > and the join table will come along for free. > > On Tue, Jul 3, 2012 at 3:2

Re: Dumpdata and serialization issues

2012-07-03 Thread Bill Freeman
I think that you have to dumdata one or both of the models at the ends of the many to many, and the join table will come along for free. On Tue, Jul 3, 2012 at 3:21 PM, natasha.ba...@utoronto.ca wrote: > Hi All, > > I'm trying to dump the contents of a table which is the mapping for a > many-to-m

Re: values() and order_by()

2012-07-03 Thread Bill Freeman
First, I think that you're going about last_visit in the wrong way. timezone.now() is evaluated once, when the module is imported, rather than when the user visits. DateTimeField's auto_now=True option is tailor made for this kind of situation. Next, since you have the user id, I'm going to assum

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Nikolas Stevenson-Molnar
You'll need to use EmailMessage: https://docs.djangoproject.com/en/dev/topics/email/?from=olddocs/#django.core.mail.EmailMessage You won't use HttpResponse at all, just EmailMessage (using message.attach). _Nik On 7/3/2012 1:34 PM, Min Hong Tan wrote: > sorry all, maybe i'm not type why i need t

Re: Raise 404

2012-07-03 Thread Bill Freeman
We can't answer, since we don't know what page you're seeing. We can't access your localhost:8000 to check. On Tue, Jul 3, 2012 at 3:38 PM, Smaran Harihar wrote: > Hey Djangoers, > > I am on my tutorial 3 and I was on this topic. > > And now if I try to access http://localhost:8000/polls/1/ it g

Re: Conditionals in Templates

2012-07-03 Thread Bill Freeman
The obvious ways are: 1. Provide a model method that returns a string representing the type of the instance, compare against that 2. Decorate the instance with an attribute giving the name of the type as a string... Can't change the instance (I really think you can still decorate it in the view,

Re: Conditionals in Templates

2012-07-03 Thread Russ Abbott
Here's a workaround I came up with. I defined a class: class TableValue: def __init__(self, value): self.value = value self.is_list = isinstance(value, list) Then in the Template I wrote {% for row in rows %} {% f

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Min Hong Tan
sorry all, maybe i'm not type why i need the httpresponse to be attach. response = HttpResponse(mimetype='application/pdf') response['Content-Disposition'] = 'attaachment; filename=report.pdf' i'm generating the pdf file in response. and normally i will return response and it should be perfect wi

dateutil relativedelta compare - strange results

2012-07-03 Thread Cal Leeming [Simplicity Media Ltd]
Hi all, Just spent about an hour figuring out what the hell was going on with dateutil comparisons, and thought I'd share with the group. Essentially, when trying to compare relativedelta to each other, we were getting very strange results. In the end, it was due to the fact 'calendar' needed to

Conditionals in Templates

2012-07-03 Thread Russ Abbott
I'm generating a table. I want the cells to be different depending on the type of the content. How do I test for the type of the content? I'd like to do something like this. {% for row in rows %} {% for cell in row %}

Re: Still need help with the 405....please

2012-07-03 Thread Nikolas Stevenson-Molnar
Looking at the soaplib source, it looks like it required requests to be made using POST. If you're loading this in a web browser to test, then you're making a GET request. Try making a POST request (using something like Fiddler) instead. https://github.com/soaplib/soaplib/blob/master/src/soaplib/c

Dumpdata and serialization issues

2012-07-03 Thread natasha.ba...@utoronto.ca
Hi All, I'm trying to dump the contents of a table which is the mapping for a many-to-many field. The table is called Part and it has a ManytoManyField called category_id. When I run python manage.py dumpdata store.part_category_id > file.json I get the error Error: Unable to serialize database

Raise 404

2012-07-03 Thread Smaran Harihar
Hey Djangoers, I am on my tutorial 3 and I was on this topic . And now if I try to access http://localhost:8000/polls/1/ it gives me the same error page, which it gives for other errors. I know the error is because I have not y

Re: Still need help with the 405....please

2012-07-03 Thread Jeff Silverman
http://djangosnippets.org/snippets/2638/ On Jul 3, 2:56 pm, Nikolas Stevenson-Molnar wrote: > Would you please provide a reference to the snippet or to your complete > code? It's hard to understand what's going on from this small bit. > > _Nik > > On 7/3/2012 11:33 AM, Jeff Silverman wrote: > > >

Re: Still need help with the 405....please

2012-07-03 Thread Nikolas Stevenson-Molnar
Would you please provide a reference to the snippet or to your complete code? It's hard to understand what's going on from this small bit. _Nik On 7/3/2012 11:33 AM, Jeff Silverman wrote: > Thanks for the reply. Removing that did not change the result. Just > an FYI, but I copied the code verba

Re: Use regular expression to retrieve all image tags from a given content

2012-07-03 Thread Melvyn Sopacua
On 3-7-2012 20:38, Tim Chase wrote: > On 07/03/12 12:57, Melvyn Sopacua wrote: >> On 30-6-2012 15:23, Sunny Nanda wrote: >> What you're looking for is: >> prog = re.compile(r'') >> matches = re.search(prog) >> for match in matches : >> print match >> >>> On a sidenote, you should not be using

Re: Tutorial three '-pub_date'

2012-07-03 Thread Smaran Harihar
Thanks Vincent and Elliot. On Tue, Jul 3, 2012 at 11:41 AM, cubells wrote: > It means "in descending order" > > , Vicent Cubells. > > > - Reply message - > De: "Smaran Harihar" > Para: > Asunto: Tutorial three '-pub_date' > Fecha: mar., jul. 3, 2012 20:33 > > > Hey Djangoers, > > I am

Re: Tutorial three '-pub_date'

2012-07-03 Thread cubells
It means "in descending order" , Vicent Cubells. - Reply message - De: "Smaran Harihar" Para: Asunto: Tutorial three '-pub_date' Fecha: mar., jul. 3, 2012 20:33 Hey Djangoers, I am on the tutorial 3, and found this code where we are modifying the view index() def index(request):

Re: Use regular expression to retrieve all image tags from a given content

2012-07-03 Thread Tim Chase
On 07/03/12 12:57, Melvyn Sopacua wrote: > On 30-6-2012 15:23, Sunny Nanda wrote: > What you're looking for is: > prog = re.compile(r'') > matches = re.search(prog) > for match in matches : > print match > >> On a sidenote, you should not be using regular expressions if you are doing >> any

Re: Tutorial three '-pub_date'

2012-07-03 Thread Elliot Bradbury
'-' reverses the ordering of that field. So it will order the most recently published Polls first. On Tue, Jul 3, 2012 at 2:33 PM, Smaran Harihar wrote: > Hey Djangoers, > > I am on the tutorial > 3,

Tutorial three '-pub_date'

2012-07-03 Thread Smaran Harihar
Hey Djangoers, I am on the tutorial 3, and found this code where we are modifying the view index() def index(request): latest_poll_list = Poll.objects.all().order_by('-pub_date')[:5] output = '

Re: Still need help with the 405....please

2012-07-03 Thread Jeff Silverman
Thanks for the reply. Removing that did not change the result. Just an FYI, but I copied the code verbatim from the snippet. that's why I cannot understand what's going on. I continually get the 405 method not allowed error regardless. On Jul 3, 1:28 pm, Nikolas Stevenson-Molnar wrote: > I'm

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Nikolas Stevenson-Molnar
Oh, and HttpResponse is intended to send data back to a web browser. I can't think of any reason you would use an HttpResponse when sending an email. _Nik On 7/3/2012 11:20 AM, Min Hong Tan wrote: > hi, > > I have a problem to send mail using Emailmessage, > i wan to attach the file that render u

Re: Controlling access

2012-07-03 Thread Larry Martell
On Tue, Jul 3, 2012 at 11:55 AM, Robert Steckroth wrote: > Django is a very open-ended framework. The admin system is built around > developer/user customization. Yes, I realize that. But I was asking if there was something that just worked (i.e. like foreign key references do). I don't think so

Re: how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Nikolas Stevenson-Molnar
The content is already rendered when you pass it to your HttpResponse object. Therefore, I would just write it out prior to creating/returning the response object. E.g., if you're using a template: t = get_template("foo.html") c = Context({...}) content = t.render(c) f = open('somefile.txt', 'w')

how to save response 's render file to server or email using httpresponse

2012-07-03 Thread Min Hong Tan
hi, I have a problem to send mail using Emailmessage, i wan to attach the file that render using httpresponse and send, but always show me "int" does not have method "lower". therefore, I think to save the file in the server and then attach using emailmessage. but how do i get the httpresonse to

Re: Looking for common practice suggestion.

2012-07-03 Thread Brian Schott
An intermediate approach would be to generate an initial_data.json/yaml file and place it in your project's fixtures directory. This at least should be database independent. https://docs.djangoproject.com/en/dev/howto/initial-data/ Brian Schott bfsch...@gmail.com On Jul 3, 2012, at 1:33 PM,

Re: Looking for common practice suggestion.

2012-07-03 Thread Robert Steckroth
Well, I guess the user will have to specify the domain and name in the config file. I was hoping the information could be provided in the settings file. Only other way is the admin system which isn't necessary for an otherwise completely automated process. On Tue, Jul 3, 2012 at 1:33 PM, Robert St

Re: admin addGroup similar layout

2012-07-03 Thread Melvyn Sopacua
On 1-7-2012 16:32, ledzgio wrote: > I would like to have a layout similar to the one in the Admin page --> > Groups --> Add Group, the Permissions field, where I can have all elements > of a table throw a foreignKey (I suppose) on the left and add them to the > right side.

Re: am new bird to django,need some suggestion...please please do reply friend..

2012-07-03 Thread manish girdhar
hmmm sorry guysreally appreciated your point..i will surely do that..even i have started with that.. On Tue, Jul 3, 2012 at 12:00 AM, Daniel Roseman wrote: > On Monday, 2 July 2012 18:38:12 UTC+1, rick wrote: >> >> h i will try my best.actually i have already read that >> document

Re: Use regular expression to retrieve all image tags from a given content

2012-07-03 Thread Melvyn Sopacua
On 30-6-2012 15:23, Sunny Nanda wrote: > You can try the following two suggestions: > > 1. Try removing the "^" from the pattern and match only r" that the image tag might not be coming at the start of the string. That, and re.match is bound to the start of the string. See: http://docs.python.org

Re: Controlling access

2012-07-03 Thread Robert Steckroth
Django is a very open-ended framework. The admin system is built around developer/user customization. On Tue, Jul 3, 2012 at 1:51 PM, Larry Martell wrote: > On Tue, Jul 3, 2012 at 11:49 AM, Robert Steckroth > wrote: > > Yes, I have seen some very impressive admin media controls for websites >

Re: Django Developer, Washington, D.C.

2012-07-03 Thread Robert Steckroth
There are jobs available in Minnesota for any interested as well. More info can be found here --> http://www.comfychairconsulting.com/ On Tue, Jul 3, 2012 at 11:09 AM, Jon Black wrote: > And also on http://djangogigs.com/ > -- > Jon Black > www.jonblack.org > > > On Tue, Jul 3, 2012, at 11:03,

Re: Controlling access

2012-07-03 Thread Larry Martell
On Tue, Jul 3, 2012 at 11:49 AM, Robert Steckroth wrote: > Yes, I have seen some very impressive admin media controls for websites with > larger projects > having wordpress like functionality. However, there are not easy or cheap to > make. > I recommend checking open-souce projects for a good sta

Re: Controlling access

2012-07-03 Thread Robert Steckroth
Yes, I have seen some very impressive admin media controls for websites with larger projects having wordpress like functionality. However, there are not easy or cheap to make. I recommend checking open-souce projects for a good start. On Tue, Jul 3, 2012 at 1:39 PM, Larry Martell wrote: > I have

Controlling access

2012-07-03 Thread Larry Martell
I have a client that asked me to add some new functionality to their app, and then they said 'This new functionality should be controlled in Django admin so that only the admin user can see it.' Is there a way to control this in Django admin? I know in the python code i can check to see if they're

Looking for common practice suggestion.

2012-07-03 Thread Robert Steckroth
Hey Gang, I am writing a framework to install django projects to the cloud. Currently I have the user specifying the site domain and site name in a config file for the django.sites framework and providing the site_id in settings.py. Personally, I change the django.sites entries by issuing mysql com

Re: Still need help with the 405....please

2012-07-03 Thread Nikolas Stevenson-Molnar
I'm not sure that this is the problem, but typically constructors should not have a return value. Try removing the "return" from your DjangoSoapApp constructor. _Nik On 7/3/2012 6:32 AM, Jeff Silverman wrote: > Below is the code from the views.py > > The 405 is retunred from the 'return super(Dja

Inheriting template with a form into an existing template

2012-07-03 Thread DF
I have a simple note taking part of my application I'm trying to converge into one template. Currently, I have one template and view that renders and posts the form and another that displays the results. I'd like to amalgamate these into one where the form exists and the results are displayed o

get_or_create() race condition MySQL - second fix!

2012-07-03 Thread Cal Leeming [Simplicity Media Ltd]
Hi guys, A while ago we released a monkey patch which resolved the get_or_create() race condition when used in combination with READ COMMITED transaction isolation. However, this caused issues with legacy applications, so we have released a new fix that works without READ COMMITED. The code snip

Re: Django Developer, Washington, D.C.

2012-07-03 Thread Jon Black
And also on http://djangogigs.com/ -- Jon Black www.jonblack.org On Tue, Jul 3, 2012, at 11:03, Itamar Reis Peixoto wrote: > On Tue, Jul 3, 2012 at 10:43 AM, Andrew Moore > wrote: > > Hello group. > > > > National Geographic is seeking Django developers, for permanent full-time > > positions at

Re: Django Developer, Washington, D.C.

2012-07-03 Thread Itamar Reis Peixoto
On Tue, Jul 3, 2012 at 10:43 AM, Andrew Moore wrote: > Hello group. > > National Geographic is seeking Django developers, for permanent full-time > positions at their Washington, D.C. headquarters. > > If I can share more details, please let me know. propensitygr...@gmail.com > or and...@themidtow

Re: Advices on what web programming language used in template?

2012-07-03 Thread Frankline
Hi Yu, Your question is not really clear. Perhaps take a look at this: https://docs.djangoproject.com/en/dev/topics/templates/ Since you have mentioned JSP, I'm thinking you are looking at Python/Django alternatives. If that is the case, then you have the following alternatives: - Ruby on Rails

Re: Advices on what web programming language used in template?

2012-07-03 Thread Yu Min
于 2012年07月03日 19:09, kenneth gonsalves 写道: could you clarify your question please? Do you want to know what programming language is to be used in templates? Or do you want to know what programming language is to be used to program templates? Sorry for not make myself clear. What I am wondering

Django Developer, Washington, D.C.

2012-07-03 Thread Andrew Moore
Hello group. National Geographic is seeking Django developers, for permanent full-time positions at their Washington, D.C. headquarters. If I can share more details, please let me know. propensitygr...@gmail.com or and...@themidtowngroup.com. Thanks! -- You received this message because you

Still need help with the 405....please

2012-07-03 Thread Jeff Silverman
Below is the code from the views.py The 405 is retunred from the 'return super(DjangoSoapApp, self).__init__(Application(services, tns))' statement. I am using python 2.6, soaplib20 and django 1.3. I am struggling to understand what exactly is wrong here. class HelloWorldService(DefinitionBas

Re: 'CSRF verification failed." from django.contrib.comments. can you help solve it? django 1.3

2012-07-03 Thread Melvyn Sopacua
On 30-6-2012 8:39, brycenesbitt wrote: > {% csrf_token %} > > I render my form with: > {% render_comment_form for entry %} You should verify if the generated html looks sane. If you need help with that, put it up on dpaste. > --- > I should note it did work when I first added it to

Re: Filter FieldError

2012-07-03 Thread Saroja Parameswaran
That worked! Thank you!! On Tue, Jul 3, 2012 at 4:33 PM, Jon Black wrote: > I think you need a double underscore: > > fieldname__startswith > > On Tue, Jul 3, 2012, at 02:47, Saroja Parameswaran wrote: > > While using filters on Django objects, I get the below error message. > Except equals

Re: to add counter in the project

2012-07-03 Thread Bharati Sharma
sorry kenneth ...but I have stored information(resume) of professors in the database. in models.py , i have taken fields like name, dob, qualification,designation etc. then these are saved in the database of every professor. but the point is designation of professors vary(like there are professors

Re: to add counter in the project

2012-07-03 Thread kenneth gonsalves
On Tue, 2012-07-03 at 04:16 -0700, Bharati Sharma wrote: > thanks kenneth ...but will it count those entries also which I will > enter > in the database after using filter() and count()? if you want to know the number of assistant profs do a query like this: no_of_asstprofs = Faculty.objects.fi

Re: to add counter in the project

2012-07-03 Thread Bharati Sharma
thanks kenneth ...but will it count those entries also which I will enter in the database after using filter() and count()? On Tue, Jul 3, 2012 at 4:06 AM, kenneth gonsalves wrote: > On Tue, 2012-07-03 at 01:08 -0700, Bharati Sharma wrote: > > actually I am making project of faculty management s

Re: to add counter in the project

2012-07-03 Thread Bharati Sharma
thanks jon... On Tue, Jul 3, 2012 at 4:06 AM, kenneth gonsalves wrote: > On Tue, 2012-07-03 at 01:08 -0700, Bharati Sharma wrote: > > actually I am making project of faculty management system of my > > college.I > > have added some of the faculty member's resume in the database. i want > > a > >

Re: Advices on what web programming language used in template?

2012-07-03 Thread kenneth gonsalves
On Tue, 2012-07-03 at 15:30 +0800, Yu Min wrote: > I'm going through django structure. And while struggling to > understand the django usage, I start to wonder what web programing > language goes well with the template system. could you clarify your question please? Do you want to know what pro

Re: to add counter in the project

2012-07-03 Thread kenneth gonsalves
On Tue, 2012-07-03 at 01:08 -0700, Bharati Sharma wrote: > actually I am making project of faculty management system of my > college.I > have added some of the faculty member's resume in the database. i want > a > counter in my project that should increment its value whenever a new > faculty member

Re: Filter FieldError

2012-07-03 Thread kenneth gonsalves
On Tue, 2012-07-03 at 02:47 -0700, Saroja Parameswaran wrote: > Can anyone tell me the solution? double underscore __ -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-use

Re: Filter FieldError

2012-07-03 Thread Jon Black
I think you need a double underscore: fieldname__startswith On Tue, Jul 3, 2012, at 02:47, Saroja Parameswaran wrote: While using filters on Django objects, I get the below error message. Except equals, all the other options like _startswith, _exact, _iexact shows the same error. I am using Djan

Re: to add counter in the project

2012-07-03 Thread Jon Black
It sounds like you have different user's (User) with different roles (Group with permission set) that have a resume: class Resume(models.Model): resume = models.FileField() date_uploaded = models.DateTimeField() You can then query by aggregating across the group and date_uploaded fields. That

values() and order_by()

2012-07-03 Thread J. Javier Maestro
Hi there! I have the following model: class Visit(models.Model): user = models.ForeignKey(User) visitor = models.ForeignKey(User, related_name="visitor") last_visit = models.DateTimeField(default=timezone.now()) count_visits = models.IntegerField(default=0) I would like

Advices on what web programming language used in template?

2012-07-03 Thread Yu Min
hi, guys I'm going through django structure. And while struggling to understand the django usage, I start to wonder what web programing language goes well with the template system. Will you guys kindly enough to give me some advice on this please! -- You received this message because you

Filter FieldError

2012-07-03 Thread Saroja Parameswaran
While using filters on Django objects, I get the below error message. Except equals, all the other options like _startswith, _exact, _iexact shows the same error. I am using Django 1.4. > FieldError: Cannot resolve keyword 'fieldname_exact' into field. Choices > are: > Can anyone tell me

Re: to add counter in the project

2012-07-03 Thread Bharati Sharma
thanks Jon... actually I am making project of faculty management system of my college.I have added some of the faculty member's resume in the database. i want a counter in my project that should increment its value whenever a new faculty member's resume is added into the database. yes, it will requ

Use django and xml to communicate whith ORI-OAI

2012-07-03 Thread nef
Hello, I am working with django and I have a medium level. I want to use xml to interchange data with an application that already exists. This application is ORI-OAI. This is an application that advertises the information in the field of education, especially in France. Only I do not know yet us

Re: Deployment: Apache2, wsgi (Debian squeeze)

2012-07-03 Thread Rohan
If you change '/django' to '/' in your WSGIScriptAlias directive, then everything will be forwarded to django, but apache will no longer check in DocumentRoot since all url paths begin with a '/' and will be matched by your wsgi alias This means you would need another way of handling static co

Re: to add counter in the project

2012-07-03 Thread Sandeep kaur
On Tue, Jul 3, 2012 at 11:55 AM, Bharati Sharma wrote: > I want to add counter in my project so that the value in the table increases > as the data is put in the database. Can anyone help me plz. > If you want a counter in database, you can make it auto-increment. Like I want job_no as a counter f

Re: Can't figure out how to obtain organized list of my friends

2012-07-03 Thread Jon Black
I agree with Kenneth. Your models seem odd. Why not use a ManyToManyField? The django docs even provides quite a nice example (see: https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ManyToManyField.symmetrical): class Person(models.Model): friends = models.ManyToMan

Re: to add counter in the project

2012-07-03 Thread Jon Black
That's quite a vague requirement. You could override form_valid() in your view and increment a counter in your model manually before saving. It might pay to ask yourself why you need a counter. Does it make more sense to record the actions in a separate table and count the records? Will the count r

Re: Same virtual-env for all django projects

2012-07-03 Thread Jon Black
Bear in mind that you may want different packages in your environments depending on the project. For example, you may have a project that uses a maps app (from pip) which isn't required by others. The general purpose of virtualenv is to setup clean, self-contained environments. What would you do if

Re: Deployment: Apache2, wsgi (Debian squeeze)

2012-07-03 Thread kenneth gonsalves
On Tue, 2012-07-03 at 15:03 +1200, Matt Smith wrote: > Now I feel I'm stuck > between that old way of doing things and the django/wsgi way which I > can't get my head around even after reading the docs. I would suggest that you start with trying to understand the concept of virtual host in Apac

Re: Difficulties deploying Satchmo store

2012-07-03 Thread ionic drive
and is there any good reason why you go for django version 1.1? or do you only not bother about framework versions? On Mon, 2012-07-02 at 18:30 -0500, Jonathan Hayward wrote: > Forgive me; I had already used search engine. The top (albeit 1.1) > entry for "django wsgi tutorial", which did not

Re: Can't figure out how to obtain organized list of my friends

2012-07-03 Thread kenneth gonsalves
On Mon, 2012-07-02 at 20:31 -0700, Keith D. Cardin wrote: > I'm trying to create a "my friends" page, which will list the user's > friends listed in alphabetical order. > I have two classes involved with this data: Profile [and] Friendship > > *class Friendship(models.Model):* > friend

Re: Difficulties deploying Satchmo store

2012-07-03 Thread ionic drive
Dear Jonathan, I know a lot of things about you... you are an Orthodox Christian Author, your skills are Ajax, CGI, CMS, CSS, Django, HTML, IA, JSON, JavaScript, LAMP, Linux, Perl, PHP, Python, SQL, UI, Unix, Usability, UX, XHTML, XML,... I know you only check the first results in search engines,