Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-06 Thread 7equivalents
Now that I have that part working, I would like to make since of what was going on and why it didn't work in the first place. I have a question... Let's say (1) a page is requested, and the View renders_to_response a template (2) this template uses a {% include 'second_template.html' %} Does

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-06 Thread 7equivalents
Hey, Thanks alot I tried to do that before and it didn't work(the slider bar disappeared) and on your suggestion tried again, still didn't work, however since you suggested it, I knew it had to be the right track, so I got rid of the variable in the Javascript and the slider bar came

queryset minimization

2013-03-06 Thread Fatih Tiryakioglu
Hi all, Is there any shortcut (minimum db hit) for the following querysets: p = Person.objects.get(mail="pers...@ex.com") p.password & form.password comparison and it is ok. #reversing to the person's groupregisteration, for example: reg = p.groupregistration_set.all() #groupregistratin model

Re: reverse foreign key relationship usage

2013-03-06 Thread Fatih Tiryakioglu
Thank you Robert, I got it. -- 6 Mart 2013 Çarşamba 12:06:06 UTC+2 tarihinde Roberto López López yazdı: > > > Hi Fatih, > > This is extremely useful in case you have two different relations > between the same model. As a rough example, consider the two following > models: > > class

Re: dynamic form fields in admin?

2013-03-06 Thread galgal
Hm, but you use 1 Form in save method. I need to show/hide/change Form while generating change view. save() method is just to late for me. On Thursday, March 7, 2013 1:51:36 AM UTC+1, Bulkan-Savun Evcimen wrote: > > Hi, > > I've done something similar just recently where I generate a "key" field

Re: error- IntegrityError at /register/

2013-03-06 Thread Avnesh Shakya
thanks i got it regards, Avnesh shakya On Thu, Mar 7, 2013 at 10:09 AM, Avnesh Shakya wrote: > hi i have got error- IntegrityError at /register/ > > lrntkr_student.contact_no may not be NULL > > ,when i was trying to input data through html page(register.html), but >

error- IntegrityError at /register/

2013-03-06 Thread Avnesh Shakya
hi i have got error- IntegrityError at /register/ lrntkr_student.contact_no may not be NULL ,when i was trying to input data through html page(register.html), but data is not updating in database and generating that error. please help me i m unable to find this error. thanks -- You received

Re: Django + Raspberry PI

2013-03-06 Thread Tim Chase
On 2013-03-06 18:43, dgregor...@gmail.com wrote: > I am developing a pinewood derby race manager to run on Django on > the RPi. I am using sqlite. With an intro sentence like that and the lilliputian dimensions of the RPI, I half expected you to say that you ran it *on the pinewood derby race car

Re: Django + Raspberry PI

2013-03-06 Thread dgregory46
I am developing a pinewood derby race manager to run on Django on the RPi. I am using sqlite. It is show-stopping slow if I browse to it locally, so I use my desktop system for testing. I also set it up to export the files so I can do all of my editing on my main system. I log out of raspbian

Re: Django with FastCGI doesn't works

2013-03-06 Thread Tim Johnson
* Stephan Hassenpflug [130306 11:45]: > Hi, > > I have the same problem, but I can not see what to change. > I can not change the setup of apache as described. Me too (similarly) I kind of feel like fastcgi and shared hosting environments have been abandoned by

Re: dynamic form fields in admin?

2013-03-06 Thread Bulkan
Hi, I've done something similar just recently where I generate a "key" field in a ModelAdmin to display in django admin. > from django import forms > from django.contrib import admin class MyForm(forms.ModelForm): > key = forms.CharField(max_length=256) > def __init__(self, *args,

Re: TemporaryFileUploadHandler leaving tempfiles behind on disk

2013-03-06 Thread Scott White
After experimenting the only way I could reliably detect and delete the stuck temp files is a bit of a hack to implement a post_save signal to delete the file, but I have to attach an attribute to the model object being saved to determine the name of the file in /tmp. def save(self, *args,

Re: empty static_url

2013-03-06 Thread Phil
Hi Tom, Thanks a million for the reply, you helped solve my issue. Technically speaking, if that is your template, and you end up with "/css/style.css", then STATIC_URL is not empty, it is '/'. Yeah sorry, I should have just had "css/style.css" as I wasn't even getting the forward slash.

Re: Changing SECRET_KEY for a project that was already launched

2013-03-06 Thread Shawn Milochik
Are you using it as the key for any encrypted fields, or anything other than the built-in stuff Django does with session cookies? If not, I don't think you'll have a problem. Of course, back up your database first as a precaution, and use version control on your code so you can revert if

Changing SECRET_KEY for a project that was already launched

2013-03-06 Thread cool-RR
Hi guys, I have a project online whose SECRET_KEY was compromised. I obviously want to change it. Would anything bad happen if I change it? Would some things not work? Is it safe to just change it? Anything I should do? Thanks, Ram. -- You received this message because you are subscribed to

Re: Django with FastCGI doesn't works

2013-03-06 Thread Stephan Hassenpflug
Hi, I have the same problem, but I can not see what to change. I can not change the setup of apache as described. Am Samstag, 25. Juni 2011 18:01:06 UTC+2 schrieb bruno desthuilliers: > > On Jun 25, 10:24 am, geonomos wrote: > > Hi, > > I'm new in django

Re: TemporaryFileUploadHandler leaving tempfiles behind on disk

2013-03-06 Thread Scott White
I'm seeing this same issue with a slight twist... When uploading a files >2.5MB via a regular Django view or the Django Admin, the file uploads and the temp copy in /tmp is removed. When I upload using django-rest-framework via POST, the file uploads but the temporary copy remains in /tmp. I

Re: How to customize Django Admin interface with custom urls and views?

2013-03-06 Thread Tomas Ehrlich
Hello John, welcome in Django, hope you'll find it useful as I did. Extend Django admin is a little bit tricky, but not impossible. You can add your own views to admin simply by extending your ModelAdmin subclass. See

Re: django-stdimage admin TemplateSyntaxError

2013-03-06 Thread Judy Ng
Hi Randa, You can create a directory called stdimage in your TEMPLATE_DIR, and create a file called admin_widget with the following contents (or modify it according to your needs): Currently: {{value}}

Re: Converting Django app into a Desktop app

2013-03-06 Thread Kevin London
Just to follow up on this, I wound up using py2app, although it made things considerably more complicated. I made a Github repo during testing which can be found here. It's incomplete as I moved from testing into using py2app on the intended

Re: Extending the base file depending on User type

2013-03-06 Thread Sam Solomon
Tom Evans has probably the correct answer for you, but another thing that I've done (maybe not 100% applicable in this case) is to have a default base and then make it extendable from views when necessary: {% extends base_template|default:"base.html" %} This sounds like it isn't applicable in

How to customize Django Admin interface with custom urls and views?

2013-03-06 Thread John James
Hi to all! I'm completely new in Django. All I done is read one Introduction Book by Adrian Holovaty. When I finished I thought I knew enough to build even something simple, because the book is real good and clear. Maybe I could create something simple, but I wanna create my own

Conditionally defined model field in abstract model

2013-03-06 Thread Alan Johnson
(cross-posted from StackOverflow, answer there if you prefer, but I thought it might be too low level to get much help there alone) I've got an abstract model in my project that I want to

dynamic form fields in admin?

2013-03-06 Thread galgal
I want to make some advanced customization of admin form. While editing an object, I want to show, dynamically, different fields depending of 1 obj field (they are not visible while adding the obj.). There can be a situation, to validate that extra fields. For example, when object has a

[JOB] Looking for a bunch of great Python/Django developers to work in the District

2013-03-06 Thread Andy
We are looking to add a bunch of great Python (would be great if they have solid Django skills) developers to our direct clients team in Northwest DC (not far from Metro Center). This is not some boring government contract, this is a cool company in the Media space, doing great consumer facing

Re: models i18n

2013-03-06 Thread Roberto López López
Thanks for your suggestion Johan. Just another question, which I've not seen answered in the documentation: is there any custom filter/tag to access those translated fields from a template? Thanks Best, Roberto On 03/05/2013 10:39 PM, Johan ter Beest wrote: > > On Mar 5, 2013, at 10:31 PM,

Re: Suggestion for using distinct on django 1.4+ in your unit tests?

2013-03-06 Thread Brad Pitcher
I believe sqlite supports "distinct" just not "distinct on". I have always managed to find workarounds using "distinct" anywhere I formerly used "distinct on". On Mar 6, 2013 7:01 AM, "Toran Billups" wrote: > I recently upgraded to django 1.4 and found that my "distinct"

Suggestion for using distinct on django 1.4+ in your unit tests?

2013-03-06 Thread Toran Billups
I recently upgraded to django 1.4 and found that my "distinct" queries don't work anymore in my test code because sqlite doesn't support it -how is everyone using this for integration testing? Thank you in advance -- You received this message because you are subscribed to the Google Groups

i18n

2013-03-06 Thread Roberto López López
Hi, I am setting up i18n in my django app. I have added the following to my settings.py: PROJECT_PATH = os.path.abspath(os.path.dirname(__file__)) LOCALE_PATHS = ( os.path.join(PROJECT_PATH, 'locale'), ) LANGUAGES = [ ('en',

Re: OverflowError while trying python manage.py syncdb

2013-03-06 Thread 陶克k . tao
Sorry, I had made a mistake while editing the configuration file. The problem has been solved. 2013/3/6 陶克k.tao > Hi, > > I'm new to Django. I was trying to follow the tutorial to set up Django. > When I was trying to do "syncdb" operation, I got an error message to which >

OverflowError while trying python manage.py syncdb

2013-03-06 Thread 陶克k . tao
Hi, I'm new to Django. I was trying to follow the tutorial to set up Django. When I was trying to do "syncdb" operation, I got an error message to which I had no solution. *$ python manage.py syncdb* *OverflowError: Python int too large to convert to C long* I'm using OS X 10.8, and Django 1.5,

Re: Extending the base file depending on User type

2013-03-06 Thread Sandeep kaur
On Wed, Mar 6, 2013 at 2:39 AM, Shawn Milochik wrote: > Instead of extends, you could use the "include" directive. > "include" worked but destroyed all the structure of the template. :-/ -- Sandeep Kaur E-Mail: mkaurkha...@gmail.com Blog: sandymadaan.wordpress.com -- You

Re: How to order queries by exact match first

2013-03-06 Thread Gabriel
I'm not sure this is the right way, but you could drop the Q objects, use only icontains and sort by the length of 'name' -- 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

Re: How to order queries by exact match first

2013-03-06 Thread Tom Evans
On Wed, Mar 6, 2013 at 11:58 AM, Alexander Todorov wrote: > Hi guys, > I have this type of query: > > .filter(name__icontains='celery') > > and will possibly replace it with > > .filter(Q(name='celery') | Q(name__icontains='celery')) > > > I want to get the results

ANN: django-admin-tools 0.5.0 released

2013-03-06 Thread David Jean Louis
Hello, I'm happy to announce the availability of the version 0.5.0 of django-admin-tools: https://pypi.python.org/pypi/django-admin-tools/0.5.0 Django-admin-tools is a collection of extensions/tools for the default django administration interface, it includes: * a full featured and customizable

How to order queries by exact match first

2013-03-06 Thread Alexander Todorov
Hi guys, I have this type of query: .filter(name__icontains='celery') and will possibly replace it with .filter(Q(name='celery') | Q(name__icontains='celery')) I want to get the results ordered by exact match first. Is this possible or I need to sort the results in my code? Regards, Alex

Re: Extending the base file depending on User type

2013-03-06 Thread Tom Evans
On Tue, Mar 5, 2013 at 9:06 PM, Sandeep kaur wrote: > I want to extend the base template file into the child file depending > on the condition, like if the user is superuser or staff or active > user, the file to extended should ll be different. > For Eg : > > {% if

Re: reverse foreign key relationship usage

2013-03-06 Thread Roberto López López
Hi Fatih, This is extremely useful in case you have two different relations between the same model. As a rough example, consider the two following models: class Person(models.Model): name = models.CharField(max_length=30) class Car(models.Model): model =

Re: How to pass a value from a Django View to a JQuery Slider bar.

2013-03-06 Thread Tom Evans
On Tue, Mar 5, 2013 at 6:48 PM, <7equivale...@gmail.com> wrote: > Alright guys, thanks for the input, I need something a bit more specific to > my case due to my ignorance on the subject at hand, so I am posting the code > for my View, Template, and JQuery. So, basically I want to take the

Re: Impossible? Django with NTLM SSO auth on windows?

2013-03-06 Thread Tom Evans
On Tue, Mar 5, 2013 at 9:45 PM, Anton wrote: > Hmmm > > the bad support (as you mention "it hasn't been updated in quite some time") > seems to be a major problem in this domain. The NTLM/SSPI protocols haven't changed in a long time. Why should the projects that support this

Re: Setting Django to not quote table names

2013-03-06 Thread Ian Kelly
On Wed, Mar 6, 2013 at 1:38 AM, Ian wrote: > In the meanwhile, the commonly used workaround for this is to include the > schema in the db_table declaration like so: The other workaround which is mentioned in the ticket I linked but which I completely neglected to include

Re: Setting Django to not quote table names

2013-03-06 Thread Ian
On Tuesday, March 5, 2013 2:14:04 PM UTC-7, Steven Githens wrote: > > Hello Django Users, > > I have an app that uses Oracle and cx_Oracle for the db, and I've made the > models from an existing schema with inspectdb. > > The database schema also contains a number of sub-schemas, so they must be

Re: Converting Django app into a Desktop app

2013-03-06 Thread Loai Ghoraba
thanks a lot, I will look at them if I have time :) On Sat, Mar 2, 2013 at 3:00 AM, Czarek Tomczak wrote: > Hi Loai, > > Have a look at CEF Python that embeds Chrome browser: > https://code.google.com/p/cefpython/ > You will need to run a web server to convert it into a

Re: Django payment gateway with subscription management

2013-03-06 Thread Pankaj Singh
Hey Jaimin, For recurring submissions managed by Stripe, have a look at https://github.com/eldarion/django-stripe-payments Sincerely, Pankaj Singh http://about.me/psjinx On Wed, Mar 6, 2013 at 2:27 AM, Jaimin Patel wrote: > Yes, we are USA based and I come across stripe.