Re: Stuck trying to get certain results with Django ORM and also raw sql - couldn't figure out how to achieve results either way

2013-03-25 Thread chefsmart
ntity` >= %s AND pot.`id` NOT IN ( SELECT dot.`purchase_order_id` FROM `deliveryorder` dot WHERE dot.is_active = 1 ) )""" On Monday, March 25, 2013 4:55

Stuck trying to get certain results with Django ORM and also raw sql - couldn't figure out how to achieve results either way

2013-03-25 Thread chefsmart
Please see simplified django model representation on pastebin In this scheme of things, there are several SiteOffice objects that are governed by a single HeadOffice object (I haven't included either in the pastebin code). The head_office instance generates a pur

Getting to manytomany objects from a form in the view, before saving to the database

2010-10-05 Thread chefsmart
(FYI - this is also on stackoverflow, awaiting answers) For the following models: - class Item(models.Model): name = models.CharField(max_length=150) value = models.DecimalField(max_digits=12,decimal_places=2) class Organization(models.Model): name = models.CharField(max_length=150)

Re: manually add objects to a QuerySet

2010-08-09 Thread chefsmart
er db queries; I just need them in a queryset. On Aug 9, 8:20 am, chefsmart wrote: > Since I already have the objects, I don't want to hit the database > again. There are not just two but multiple objects, that's why I want > to avoid unnecessary db calls. > > On A

Re: manually add objects to a QuerySet

2010-08-08 Thread chefsmart
Since I already have the objects, I don't want to hit the database again. There are not just two but multiple objects, that's why I want to avoid unnecessary db calls. On Aug 8, 9:54 pm, akaariai wrote: > On 8 elo, 11:55, chefsmart wrote: > > > The objects are coming f

Re: manually add objects to a QuerySet

2010-08-08 Thread chefsmart
The objects are coming from mutually exclusive querysets. I need to pass a queryset of these objects to a function. On Aug 8, 1:25 pm, Masklinn wrote: > On 8 août 2010, at 06:15, chefsmart wrote: > > > I had asked this on stackoverflow, but I guess I couldn't explain > >

manually add objects to a QuerySet

2010-08-07 Thread chefsmart
I had asked this on stackoverflow, but I guess I couldn't explain myself clearly enough. I'll try to ask again here: Say I have two objects obj1 and obj2 of the same model (MyModel), now I would like to add these objects to a new QuerySet. Can I create a QuerySet manually like the following my_qs

Re: How to manually render a Django template for an inlineformset_factory with can_delete = True / False

2010-04-15 Thread chefsmart
Makes sense. Thanks. On Apr 15, 7:03 pm, Tom Evans wrote: > On Thu, Apr 15, 2010 at 2:00 PM, chefsmart wrote: > > Thanks for that tip. > > > I can guess what empty_permitted is, but could you explain how > > empty_permitted is related to can_delete? I couldn't find

Re: How to manually render a Django template for an inlineformset_factory with can_delete = True / False

2010-04-15 Thread chefsmart
6:45 AM, chefsmart wrote: > > Hi, > > > I have an inlineformset with a custom Modelform. So it looks something > > like this: > > > MyInlineFormSet = inlineformset_factory(MyMainModel, MyInlineModel, > > form=MyCustomInlineModelForm) > > > I am renderin

How to manually render a Django template for an inlineformset_factory with can_delete = True / False

2010-04-14 Thread chefsmart
Hi, I have an inlineformset with a custom Modelform. So it looks something like this: MyInlineFormSet = inlineformset_factory(MyMainModel, MyInlineModel, form=MyCustomInlineModelForm) I am rendering this inlineformset manually in a template so that I have more control over widgets and javascript

Re: Inline validation

2010-02-08 Thread chefsmart
You could take a look at http://wadofstuff.blogspot.com/2009/08/requiring-at-least-one-inline-formset.html On Feb 8, 6:46 pm, Gabriel Reis wrote: > Hello guys, > > I have the following situation: > > class FooInline(TabularInline): >     model = Foo >     extra = 1 >     max_num = 1 > > class My

Re: django-debug-toolbar with runserver not running on localhost

2010-02-05 Thread chefsmart
If you use dcamer's fork http://github.com/dcramer/django-debug-toolbar you won't have to rely on INTERNAL_IPS and you can simply log in as a superuser to use django-debug-toolbar Regards. On Feb 5, 2:53 am, HARRY POTTRER wrote: > gah you're correct, I can't believe I missed that setting. thank

Re: Ajax with Django

2010-02-05 Thread chefsmart
http://lethain.com/entry/2007/dec/01/using-jquery-django-autocomplete-fields/ On Feb 5, 2:19 am, Rohan Shah wrote: > Any good documentation available on how to implement AJAX with Django ? > > -- > Thanks and Regards, > Rohan Shah > > ++[>>++>+++>+-]>++. >+++.-

AttributeError: 'ValidationError' object has no attribute 'message_dict'

2010-02-03 Thread chefsmart
I am trying out the new model validation feature in svn trunk, but I doubt I am doing this right. Specifically, for a model I have the following: - def clean(self): from django.core.exceptions import ValidationError if self.is_current and self.to_date is not None: rais

ManyToMany Performance

2010-01-30 Thread chefsmart
Let's say I have two models - Article and Publication. Article has a field publications = models.ManyToManyField(Publication) Let's say I present the user with a series of checkboxes representing publications (much like the ModelMultipleChoiceField, but I am not using ModelForms here) and gettin

Re: svn checkout problems? (at around 2:50 pm GMT, 2010-01-29)

2010-01-29 Thread chefsmart
No my svn checkout command was ok, as was the url in that command. To elaborate, svn would continue with checkout then abruptly stop at a random file. I tried it about 3 or 4 times with the same result. Regards. On Jan 29, 8:27 pm, Daniel Hilton wrote: > On 29 January 2010 14:59, chefsm

svn checkout problems? (at around 2:50 pm GMT, 2010-01-29)

2010-01-29 Thread chefsmart
For the last 1 hour I have been trying to checkout a fresh copy of django-trunk from svn. But the checkout is failing. Unfortunately, I don't have the exact message I have been receiving, but just wondering if anybody else facing similar issues with checkout? Regards. -- You received this messa

Re: read only django admin

2010-01-28 Thread chefsmart
ection if it weren't solid enough. Regards. On Jan 29, 9:38 am, Kenneth Gonsalves wrote: > On Friday 29 Jan 2010 10:01:15 am chefsmart wrote: > > > > The Django administrative interface is there to allow administrative > > > users to administer data. > > &

Re: Reg. Improving Django response time (i.e throughput)

2010-01-28 Thread chefsmart
When you say "It is taking plenty of time to load Django initially", what exactly do you mean? What does initially mean here? Are you trying to reverse engineer your db using Django's inspectdb? Regards. On Jan 29, 1:53 am, Saravanan wrote: > I have Django installed in SUSE Linux with postgres.

Re: read only django admin

2010-01-28 Thread chefsmart
> The Django administrative interface is there to allow administrative > users to administer data. But yes, you can do what you want if you use the permissions system together with the groups system correctly. That is, create groups and then assign whatever permissions you need to those groups. Th

Django documentation error? (minor, but misleading)

2009-12-09 Thread chefsmart
On the page http://www.djangoproject.com/documentation/models/many_to_many/ under Sample API Usage where it says: - " # Add a Publication directly via publications.add by using keyword arguments. >>> new_publication = a2.publications.create(title='Highlights for Children') " I think it should sa

Re: question about modelform lifecycle

2009-12-09 Thread chefsmart
g is right ;) Regards, CM On Dec 9, 2:50 pm, bruno desthuilliers wrote: > On 9 déc, 06:29, chefsmart wrote: > > > At what point in a modelform's lifecycle does the underlying object > > become accessible? > > Specifically, can I access the underlying object in > > a m

question about modelform lifecycle

2009-12-08 Thread chefsmart
At what point in a modelform's lifecycle does the underlying object become accessible? Specifically, can I access the underlying object in a modelform's "clean" method? Or is it only after one does form.save () with or without commit = False? I basically need to do some custom validation and need

ne field lookup revival request

2009-12-08 Thread chefsmart
There used to be an "ne" field lookup (for expressing "not equal to" conditions). Now we can do similar things with the "exclude" filters. But I really think having ne back as a field lookup would help in situations like when I would like to do a quick: Issue.objects.get(type__ne='immediate') R

Re: Unique model field and case sensitivity (postgres)

2009-12-06 Thread chefsmart
By the way, right now I'm using a State.objects.get(name__iexact=name) in clean_name() method in a form subclass to prevent creation of case- insensitive duplicates. Just wondering if there is a built-in or better way. On Dec 6, 2:57 pm, chefsmart wrote: > Reading through some discus

Unique model field and case sensitivity (postgres)

2009-12-06 Thread chefsmart
Reading through some discussions on this mailing list and elsewhere, I saw a lot of material on mysql case sensitivity and collation. Consider the following situation: - Suppose my app allows users to create the states / provinces in their country. Just for clarity, we are considering only ASCII

Re: render_to_response and HTTP status codes other than 200

2009-12-04 Thread chefsmart
Yeah it's a twisted idea, but I'm going to use it for informative 403 405 pages. On Dec 4, 3:51 pm, Daniel Roseman wrote: > On Dec 4, 8:37 am, chefsmart wrote: > > > According to the docs > > athttp://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render-to..

render_to_response and HTTP status codes other than 200

2009-12-04 Thread chefsmart
According to the docs at http://docs.djangoproject.com/en/dev/topics/http/shortcuts/#render-to-response the render_to_response shortcut "Renders a given template with a given context dictionary and returns an HttpResponse object with that rendered text." The HttpResponse object have a default sta

Re: Why does create_user work without importing User from django.contrib.auth.models

2009-12-04 Thread chefsmart
I guess it must be coming from django.contrib.auth.middleware.AuthenticationMiddleware that I am using. But I'm no Python / Django expert, so don't know for sure. On Dec 3, 8:56 pm, chefsmart wrote: > I have checked, and am not importing User in my code. > > I guess somewhere

Re: Why does create_user work without importing User from django.contrib.auth.models

2009-12-03 Thread chefsmart
ars of this module. > > On Dec 3, 12:30 am, chefsmart wrote: > > > I have been using django.contrib.auth for some time now. I have been > > creating users and assigning them to groups successfully. > > > I do something like this: - > > >                 user =

Why does create_user work without importing User from django.contrib.auth.models

2009-12-02 Thread chefsmart
I have been using django.contrib.auth for some time now. I have been creating users and assigning them to groups successfully. I do something like this: - user = User.objects.create_user (username=form.cleaned_data['username'], password=form.cleaned_data['password'],

Re: MySQL error 1406 while running syncdb

2009-12-02 Thread chefsmart
Exactly. So people need to be aware of the varchar limits of django_ tables and also the contrib.auth tables. On Dec 2, 5:11 pm, Jarek Zgoda wrote: > Wiadomo¶æ napisana w dniu 2009-12-02, o godz. 11:30, przez chefsmart: > > > > > Hi, I'm am getting MySQL error 1406 whi

MySQL error 1406 while running syncdb

2009-12-02 Thread chefsmart
Hi, I'm am getting MySQL error 1406 while running syncdb. (See link http://pastebin.org/59605) This happens after I create the superuser. The error says _mysql_exceptions.DataError: (1406, "Data too long for column 'name' at row 1") I am not doing any pre-population of data. So I checked the tab

Restrict admin to superusers only

2009-11-27 Thread chefsmart
Is there a way to allow only superusers to login to and use the admin section? Users with is_staff = True do exist and that can't be changed because this app is in use and makes use of is_staff in some other way. Can this be achieved without changing the code in contrib.admin or contrib.auth? --

db_index = True on BooleanField (MySQL)

2009-11-26 Thread chefsmart
I had a fruitless discussion with a fellow coder today. Summarily, we have a model for students that will keep growing with time. I mean to say the number of records in the database will keep growing, and no rows are going to be deleted. Now, students fall in one category or the other, and this is

Re: string-based fields and null

2009-11-26 Thread chefsmart
> >   But then > > in an year and a half, hard drives will be twice as big. > > > Still, python (and lisp and C) programmers are used to thinking about > > the possibility > > of None (or nil or (void *)0), so experienced programmers may have an easy > > time >

string-based fields and null

2009-11-23 Thread chefsmart
The Django docs suggest "Avoid using null on string-based fields such as CharField and TextField unless you have an excellent reason." ImageField, EmailField, FileField, FilePathField, IPAddressField, SlugField, URLField, XMLField are also a string-based fields at the db level, so am I right in as

Re: Template variables and tags confusion... (regarding concatenation)

2009-11-21 Thread chefsmart
Exactly. Thanks. On Nov 21, 4:45 pm, Tim Chase wrote: > > When I do in a template I get > id="item_1"> in the rendered html as expected. > > > Now I want to do {% cycle '' ' > class="odd" id="item_{{ product.id }}">' %}, but the desired > > concatenation does not happen. > > > How do I achieve

Template variables and tags confusion... (regarding concatenation)

2009-11-21 Thread chefsmart
Hi, When I do in a template I get in the rendered html as expected. Now I want to do {% cycle '' '' %}, but the desired concatenation does not happen. How do I achieve what I want? Regards. -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: Model design

2009-10-23 Thread chefsmart
I would go with your second solution. On Oct 23, 5:17 pm, Caisys wrote: > Hi, > I have classes for Event, Place and Subplace. Some of the Places are > divided into different Halls (Subplace) and some have only one. I > would like to know how design the relations between the classes. > > 1) Shoul

Re: Passing Parameter to form in inlineformset_factory

2009-10-23 Thread chefsmart
This is coming off untested, but with a couple of tweaks it should work. Try creating a dynamic class. In your views.py, do something like this: - def make_my_form(readonly): class MyForm(forms.ModelForm): def __init__(self, *args, **kwargs): if readOnly: Do stuf

Re: Which apps/solutions are most appropriate for model based search in Django?

2009-10-22 Thread chefsmart
ading through their docs and source. On Oct 22, 3:17 pm, bruno desthuilliers wrote: > On 22 oct, 07:54, chefsmart wrote: > > > > > This is on stackoverflow.com also, but I guess not all Django users > > visit that site so I am posting this here also: - > > > I have a

Which apps/solutions are most appropriate for model based search in Django?

2009-10-21 Thread chefsmart
This is on stackoverflow.com also, but I guess not all Django users visit that site so I am posting this here also: - I have a Django app where most of the search is driven by foreign keys. For example, assuming Student, School, State, and EducationalQualification are Django models, the user woul

Re: Selecting multiple models in the UI, each needs to have unique "order"

2009-10-20 Thread chefsmart
ould use a ModelMultipleChoiceField to allow the user to select all the phases that they want. But how do I allow the user to specify the order of each selected phase in the same "screen/page"? Regards, CM. On Oct 20, 12:29 pm, "Bogdan I. Bursuc" wrote: > chefsmart wrote: > > I

Selecting multiple models in the UI, each needs to have unique "order"

2009-10-20 Thread chefsmart
I have a particular scenario that I can't seem to figure out how to accomplish in Django. I have the following models: - class Process(models.Model): name = models.CharField(max_length=50) is_active = models.BooleanField(db_index=True) class Phase(models.Model): name = models.CharFi

Re: templatetag issue

2009-07-30 Thread chefsmart
I had something like INSTALLED_APPS = ( 'my_django_app',) in my settings.py. I changed it to INSTALLED_APPS = ( 'my_django_project.my_django_app',) and it set things right. On Jul 30, 1:11 pm, Daymien wrote: > Jippii, > I got the solution :-) > > I don't no why this problem only appear with mod

Re: custom template tags and template loaders

2009-07-30 Thread chefsmart
Daymien has a similar issue at http://groups.google.com/group/django-users/t/7b7dad85530eceed Just wanted to link the two discussions. On Jul 30, 12:11 pm, chefsmart wrote: > There is absolutely no difference between my dev and production, only > the database details in the settings.

Re: templatetag issue

2009-07-30 Thread chefsmart
I have a similar discussion running on http://groups.google.com/group/django-users/browse_frm/thread/989c569d5118980d But the workaround I posted in post no. 2 above works for me, I don't know why it didn't for Daymien. @Daymien: - When trying out my workaround, try to comment out 'django.templa

Re: custom template tags and template loaders

2009-07-30 Thread chefsmart
There is absolutely no difference between my dev and production, only the database details in the settings.py are different. The 'django.template.loaders.app_directories.load_template_source' is not included in both my dev as well as my production setups (which is in testing phase now). So since

Re: custom template tags and template loaders

2009-07-29 Thread chefsmart
I got no other custom tags. This is pretty confusing. It works perfectly on the django dev server with no code changes. Don't really know enough about the pre-requisites (settings.py, etc) for using custom templatetags, so haven't progressed much in my troubleshooting. On Jul 29, 9:24 pm, krylat

Re: templatetag issue

2009-07-29 Thread chefsmart
Where is your production setup? Webfaction? VPS? And which version of Django are you using? On Jul 29, 7:12 pm, Daymien wrote: > Your solution don't work for me yet :-( > I have been copy the note_tags.py to django/templatetags/ and > restartet Apache. > But I got the same issue. Is there anyth

Re: custom template tags and template loaders

2009-07-29 Thread chefsmart
I get the following message. Please note that everything is ok in my development setup, but the same thing doesn't work in my production setup. TemplateSyntaxError at /staff/ 'smart_if' is not a valid tag library: Could not load template library from django.templatetags.smart_if, No module name

Re: templatetag issue

2009-07-29 Thread chefsmart
In my case, I have the __init__.py just as I do on my development environment. On Jul 29, 6:46 pm, Greg Fuller wrote: > Are you  missing a __init__.py in the tags directory? > > On Jul 29, 7:57 am, Daymien wrote: > > > Hallo, > > > I created a templatetag, wich I use to display some notes on ad

Re: templatetag issue

2009-07-29 Thread chefsmart
I have a similar issue. I have been stuck on this for too long now. What is happening is that Django is not locating your custom note_tags template tag in your application's templatetag directory, though I don't know why. Try this --- on your production server, copy your note_tags file from your

Re: custom template tags and template loaders

2009-07-29 Thread chefsmart
27;templates' ). > > On Jul 28, 11:23 pm, chefsmart wrote: > > > Is 'django.template.loaders.app_directories.load_template_source' > > required in the TEMPLATE_LOADERS setting for custom template tags to > > work? --~--~-~--~~~---~

custom template tags and template loaders

2009-07-28 Thread chefsmart
Is 'django.template.loaders.app_directories.load_template_source' required in the TEMPLATE_LOADERS setting for custom template tags to work? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To pos

Re: syncdb doesn't updated database after adding null=True to an IntegerField

2009-07-15 Thread chefsmart
>Is syncdb supposed to fully sync the database to the model >definitions? syncdb does not do that. I also often got confused about syncdb, but now I never forget that syncdb currently does not help propagate _modifications_ to models to your database. If you add a new model or delete an existing

Re: Creating a model and related models with Inline formsets

2009-07-11 Thread chefsmart
I had posted this on stackoverflow.com and this got answered there. Follow this link for the solution: - http://stackoverflow.com/questions/1113047/creating-a-model-and-related-models-with-inline-formsets On Jul 11, 1:46 am, chefsmart wrote: > Hi, > > Using the example

Creating a model and related models with Inline formsets

2009-07-10 Thread chefsmart
Hi, Using the example at http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets , I am able to _edit_ objects belonging a particular model (using modelforms). I have been trying to follow the same pattern for _creating_ new objects using inline formsets, but have been unab

Re: syncdb is not doing anything

2009-07-06 Thread chefsmart
tput for > > your db and put it down into the db directly (copy\paste) > > > something like this: > > python manage.py sqlreset yourapp > > > this will drop old tables and create all new ones. Though all data is > > going to be lost. > > syncdb doesn't c

Re: syncdb is not doing anything

2009-07-06 Thread chefsmart
hout any > warning. > Maybe that's also your problem? > Luc > > On 6.07.2009 8:17, chefsmart wrote: > > > Hi, > > > I have been working on an app for some time now. I have been using the > > Django svn trunk. > > > I have a lot of data in the database

syncdb is not doing anything

2009-07-05 Thread chefsmart
Hi, I have been working on an app for some time now. I have been using the Django svn trunk. I have a lot of data in the database. Today I modified a couple of fields and added a couple of fields (date and char fields) to three of my models. No fields have been removed from the original model de

syncdb is not doing anything

2009-07-05 Thread chefsmart
Hi, I have been working on an app for some time now. I have been using the Django svn trunk. I have a lot of data in the database. Today I modified a couple of fields and added a couple of fields (date and char fields) to three of my models. No fields have been removed from the original model de

Re: Receiving information

2009-07-04 Thread chefsmart
Did you try HttpRequest.raw_post_data Regards, CM. On Jul 3, 9:44 pm, Dhruv Adhia wrote: > Hello All, > > I am trying to send information from iPhone to django app through > json. > > I got "Message" json block spitting in the form as below: > >  message json format > >      { >         "Messag

Re: Pyjamas Django Tutorial at Europython09, Monday 29th June.

2009-07-04 Thread chefsmart
Would it be possible to upload your talk to slideshare or suchlike? Or am I asking for too much? Regards, CM. On Jun 20, 7:36 pm, lkcl wrote: > In case you're not already aware I thought I'd mention that there is a > tutorial forpyjamason 29th June at Europython in birmingham.  as > you're djan

Re: inlineformset_factory and modelforms

2009-06-28 Thread chefsmart
thinking along the wrong lines. Regards, CM. On Jun 29, 9:48 am, Alex Gaynor wrote: > On Sun, Jun 28, 2009 at 11:46 PM, chefsmart wrote: > > > Hi Alex, > > > If we take the example from the documentation, let's say I have > > modelforms for both Author and Book

Re: inlineformset_factory and modelforms

2009-06-28 Thread chefsmart
o use the AuthorModelForm also? Regards, CM. On Jun 29, 9:40 am, Alex Gaynor wrote: > On Sun, Jun 28, 2009 at 11:38 PM, chefsmart wrote: > > > If I understand correctly, I can use the form argument to supply a > > modelform. But actually I have custom modelforms for both the mod

Re: inlineformset_factory and modelforms

2009-06-28 Thread chefsmart
If I understand correctly, I can use the form argument to supply a modelform. But actually I have custom modelforms for both the models. So I hoping to be able to use both if possible? Regards, CM. On Jun 29, 9:24 am, Alex Gaynor wrote: > On Sun, Jun 28, 2009 at 11:23 PM, chefsmart wr

inlineformset_factory and modelforms

2009-06-28 Thread chefsmart
Hi, The Django documentation gives the following example for inlineformset_factory: - BookFormSet = inlineformset_factory(Author, Book) This can be found on http://docs.djangoproject.com/en/dev/topics/forms/modelforms/#inline-formsets However, if I have custom modelforms for Author and Book,

Re: Arbitrary HTTP CONNECT attempts on Django dev server

2009-06-28 Thread chefsmart
wrote: > On Sun, Jun 28, 2009 at 9:11 AM, chefsmart wrote: > > > I'm seeing a lot of the following in my Django development server > > window lately: - > > > [28/Jun/2009 18:33:42] "CONNECT mail.burst.idv.tw:25 HTTP/1.0" 500 > > 41555 > > > H

Arbitrary HTTP CONNECT attempts on Django dev server

2009-06-28 Thread chefsmart
I'm seeing a lot of the following in my Django development server window lately: - [28/Jun/2009 18:33:42] "CONNECT mail.burst.idv.tw:25 HTTP/1.0" 500 41555 Has anyone else seen this messages? What is this exactly? Is my computer infected with some malware? I would have been easy if it were a

Different behavior of form = SomeForm(data) and form = SomeForm(initial=data)

2009-06-20 Thread chefsmart
Greetings :) Let's consider the following two models: - class State(models.Model): short_name = models.CharField(max_length=2, unique=True) name = models.CharField(max_length=50, unique=True) is_active = models.BooleanField(db_index=True) def __unicode__(self): return u'%

Re: History timeframe

2009-06-18 Thread chefsmart
I guess Joshua is talking about the Django admin logs. On Jun 19, 12:31 am, Alex Gaynor wrote: > On Thu, Jun 18, 2009 at 2:28 PM, Joshua Russo wrote: > > > > > It appears that history is only kept for about 2 months. Is this > > correct and can you change the length of time history is kept for?

Re: Conditionally bypassing Django form validation

2009-06-18 Thread chefsmart
WHERE name = [name parameter goes here] AND id ! = [primary key parameter goes here] On Jun 19, 12:29 am, chefsmart wrote: > Thank you Daniel, > > That's absolutely what it was. > > So posting all that amount of code was fruitful after all, else we > would have gone back and f

Re: Conditionally bypassing Django form validation

2009-06-18 Thread chefsmart
Thank you Daniel, That's absolutely what it was. So posting all that amount of code was fruitful after all, else we would have gone back and forth trying to find out where the problem lay!! Regards, CM On Jun 19, 12:19 am, Daniel Roseman wrote: > On Jun 18, 8:02 pm, chefsmar

Re: Beginners question: select box with very much options

2009-06-18 Thread chefsmart
Hi, What you are trying to achieve will require you to venture out into deeper web-development waters and learn about JavaScript, which is not related to Django at all. You will need to use Django in conjunction with JavaScript in your templates to get what you want to achieve. Please take a loo

Conditionally bypassing Django form validation

2009-06-18 Thread chefsmart
Hi, [ Please excuse if this post is a little verbose, but I want to present my case thoroughly ] I am using my own form to edit my models instead of using Django admin (because of client compulsions) Let's consider the following model: - class Diploma(models.Model): short_name = models.Cha

Do you know about Django 1.1 current status

2009-04-29 Thread chefsmart
Hi, Am not sure whether Django-users or Django-developers is the better mailing list for this topic? However,... The Django roadmap for 1.1 estimated the release to be around mid- April 2009. That hasn't happened and of course this is because the developers and contributors feel it's not ready

Re: Django Serialization of BooleanField inconsistent?

2009-03-23 Thread chefsmart
so True/False is giving me trouble, but I'm inspecting the xml and replacing True with 1 and False with 0. I was just looking for an explanation for this behavior. Thanks. On Mar 23, 7:16 pm, Karen Tracey wrote: > On Mon, Mar 23, 2009 at 9:47 AM, chefsmart wrote: > > > I

Re: Django Serialization of BooleanField inconsistent?

2009-03-23 Thread chefsmart
6:33 pm, Karen Tracey wrote: > On Mon, Mar 23, 2009 at 2:58 AM, chefsmart wrote: > > I am working on an application that interacts with a Django app > > through Django's xml serialization (using django-rest-interface). > > > All was going ok, when today I got stuc

Django Serialization of BooleanField inconsistent?

2009-03-22 Thread chefsmart
Hi, I am working on an application that interacts with a Django app through Django's xml serialization (using django-rest-interface). All was going ok, when today I got stuck because while Django used to serialize BooleanFields as 1 or 0 today I received True Why did this happen? I am using the

Re: model.save() lifecycle

2009-03-21 Thread chefsmart
9-03-21 at 00:17 -0700, chefsmart wrote: > > [...] > > > After calling save() on the model, we see that "Now it has an ID". > > > So Django is doing an SQL select query, something like last_insert_id, > > if I'm not wrong? > > That's correc

model.save() lifecycle

2009-03-21 Thread chefsmart
The Django tutorial says in Part 1: [_Begin Quote_] # Create a new Poll. >>> import datetime >>> p = Poll(question="What's up?", pub_date=datetime.datetime.now()) # Save the object into the database. You have to call save() explicitly. >>> p.save() # Now it has an ID. Note that this might say "

Re: Receiving xml via HTTP POST

2008-12-01 Thread chefsmart
Daniel Roseman suggests a very simple and easy to implement solution. Malcolm Tredinnick explained the usage of request.POST and request.raw_post_data. I think I would like to keep it pure and go towards implementing django views that will access and process request.raw_post_data. The AIR app will

Re: Receiving xml via HTTP POST

2008-11-29 Thread chefsmart
Can someone throw a few ideas at me regarding this please... I'm sure seasoned Django-ists could have really good ideas about this... Thanks. On Nov 22, 10:06 pm, chefsmart <[EMAIL PROTECTED]> wrote: > Hi All, > > I am creating an Adobe AIR application that will interact wit

Receiving xml via HTTP POST

2008-11-22 Thread chefsmart
Hi All, I am creating an Adobe AIR application that will interact with my Django app. I am currently trying out django-rest-interface that can be found on googlecode. However, there's too much behind-the-scenes stuff django-rest-interface (for the little amount of knowledge I have) and I need mor

Re: disable admin log

2008-08-25 Thread chefsmart
Thanks Malcolm. On Aug 25, 9:14 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-08-25 at 09:12 -0700,chefsmartwrote: > > Can someone in the know please confirm the existence or otherwise of > > an option to disable logging in admin? > > Such an option does not exist. > > Regards,

Re: help implementing search in django

2008-08-25 Thread chefsmart
first thing I would do is look at the > Django Admin code and see how it was done there. > > Steve > > On Aug 25, 1:15 pm, chefsmart <[EMAIL PROTECTED]> wrote: > > > Please seehttp://dpaste.com/hold/73759/Ineed some guidance > > implementing search feature in d

help implementing search in django

2008-08-25 Thread chefsmart
Please see http://dpaste.com/hold/73759/ I need some guidance implementing search feature in django. What I want to do is to be able to search for Regions. Let's suppose we have: - A page where the user will be able to specify (a) one or multiple states from a list, (b) one user to match with "c

Re: disable admin log

2008-08-25 Thread chefsmart
Can someone in the know please confirm the existence or otherwise of an option to disable logging in admin? On Aug 14, 12:52 pm, chefsmart <[EMAIL PROTECTED]> wrote: > In my case I don't require the admi log. To save trips to the database > server, is there a way to disable

return django models using custom sql

2008-08-25 Thread chefsmart
I found a solution called djselect on this group. But is there a django-istic way of running custom sql queries and returning the results as django models? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users

Re: pluggable django ticketing app?

2008-07-07 Thread chefsmart
May I know how you found out about this software? On Jul 7, 9:12 pm, "Nikolay Panov" <[EMAIL PROTECTED]> wrote: > At the moment I trying to adapthttp://www.jutdahelpdesk.com/for ours project. > > Regards, >  Nikolay. > > On Sun, Jul 6, 2008 at 09:05, c

Re: pluggable django ticketing app?

2008-07-07 Thread chefsmart
Those are some good recommendations. Thanks. Currently checking out these suggestions. On Jul 6, 10:05 am, chefsmart <[EMAIL PROTECTED]> wrote: > Does anyone know of a pluggable django ticketing app? Something like > the apps used by webhosts for on

Re: Django based CMS

2008-07-06 Thread chefsmart
More cms and other apps are listed on http://djangoplugables.com/ On Jul 6, 1:45 pm, MiloZ <[EMAIL PROTECTED]> wrote: > If you are searching for a simple cms, you can try > this:http://code.google.com/p/django-simplecms/ > > On Jul 5, 1:09 pm, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > > >

Re: customizing or extending ModelForm

2008-07-06 Thread chefsmart
ike the form already exists when __init__ is executed. On Jul 3, 9:42 pm, chefsmart <[EMAIL PROTECTED]> wrote: > Thanks for the tip. I'm guessing this is for the newforms-admin or at > least the svn trunk. I'm not adding the extra field to the model > because it doesn't

pluggable django ticketing app?

2008-07-05 Thread chefsmart
Does anyone know of a pluggable django ticketing app? Something like the apps used by webhosts for online support? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send emai

Re: custom form with admin look and feel

2008-07-05 Thread chefsmart
Khan <[EMAIL PROTECTED]> wrote: > chefsmart wrote: > > I'm using django svn trunk. I have created several custom forms that > > show up in theadminsection of the website. However, these formslook > > nothing like theadminforms. I tried extending change_form.html >

Re: customizing or extending ModelForm

2008-07-03 Thread chefsmart
ModelForm.  One question, however: why don't you add this field to > your model? > > On Jul 3, 4:56 am, chefsmart <[EMAIL PROTECTED]> wrote: > > > Please see the following dpaste code.http://dpaste.com/60529/ > > > There i

customizing or extending ModelForm

2008-07-03 Thread chefsmart
Please see the following dpaste code. http://dpaste.com/60529/ There is a model, with a ModelForm. The ModelForm has a "short_name" field that is not part of the model. Is this even possible/legal? --~--~-~--~~~---~--~~ You received this message because you are

http://code.djangoproject.com/wiki/CookBookNewformsAdminAndUser

2008-07-02 Thread chefsmart
With new commits, I guess this has become a little outdated. Or am I wrong? Is there some new code required to achieve this? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

  1   2   >