RE: Error at the return of an AJAX POST in DJANGO

2020-10-25 Thread 'Trevor Woolley' via Django users
Walter, If your copy and paste is accurate you have too many closing brackets in the ajax section. Try removing one of these from the end of the ajax section: }); From: django-users@googlegroups.com On Behalf Of Walter Randazzo Sent: Monday, 26 October 2020 9:09 AM To: django-users@googl

Re: Unit testing Multiselect fields not loading as expected

2017-05-08 Thread Trevor Woolley
data from > your production database when running tests?" note in ​this section [0]. > > [0] https://docs.djangoproject.com/en/dev/topics/testing/ > overview/#the-test-database > > > On Sunday, May 7, 2017 at 9:05:09 PM UTC-4, Trevor Woolley wrote: >> >> Fu

Re: Unit testing Multiselect fields not loading as expected

2017-05-07 Thread Trevor Woolley
Further investigation shows this as failing outside of a test scenario, and the "my_choices" is not being updated, unless the server (be that the ./manage.py runserver" or a production apache server) is restarted. Rgds Trevor On Friday, May 5, 2017 at 3:20:04 PM UTC+10, Trevo

Unit testing Multiselect fields not loading as expected

2017-05-04 Thread Trevor Woolley
ction database contains the correct IDs the test passes. Rgds Trevor # # forms.py snippet # # appropriate imports def get_my_list(): """ Function to get the complete stuff list for multiselect """ result = [] my_stuff = Stuff.objects.all() for stu

Re: [Django-admin] Popup for inline model

2016-03-09 Thread Trevor Cox
Did you ever find a way to do this? I am working on doing exactly that now... On Sunday, 6 July 2014 02:09:25 UTC-4, ebuild wrote: > > In the inline models when using TabularInline, is it possible to use a > popup to add/edit an item when we have a number of fields that can't hold > in the pag

Remove Django Documentation Items

2013-04-24 Thread Trevor Reed
Hello guys, is it possible to remove entries from the Django generated Documentation? Thanks -- 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 django-users+unsu

Django Documentation

2013-04-24 Thread Trevor Reed
Hello, I am relatively new to Django, but I love it so far. Is it possible to remove categories from the application documentation page, such as Tags, Filters, and Views. Thank You -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Is there a plan for Django to handle NoSQL databases natively?

2013-03-27 Thread Trevor Joynson
I've had good experiences using mongoengine with django. It's not django's ORM but it's very similar to it. On Mar 26, 2013 12:36 PM, "Donnie Darko" wrote: > I really like Django. I've fiddled around a bit with Rails, but I > personally prefer Django's logic. I also prefer Python over Ruby. Agai

Re: Questions about vim

2013-02-14 Thread Trevor Joynson
.git not .got, sorry on a phone On Feb 14, 2013 1:31 PM, trevorjoyn...@gmail.com wrote: Jedi seems to work the best for me. My vim config is on my github if you're interested: http://github.com/akatrevorjay/dotfiles-vim.got On Feb 12, 2013 6:23 AM, "Yussi" wrote: Hi, I was wondering if there a

Re: Questions about vim

2013-02-14 Thread Trevor Joynson
Jedi seems to work the best for me. My vim config is on my github if you're interested: http://github.com/akatrevorjay/dotfiles-vim.got On Feb 12, 2013 6:23 AM, "Yussi" wrote: > Hi, > I was wondering if there are any vim users here who managed to get a > productive working environment for djang

Re: Insane sql logging

2013-01-15 Thread Trevor Joynson
We just parse MySQL binary logs as they only contain modification queries. You can dump the real SQL query out petty easily. I can send you the base of our dump script if you want. On Jan 15, 2013 10:26 AM, "Matteo Suppo" wrote: > Good question. We decided not to do it at database level because w

Re: Help me choose OS for django server

2012-10-30 Thread Trevor Joynson
I highly recommend fail2ban. And definitely use SSH key only auth (PasswordAuthentication no). I've had a box with a 32 char random password get brute forced. Took three years to do, but it happened. On Oct 30, 2012 4:08 PM, "Nikolas Stevenson-Molnar" wrote: > > > First, is this a good idea? D

Re: uwsgi install question

2012-09-05 Thread Trevor Joynson
lude path, most ./configure scripts have such an option, something ala --with-libxml=/path/to/libxml2 2) (More work without more profit) Download libxml2 and compile it, specify the include path in the same way as above but you'll also need to put this path in your LD_LIBRARY_PATH env variable.

Re: Issue Deploying Django

2012-08-02 Thread Trevor Joynson
You are trying to install packages system-wide when you don't have credentials to do so. You can install everything you need without cluttering the system itself. For instance, use a virtualenv and set your PREFIX. Either way, happy hacking! On Aug 1, 2012 8:32 PM, "JJ Zolper" wrote: > I'm try

IntelliJ IDE, Running & Debugging Tests

2012-01-27 Thread Trevor Ewen
Hi - Has anyone managed to run/debug their tests in IntelliJ IDE? If so, are there any specific tricks to the launch configurations, IDE setup, or version. Any information you have would be very helpful. Thanks, TE -- You received this message because you are subscribed to the Google Groups "

Re: local variable 'qft' referenced before assignment

2011-01-24 Thread Trevor Stanley
inent issues. Best - Trevor Rainy wrote: On Jan 24, 1:46 pm, Trevor Stanley wrote: Bruno I will take your advice and seek out some Python literature. I did run through an online Python tutorial about a year ago. I should probably go through it again as I may understand it more now. Thanks,

Re: local variable 'qft' referenced before assignment

2011-01-24 Thread Trevor Stanley
Bruno I will take your advice and seek out some Python literature. I did run through an online Python tutorial about a year ago. I should probably go through it again as I may understand it more now. Thanks, even though your delivery is rather blunt - Trevor bruno desthuilliers wrote: On

Re: local variable 'qft' referenced before assignment

2011-01-23 Thread Trevor Stanley
ve that part of the app working and can move on to the next bit. I think I was plainly over-thinking the issue and had made things far more complicated than they needed to be. If you have any tips as to where you think I may be able to obtain some good tuition I would be pleased to hear abo

Re: local variable 'qft' referenced before assignment

2011-01-23 Thread Trevor Stanley
ptions.py" in save_model 597. obj.save() File "/home/trevor/1stdjangoproject/mysite/../mysite/bt4/models.py" in save 147. self.fringe_total = self.fringe_value() File "/home/trevor/1stdjangoproject/mysite/../mysite/bt4/models.py" in get_fringe_value

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-21 Thread Trevor Stanley
return func(self, *args2, **kwargs2) File "/usr/lib/python2.5/site-packages/django/db/transaction.py" in _commit_on_success 299. res = func(*args, **kw) File "/usr/lib/python2.5/site-packages/django/contrib/admin/options.py" in change_view 895.

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-21 Thread Trevor Stanley
when writng code. I have worked through some Python tutorials online but still struggle to test my code via the shell! All this leads me to going around in ever decreasing circles - I hope you can help me out of the fog. -TS Rainy wrote: On Jan 20, 2:04 pm, Trevor Stanley wrote:

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Trevor Stanley
time so have just arrived home from work. Many thanks for looking at this for me. Kenneth Gonsalves wrote: On Thu, 2011-01-20 at 08:37 +, Trevor Stanley wrote: Fringe.objects.select_related().filter(id=self) should this not be (id=self.id) -- You received this message beca

Re: Can someone help with Many-to-many referencing and then calculations against another field on the linked model

2011-01-20 Thread Trevor Stanley
Kenneth Gonsalves wrote: On Wed, 2011-01-19 at 22:34 +, The Stanley Household wrote: Happy to send Model if needed but at the moment I'm unable to run the server to provide admin error report, can C&P from terminal if that would help with the error. please copy and paste your code

Re: Avoiding code duplication with many similar models

2008-05-25 Thread Trevor Caira
ted fields. So while it is possible to do this with model inheritence, at least the most obvious solution involves a lot of code duplication. Best, Trevor Caira On May 25, 1:12 pm, "Alex Ezell" <[EMAIL PROTECTED]> wrote: > On Sun, May 25, 2008 at 12:30 AM, Trevor Caira <[EMAI

Avoiding code duplication with many similar models

2008-05-24 Thread Trevor Caira
key and many-to- many relationships. In most cases, the difference is the presence/ absence of a given field, or a different value for unique or null. How can I model this situation most simply, and with the least code duplication, in django? Best, Trevor Caira

Re: frames

2008-05-06 Thread Trevor
In the link generation insert target="right". For example My link message This is where "right" is the name of the right panel. On Tue, 2008-05-06 at 05:46 -0700, Gboro54 wrote: > I am using links to do frames in my code...My problem is that I want > the right frame to display the new stuff a