Re: Search from database

2013-07-26 Thread Kamal Kaur
On Wed, Jul 24, 2013 at 5:15 AM, Amirouche Boubekki wrote: > Apache solr or ElasticSearch: yes Is this the right method for installation? What is the need to adduser? http://www.cubrid.org/wiki_tutorials/entry/install-apache-solr-on-ubuntu These commands don't

Re: Problem with chaining filters

2013-07-26 Thread Pepsodent Cola
Thanks Andrew, I will practice more on doing Many-to-one relationships. https://docs.djangoproject.com/en/1.5/topics/db/examples/many_to_one/ On Monday, July 22, 2013 1:45:49 PM UTC+2, Andrew Simpson wrote: > > Perhaps something like this would give you what you need: >

Re: Can I only have one "get_queryset" per Viewpage?

2013-07-26 Thread Pepsodent Cola
I am having trouble understanding what the Debug wants me to fix and how to fix it? Isn't my models already defined? Isn't my queryset already defined in variables filter_1, 2 and 3? Exception Type: ImproperlyConfigured Exception Value: *'IndexView' must define 'queryset' or 'model'*

Re: Can I only have one "get_queryset" per Viewpage?

2013-07-26 Thread Tom Evans
On Fri, Jul 26, 2013 at 9:57 AM, Pepsodent Cola wrote: > > I am having trouble understanding what the Debug wants me to fix and how > to fix it? > Isn't my models already defined? Isn't my queryset already defined in > variables filter_1, 2 and 3? > > Exception Type:

Re: Search from database

2013-07-26 Thread Kamal Kaur
On Fri, Jul 26, 2013 at 12:10 PM, Kamal Kaur wrote: > These commands don't extract the files: > http://django-haystack.readthedocs.org/en/latest/installing_search_engines.html Installed with this: http://mirror.metrocast.net/apache/lucene/solr/4.4.0/solr-4.4.0.tgz --

Re: Can I only have one "get_queryset" per Viewpage?

2013-07-26 Thread Pepsodent Cola
Thanks Tom that got rid of the Debug message. My views.py code and index.html code now looks like this. But how exactly do I send my IndexView query results (filter1, 2 and 3) to my index.html template file? The only thing I see on the webpage is this result: No polls are available.

Test using different database

2013-07-26 Thread Antony
Hi, I have two databases on my settings file. One is sqlite and the other is postgis. It is a big project so some developers use sqllite and a few are using postgis. Now, when I try ./manage.py test command, I get the following,

Re: Avoid unbounded memory consumption when running `manage.py test`

2013-07-26 Thread Matt McClure
On Thursday, July 18, 2013 7:30:55 PM UTC-7, Matt McClure wrote: > 1. TestSuite. Here's a minimal hack to release the reference that > TestSuite would otherwise hold after a TestCase runs until the remainder of > the suite had finished. > > +self._tests.remove(test) > That turns

ajax and django

2013-07-26 Thread heni yemun
Hi, I'm trying to get a django project interact with ajax based site. The problem is that when i use the send function to send a POST data asynchronously the django app returns a 500 code and the server doesn't do anything. How do i correct this? -- You received this message because you are

Re: ajax and django

2013-07-26 Thread Lucas Magnum
Are you passing crsf_token in ajax post? []'s Lucas Magnum. 2013/7/26 heni yemun > Hi, > I'm trying to get a django project interact with ajax based site. The > problem is that when i use the send function to send a POST data > asynchronously the django app returns a 500

Re: ajax and django

2013-07-26 Thread Lucas Magnum
https://docs.djangoproject.com/en/dev/ref/contrib/csrf/#ajax []'s Lucas Magnum. 2013/7/26 Lucas Magnum > Are you passing crsf_token in ajax post? > > []'s > > Lucas Magnum. > > > 2013/7/26 heni yemun > >> Hi, >> I'm trying to get a django project

.filter() and .exclude() don't add up

2013-07-26 Thread Daniele Procida
How is this possible? # we start with a queryset actual_events # get forthcoming_events using filter() forthcoming_events = actual_events.filter( Q(single_day_event = True, date__gte = datetime.now()) | \ Q(single_day_event = False, end_date__gte = datetime.now()) ) # get

Django throws an exception when I add data from admin interface

2013-07-26 Thread Yu Yang
It is a blog app, I have created a Article model and Tag model. when I add data to Article table from Admin interface, the data is stored to database, but if I click the link to change the entry, it throws an exception "string indices must be integers, not str", the traceback is as follows:

Re: Django throws an exception when I add data from admin interface

2013-07-26 Thread Tom Evans
On Fri, Jul 26, 2013 at 4:22 PM, Yu Yang wrote: > It is a blog app, I have created a Article model and Tag model. when I add > data to Article table from Admin interface, the data is stored to database, > but if I click the link to change the entry, it throws an exception

Re: or-ing to QuerySets turns INNER into LEFT OUTER joins?

2013-07-26 Thread Carsten Fuchs
Hi Tom, thank you very much for your detailed reply, it helped at lot! Am 25.07.2013 19:00, schrieb Tom Evans: [...] As an example you can play around with, pick one user who has log entries, and remove all their departments from STAFF_BEREICHE. This user should then be found with the slow

Re: .filter() and .exclude() don't add up

2013-07-26 Thread Steve McConville
Firstly (and I don't think this is the cause of the problem) you're calling datetime.now() four times, which will give you four different datetimes (ie. the queries will not be completely identical). Secondly SQL uses a 3-valued logic (with null) so if any of the fields you're filtering on are

tinymce

2013-07-26 Thread Karl Arunachal
Hi, I want to integrate tinymce in my text area. But i can't find any good tutorials for it. Can some someone please advice me how to do this. Thank you. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop

Re: tinymce

2013-07-26 Thread Bill Freeman
See the README at https://github.com/aljosa/django-tinymce On Fri, Jul 26, 2013 at 2:00 PM, Karl Arunachal < kakararunachalserv...@gmail.com> wrote: > Hi, > I want to integrate tinymce in my text area. But i can't find any good > tutorials for it. Can some someone please advice me how to do

Django documentation code ?

2013-07-26 Thread Vinod Halaharvi
Is there a way to download just the code examples listed in the Django documentation pages ? VH -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: or-ing to QuerySets turns INNER into LEFT OUTER joins?

2013-07-26 Thread Martin J. Laubach
> This is still about 50 times better than the form with Q objects and > LEFT OUTER joins. This is rather unusual. A join in the database should be quite a bit faster than doing things manually, except if the joined tables produce massive amounts of data. This suggests that you're missing

Re: .filter() and .exclude() don't add up

2013-07-26 Thread Daniele Procida
On Fri, Jul 26, 2013, Steve McConville wrote: >Firstly (and I don't think this is the cause of the problem) you're >calling datetime.now() four times, which will give you four different >datetimes (ie. the queries will not be completely identical). Good point, I will

Re: .filter() and .exclude() don't add up

2013-07-26 Thread Bill Freeman
You really should figure out which record isn't showing up in either sub case and look at it in detail to see if NULLs are involved before you spend time trying to fix a problem that you don't have. You could, for example collect all the ids from the several queries into python sets, union the

Re: .filter() and .exclude() don't add up

2013-07-26 Thread Steve McConville
> So, if one of the fields can be Null, then *neither*: > > queryset.filter(field=value) > > queryset.exclude(field=value) > > will match a record where it's Null? As I understand it, this is correct - it's certainly the way SQL was designed. > In that case, is there a better - more

Forms with fields created dynamically client side

2013-07-26 Thread Jon Dufresne
Hi, I am creating a form for the user to add, edit, and remove all tags in the database. The tag models are handled by taggit. The form will look like like _Tag1_[del] _Tag2_[del] __<--- User enters next tag here [add tag] Clicking add tag will fire some javascript to add a new

Advanced Tutorial (how to write reusable app), last step does not work

2013-07-26 Thread Cate Liu
I am a new newbie to Django. Great tutorial BTW. I followed it to the T and 99.9% worked. Except the last step in the Advanced tutorial, the step 3 in 'Using your own package'. I could see http://127.0.0.1:8000/admin/ and create polls without any problem. But http://127.0.0.1:8000/polls/

error

2013-07-26 Thread veda av
manage.py not recognized as an internal or external command why do we get this error -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: Django documentation code ?

2013-07-26 Thread Mike Dewhirst
On 27/07/2013 3:37am, Vinod Halaharvi wrote: Is there a way to download just the code examples listed in the Django documentation pages ? That's not necessarily a good idea but it depends what you want to do.. Why do you want to do that? It wouldn't be too difficult to write a little screen

Re: error

2013-07-26 Thread Mike Dewhirst
On 27/07/2013 5:10am, veda av wrote: manage.py not recognized as an internal or external command why do we get this error manage.py isn't there. Or if it is there it isn't on the path. Did you cut any corners during installation? -- You received this message because you are subscribed to

Re: Django 1.5 Feature Suggestion

2013-07-26 Thread Russell Keith-Magee
On Fri, Jul 26, 2013 at 10:43 PM, JJ Zolper wrote: > Hello everyone, > > So I want to say thanks to the Django guys for providing more support for > those of us that want to use a user's email as the UID and login handler > versus the previous method of handling based on

Re: Advanced Tutorial (how to write reusable app), last step does not work

2013-07-26 Thread Mike Dewhirst
On 27/07/2013 10:20am, Cate Liu wrote: I am a new newbie to Django. Great tutorial BTW. I followed it to the T and 99.9% worked. Except the last step in the Advanced tutorial, the step 3 in 'Using your own package'. I could see http://127.0.0.1:8000/admin/ and create polls without any

Changing log filename

2013-07-26 Thread David Kumar
I have a standard logger that I would like to use for all of my applications, the only thing I want to change is the name of the file. Is there a way to do that with out having to create a logger and handler for each of my apps. Here is the logging settings that I am using. LOGGING = {

Re: Any good books for learning django?

2013-07-26 Thread Yinka
Is there any hope that we'll ever get an up-to-date book for learning Django? Rails 4 was released only last month and I can count at least 4 books (at various stages of completion) on sale to guide beginners. I love Django and but it's been difficult having to depend ONLY on the

Re: Any good books for learning django?

2013-07-26 Thread Lachlan Musicman
Ah, PyDanny and Audrey's Two Scoops is a great primer once you've done the excellent tutorial that is on the Django site https://django.2scoops.org/ I'm a very happy owner. L. On 27 July 2013 12:43, Yinka wrote: > Is there any hope that we'll ever get an up-to-date