confusion using defer() or only()

2009-06-17 Thread felix
Django 1.1 rev 11018 stores = ReleaseStoreLink.objects.filter(release=self) \ .select_related('store','store__contact') \ .only('url','store__name','store__contact__url') ss = stores[0] ReleaseStoreLink has a method logo, it is not a db field when using t

Re: error: unsupported operand type(s) for *: 'Decimal' and 'float'

2010-06-10 Thread felix
use float( form.cleaned_data['a'] ) etc also, when retreiving the field from the db it will be a Decimal object and needs to be converted to do math with it on_sale = float(myObj.price) * 0.9 On Jun 10, 9:22 pm, Waleria wrote: > Hello.. > > I again.now my problem is: > > I have the fu

occasional: 'ManagementForm data is missing or has been tampered with'

2010-06-10 Thread felix
When using admin inline forms I am occasionally getting these odd errors, the vast majority of them from a single user. The POST is missing many fields (including the management form ones) and one of the fields (description) is even cut off in the middle ! POST:Call Howard at xxx-xxx- for sh

Re: ManyToMany autocomplete field and large amounts of autocomplete data

2010-06-11 Thread felix
http://code.google.com/p/django-ajax-selects/ satisfies all requirements the channels will allow even finer customization for the queries and the display. On Jun 11, 12:01 pm, akaariai wrote: > Hello all, > > I am looking for an m2m autocomplete field which should have the > following charact

IntegrityError exception not caught by Django

2010-06-13 Thread felix
In the process of serving a view I am saving a record that an incoming URL specified a tracking ID. One of the URLs got mangled by somebody somewhere resulting in it being decoded as a non-existent user ID. # I would expect this to throw an integrity error tracking.save() but it doesn't

Re: IntegrityError exception not caught by Django

2010-06-13 Thread felix
brilliant, you are correct: Foreign-key constraints: "traffic_tracking2010_content_type_id_fkey" FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED "traffic_tracking2010_src_content_type_id_fkey" FOREIGN KEY (src_content_type_id) REFERENCES djan

Re: IntegrityError exception not caught by Django

2010-06-14 Thread felix
thanks again anssi, stellar reply I might do this below. the tracking is the last thing to happen before rendering, so there are no more UPDATE or INSERTS and in most cases views that use tracking don't do anything but select anyway but OTOH I'm already running rabbit and celery so I might mess

Admin with only inlines, no fields

2010-06-29 Thread felix
I need to present an admin form that has no fields from the model and only offers admin inlines. class AptTranslationForm(DefaultModelForm): class Meta: model = AptTranslation class AptTranslationsAdmin(models.Admin): inlines = [AptTranslation_Inline,] fields = [] the e

Re: Admin with only inlines, no fields

2010-06-29 Thread felix
s not validated and see what are the errors. > > Atenciosamente, > Vinicius Mendes > Solucione Sistemas > vinic...@solucione.info > > > > On Tue, Jun 29, 2010 at 12:14 PM, felix wrote: > > > I need to present an admin form that has no fields from the model and > &

Re: After sync signal?

2010-07-02 Thread felix
you might have already seen this ticket: http://code.djangoproject.com/ticket/7561 re: post-sync isn't actually post sync you could patch your deployed version of django of course I would just use a standalone script or command that you run after syncing. if you can On Jul 1, 5:34 pm, Jari

Speed of django dev server start up

2010-09-07 Thread felix
Does anybody know of any tricks or patches for working with the development server that could speed up its startup time ? Currently if your site is large and has many modules, models, admins, forms etc then django development time slows down dramatically. I'm thinking that the models don't need t

process memory swelling during uploads

2010-09-20 Thread felix
I'm running Nginx front end proxying to Apache with mod_wsgi in Daemon mode. When uploading files the apache/django process is occasionally swelling up as though it were loading the whole file into memory. I've even removed the MemoryFileUploadHandler from the file upload handlers just to be sure

Re: process memory swelling during uploads

2010-09-20 Thread felix
appears to correctly only load the first 32768 Or MP3Info Maybe a specific broken file caused it to trust the headers and read it in Still, any advice on nginx/apache cooperation greatly appreciated On Sep 20, 10:10 pm, felix wrote: > I'm running Nginx front end proxying to Apache with

Re: Django 1.2.1. admin WYSIWYG editor

2010-09-21 Thread felix
I got sick of TinyMCE and switched to jQuery wysiwyg sorry this is just posted raw like this, but here it is. I should wrap it up on github. requires http://code.google.com/p/jwysiwyg/ and the 3 files stated below to be in your compress stack or on your page from django import forms from dja

Strategies for larger site development

2010-09-29 Thread felix
Once django projects get large and sites have many features, many models, modules and apps then dev server restart time becomes a huge problem. Compile/Run cycle with C++ or Objective C is significantly faster than just correcting one typo in Django source and trying to get the server to restart.

bizarre __iexact behavior

2010-09-29 Thread felix
class KeywordPage(models.Model): url = models.CharField(blank=False, max_length=100,unique=True) ipdb> KeywordPage.objects.filter(url__iexact='/path/to/something/') *** IndexError: list index out of range ipdb> KeywordPage.objects.filter(url__iexact='/path/to/something') *** ValueError: li

django bug with __iexact

2010-11-24 Thread felix
from django.contrib.auth.models import * User.objects.filter(username__iexact="/turtle") *** ValueError: list.index(x): x not in list URL: http://code.djangoproject.com/svn/django/trunk Repository Root: http://code.djangoproject.com/svn Repository UUID: bcc190cf-cafb-0310-a4f2-bffc1f526a37 Revi

django ticket tracking

2010-11-24 Thread felix
The django ticket system regards everything as spam. There doesn't seem to be a way to get a password reset. I created a new account, verified it, but the username/password or the email/password still do not work to login. anybody have any advice as to what to do now ? -- You received this mes

specifying the pk for an insert

2010-02-08 Thread felix
Hello - I'm migrating a large site (mysql/php to postgres/django) and would like to keep the primary ID of one of the tables. The id is public as in people call other people on the phone and say "hey what about that #9843 ?" all the code already refers to the ID for URLs etc. I'm thinking that

Re: specifying the pk for an insert

2010-02-08 Thread felix
well I'll be damned, it worked usage: apt = Apt() # old is coming via multi-db connection to mysql # apt is saved in postgres apt.id = old.id # the seq name is {app}_{model}_id_seq legacy_save(apt,'nsproperties_apt_id_seq') # after all apts are imported then set the seq correctly: set_max_seq

how to get as_sql() to work again

2010-02-21 Thread felix
As of 1.2 and multi-db how do I get the sql that will be produced from a query set ? Since 1.2 and multi-db, the previous methods are no longer working. Its been said here that we shouldn't depend on internal functions as they may change. However getting the SQL that will be produced is essential

apparent bug in QuerySet

2010-02-21 Thread felix
This seems so blatant that it couldn't really be a bug without someone noticing. Django 1.2 qs = Apt.objects.filter(list_on_web=True,is_available=True) # FastAdderStatus has Apt and Service as fk qs = qs.filter(fastadderstatus__service=self.service) # later on h

Re: how to get as_sql() to work again

2010-02-21 Thread felix
from django.db import connections def dbug(): pdb.set_trace() def qbug(qs,caption=""): connection = connections['default'] aa,bb=qs._as_sql(connection) print caption, aa % bb return qs -- You received this message because you are subscribed to the Google Groups "Django us

Re: how to get as_sql() to work again

2010-02-22 Thread felix
On Feb 22, 9:22 am, Russell Keith-Magee wrote: > > However getting the SQL that will be produced is essential.  There > > needs to be a utility method somewhere that will give us this sql and > > it needs to remain stable. > > Well, no -- it isn't essential. It might be a very handy debugging >

Re: how to get as_sql() to work again

2010-02-22 Thread felix
On Feb 23, 12:32 am, Russell Keith-Magee wrote: > To reinforce my point - if you're using Django's ORM, you shouldn't > have to care about the underlying query. The ORM *should* be > abstracting these details so that you don't care. I realize that > inspecting query internals can be useful in p

import errors when starting django on staging server, no errors on local dev server

2010-03-07 Thread felix
I have two identical django deployments and one of them (the beta staging server) is having import errors on startup and is failing. 1. is something causing the deployments to be loading classes in different orders ? the directory structure is identical, the pythonpaths are in an identical order

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-08 Thread felix
On Mar 8, 1:25 am, Graham Dumpleton wrote: > You don't say anything about what hosting mechanisms you are using for > each. local: django's runserver staging: mod_wsgi apache one thing I should do is test locally using wsgi Do you have any suggestions regarding question 2: how can I do a qui

Re: import errors when starting django on staging server, no errors on local dev server

2010-03-08 Thread felix
thanks for the offer, but as I said : the problem is long since solved. it was a circular import problem. I reworked the imports and its gone. my question was: how could it have happened on the staging server and not on the dev server ? I was just asking around to see if anybody had seen that

Re: Extending a custom built API

2010-03-08 Thread felix
you are already basically there id = request.GET.get('id') if id: ids = id.split(',') slideshows = slideshow.objects.filter(id__in=ids) then returns that as json however you like On Mar 8, 11:41 pm, Nick wrote: > I am working on an api that outputs a list of JSON based on certain > crite

Re: send_mass_mail()

2010-03-10 Thread felix
I have a site that sends 40k in a day. take a look at http://code.google.com/p/django-mailer/ I'm using that, though I've now modified it and not had a chance to release my version. mails are put into a queue and the queue is fed by a background daemon loop I've added html support and actually

Re: Multi Queryset one Paginator

2010-03-10 Thread felix
post the code that chains them together probably the problem is that paginator needs to slice the query set, and the chain you have isn't capable of doing that. either write a fancier chain that can count the length of both queries and then figure out how it has to slice them or do it in the vi

Re: How to make django use a different python interpreter located at some random location.

2010-03-11 Thread felix
also checkout buildout which does a similar thing to virtualenv but also allows you to specify the exact interpreter and all dependencies / eggs / apps and installs those. it makes development very portable since you can quickly set up the exact same environment (including a specific python inter

Re: Exception Value: No module named urls

2010-03-11 Thread felix
its an ImportError which means that it couldn't find your main urls.py or possibly a sub urls that you are including. check your python paths you need to include the folder ABOVE the module you are addressing eg. folder app urls.py models.py folder needs to be on the python

Re: upload is working, but how to store the path in the imagefield?

2008-06-18 Thread felix
sorry, I can't quite help you. I'm not able to get ImageField to work at all. you say save_FOO_field(filename, raw_contents) it looks like the this method is magically added to the model, right ? or must we implement this ?it sounds like you were trying to implement this. did you ever ge

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-19 Thread felix
I second that. I've just spent the day quite happily refactoring my app to use nifty model inheritance ... and the admin doesn't work. whoops. I think this should be stated in the docs for sure. On Jun 2, 4:44 pm, ekellner <[EMAIL PROTECTED]> wrote: > Is newforms-admin any closer to being m

Re: model inheritance and admin (qs-rf & nf-a)

2008-06-21 Thread felix
ng. but its well worth it. nice job guys ! On 19 Jun., 22:01, felix <[EMAIL PROTECTED]> wrote: > I second that.  I've just spent the day quite happily refactoring my > app to use niftymodelinheritance... and the admin doesn't work. > whoops. > > I think th

ModelInheritance : how to do isinstance() on a parent class object

2008-06-28 Thread felix
Contact Company(Contact) Person(Contact) If I have a Contact it might be a Person or a Company and I'm looking for the best way to find out. Especially in cases where I'm listing these objects, doing a separate trial and error database query (as I show below) isn't the best solution. Actually i

Re: ModelInheritance : how to do isinstance() on a parent class object

2008-06-29 Thread felix
On Jun 29, 1:28 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Actually it might be nice if the top parent class table had a > > content_type field (or similar to avoid coupling to > > contrib.contenttypes) so we could easily deduce the leaf class. > > ...The reason is that it > breaks inhe

Re: ModelInheritance : how to do isinstance() on a parent class object

2008-06-29 Thread felix
content_type = self.content_type model = content_type.model_class() if(model == Contact): #actually we could also check if self is not Contact that throw a shit-out-of-wack error return self return model.o

Re: tweaking auth, making usernames unique within a company

2008-07-07 Thread felix
do you mean that you want someone to be able to have a duplicate username as long as they are at a different company ? if so, why ? maybe that requirement should just be worked around. but there is certainly a way to do it without hacking User. -f;lix On Jul 7, 4:58 pm, brydon <[EMAIL PROT

common problem: set author, update date on save

2008-07-07 Thread felix
I'm using newforms-admin This is a very common situation: on saving a Post wish to set the author to be request.user wish to set created_on and updated_on perhaps wish to set request ip address but it is actually the form object that does the saving. but IMO none of these things are on the for

Re: django-admin not seeing settings.py

2005-11-10 Thread felix
> On 11/7/05, Waylan Limberg <[EMAIL PROTECTED]> wrote: > > On 11/7/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > > Django isn't finding your settings.py file. It's falling back to > > > "postgresql" because that's the default fallback (according to the > > > file django/conf/global_settings

Re: django-admin not seeing settings.py

2005-11-10 Thread felix
ok mine is working now. do this: export DJANGO_SETTINGS_MODULE=myproject.settings and thereafter all the django-admin.py commands work correctly.

Re: django-admin not seeing settings.py

2005-11-16 Thread felix
Well the docs say that you COULD set it in order to avoid tedious typing. But since I was just doing a test I wouldn't bother to do that. The issue seems to be that django-admin isn't recognizing a settings passed in as : --setting=myproject.settings Now I'm doing this again with a new project

Re: django-admin not seeing settings.py

2005-11-16 Thread felix
and note that the PYTHON_PATH should specify the *parent* directory of your project. I just tried it again with DJANGO_SETTINGS_MODULE **not** exported and passing in django-admin.py --settings=myproject.settings that does not work, you have to set/export DJANGO_SETTINGS_MODULE thanks

Re: possible bug in joining on a geo field

2010-12-18 Thread felix
I have discovered the exact same issue. class Apt(Model): geo = models.PointField(srid=4326,editable=False,default=Point(0,0)) bldg = models.ForeignKey(Bldg,null=True) class AptStatus(Model): apt = models.ForeignKey(Apt) class DP_5cbc61d6(Model): apt = models.Fo

Re: possible bug in joining on a geo field

2010-12-19 Thread felix
ah no, now I get it: geo queries requires a GeoManager. so even though the starting class does not have gis fields, it needs a GeoManager in order to build queries addressing fields on the other model. I'm not sure what should happen, the error messaging is very misleading, but once you know t

Re: Need HELP urgently

2011-01-13 Thread felix
django ajax select will work (jQuery): http://code.google.com/p/django-ajax-selects/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send ema

Re: django deployment in a virtual machine.

2015-02-25 Thread felix
th/to/mysite.com/mysite/wsgi.py WSGIPythonPath /path/to/mysite.com Require all granted Cheers, Felix. -- 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 e

Re: icons let the template or resolve in the view?

2015-03-03 Thread felix
d for instance. If you have icons representing groups of computers then you could also use CHOICES in the model or even use an If tag in the template. Views process the info you will show on templates, being the latest in charge of how to display it. Cheers, Felix. -- You received this me

Re: icons let the template or resolve in the view?

2015-03-03 Thread felix
El 03/03/15 13:54, dk escribió: right now I am not using models, form the database, as concept I am pinging the computer, and making a list of lists with the ip and if the machines is up or down, like this. this is what I am passing to the template. [ [up, machine1],[up, machine2],[down, ma

Re: what do you think about django FORM system?

2015-03-06 Thread felix
El 06/03/15 05:37, younger.shen escribió: Hello everyone: i use django since last year, and now i can not stand the django form any more, hard to use , especially custom error message , i use laravel for php development , and validator of laravel is very easy to use and very clean code , so i

Re: what do you think about django FORM system?

2015-03-06 Thread felix
El 06/03/15 09:38, john escribió: I can tell you what I found to be hard to understand (and I don't think I do understand at the moment) that is how to set the HTML, the types, ID, and any of the special attributes of the object. I understand that I can sub-class but it's also my understanding

Re: what do you think about django FORM system?

2015-03-06 Thread felix
mentForm(forms.Form): name = forms.CharField(widget=forms.TextInput(attrs={'class': 'special'})) url = forms.URLField() comment = forms.CharField(widget=forms.TextInput(attrs={'size': '40'})) Cheers, Felix. -- You received this message

Re: what do you think about django FORM system?

2015-03-06 Thread felix
ttrs={'size': '40'})) I wasn't using the size attribute at all but when I tried, it was displayed with a different size every time I changed the size. Felix -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: FORM: How to specify current user as value for a form ForeignKey referencing logged on user

2015-03-09 Thread felix
El 08/03/15 14:40, Ryan Alexander escribió: Hey there, This seems like something that should be simple to do but I'm having a heck of a time with it and google searches don't reference anything that's helping me out. I have a form that a user fills out, and it creates a db row based on the

Re: fake button run a view and come back to the same page.

2015-03-10 Thread felix
El 10/03/15 15:46, dk escribió: UHH redirect sounds easy.. yami yami. Felix how does the ajax works? I am assuming is a library of javascripts? and ajax can lunch the python code? ajax = Asynchronous Javascript And XML It means you can update part of a page without reloading

Re: fake button run a view and come back to the same page.

2015-03-12 Thread felix
El 10/03/15 13:11, dk escribió: I been trying to find information on how to make a button to run a python script in the back. I do have a table with some buttons, and I want to click in one, and behind doors, will run a python script. since I don't know to much javascript or flask, or php I d

how to access manager from a model instance?

2015-03-25 Thread felix
Yes I know I can't acces the Manager from a model instance, but I need to check the value of a field saved in the database before updating it. Can I do it from the Model clean() method? Felix. -- You received this message because you are subscribed to the Google Groups "Django us

Re: how to access manager from a model instance?

2015-03-26 Thread felix
El 26/03/15 11:19, Erik Cederstrand escribió: Den 25/03/2015 kl. 20.20 skrev felix : Yes I know I can't acces the Manager from a model instance, but I need to check the value of a field saved in the database before updating it. Can I do it from the Model clean() method? Depending on

Re: treemenus treemenu or sitetree

2015-04-16 Thread felix
El 16/04/15 15:27, Joris Benschop escribió: Hi List I'm currently using django-treemenus to show a site menu, but now that Im migrating to 1.8, Im getting imcompatibility bugs. What modules do you use to display link menus in your site? I found sitetree and treemenu but they are not mentioned

Re: Create models table from exists database?

2015-04-21 Thread felix
El 21/04/15 03:15, Dario Concilio escribió: Hi to all! I'm new of django, I've a question for you: Can I create a new project using an exists database? I've a domotic system on Ubuntu Server, with a Postgres database that has several table. Actually the system uses a table by a python servic

Re: ListView CBV and a form

2015-04-24 Thread felix
urn context I think that you shoul use CreateView to create new objects or UpdateView to update them. ListView is used to represent a list of objects. Cheers, Felix. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Database and migrations are out of sync.

2015-04-24 Thread felix
El 24/04/15 12:16, Tim Graham escribió: I don't think so. When you create your initial migrations, you need to ensure they match the scheme of your database. After that, things shouldn't get out of sync. Any idea how that happened in the first place? On Friday, April 24, 2015 at 8:54:19 AM UTC

Re: Microsoft SQL Server and Azure SQL Database support

2015-05-21 Thread felix
El 20/05/15 14:39, Meet Bhagdev escribió: When I last checked the Django ORM did not have official support for SQL Server and Azure SQL DB. Is there a way to use SQL Server and more importantly Azure SQL DB by modifying the DATABASES configuration in settings.py Try django-pyodbc. On Linux

Re: Command line script > Ensure that its module, "models", is located inside an installed app. error

2015-06-08 Thread felix
Oscar I'm a newbie. I guess that *args, **options will keep your script working no matter how many positional or keyword arguments your command or the base command may have in the future. Cheers, Felix. -- You received this message because you are subscribed to the Google Groups

Re: How to DRY, define a set of model-fields and reuse them as multiple instances

2015-06-10 Thread felix
El 10/06/15 12:33, ThomasTheDjangoFan escribió: Hi Bruno, Abstract Base Models come close but they don't allow me to combine multiple instances of the BaseModel in the DataHolderModel. My goal is to store them all in one table without having to manually add all the fields. Any suggestions?

Re: Two Things: (1)-ModelChoiceField with a searchbox and (2)-Related Dropboxes

2015-07-15 Thread felix
nd then de model, it could be wrong (i.e. the user could choose Samsung and then 6S, and 6S is not a cellphone model of Samsung). I'm a newbie and I guess that you need to use AJAX to accomplish these tasks. A javascript library, or framework like AngularJS could be useful here. Cheers,

Re: Regarding Learning Django with collaboration

2015-07-17 Thread felix
*From: * Ben Thompson *Sender: * django-users@googlegroups.com *Date: *Fri, 17 Jul 2015 09:20:49 -0700 (PDT) *To: * *ReplyTo: * django-users@googlegroups.com *Subject: *Re: Regarding Learning Django with collaboration I have a small group myself that I have been looking to expand. At the moment

Re: About models validators location

2015-07-29 Thread felix
El 29/07/15 10:54, duriromp...@gmail.com escribió: I've searched for where to put the validators for my models, but I only found that they fit in *models.py*, outside the model class. Is that correct or I should create a specific file for them? I think that you can put validators in another fil

Re: About multiple GET params persistance between requests

2015-08-03 Thread felix
El 03/08/15 09:42, duriromp...@gmail.com escribió: I'm in a point of my app where I've two GET params, *p* and *q* (pagination and query search), and I think that the best method to remember the params value when you change page is to use a string to manually build up the params URL. Any ideas?

Problem with date validator

2015-09-23 Thread felix
(debian 7) is using US/Eastern timezone. and right now: root@webapp:~# date Wed Sep 23 17:04:36 EDT 2015 Thanks in advance, Felix. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving email

Re: Problem with date validator

2015-09-24 Thread felix
El 23/09/15 17:12, felix escribió: When today's date is entered in the form it shows a form error saying that this date (today) is in the future. What is wrong with the validator I'm using to allow dates until today? models.py ... import datetime ... class SolicitudBase(mo

Re: Problem with date validator

2015-11-02 Thread felix
El 24/09/15 15:18, felix escribió: El 23/09/15 17:12, felix escribió: When today's date is entered in the form it shows a form error saying that this date (today) is in the future. What is wrong with the validator I'm using to allow dates until today? models.py ... impor

Re: urlencode in Django

2010-08-30 Thread Felix Dreissig
The urlquote() function from django.utils.http and the "urlencode" template filter might be exactly what you're looking for. Regards, Felix refreegrata schrieb: Hello lista, I'm a newbie in django. In php i have the urlencode function for encoding an url with c

Regrouping forms in formsets

2010-09-03 Thread Felix H.
and 'faking' a formset in html in the template, but both of these are not really nice solutions) I'd be very grateful for any hints on how to solve this -- your help is much appreciated. Thanks! -Felix ___ WEB.DE DSL SOM

Re: Regrouping forms in formsets

2010-09-04 Thread Felix H.
{% regroup formset.forms by instance.attribute as forms_by_attribute %} {# ... looping over the regrouped list, as usual ... #} With this, the regrouping of forms works wonderfully. I hope this helps someone, someday :-) -Felix -- You received this message because you are subscribed to the Goo

Re: Change variable value after a click

2010-09-10 Thread Felix Dreissig
It's definitely a good idea to gain some AJAX experience first, but on how to integrate it with Django: You'll have to write a special view to retrieve the additional elements to be displayed on the page. That's "how to do it" in general, hope it'll help you a bit

Re: JavaScript with Dango

2010-09-26 Thread Felix Dreissig
Yep, sure you can use AJAX/Javascript in Django projects. http://www.b-list.org/weblog/2006/jul/02/django-and-ajax/ might be a good read. Regards, Felix On 26.09.2010 13:48, aug dawg wrote: > Does Django work with JavaScript? If so, how can I use JavaScript in my > Django pr

Re: View to edit many-to-many relationship with extra fields

2010-10-02 Thread Felix Dreissig
I'm not at all sure that this might help youm, so sorry if I write BS... Can't you just use form prefixes to kepp the form namespaces seperated? http://docs.djangoproject.com/en/1.2/ref/forms/api/#prefixes-for-forms Regards, Felix On 01.10.2010 22:22, ses1984 wro

Re: Import csv file in admin

2010-10-30 Thread Felix Dreissig
orarily or just keep it as a file object and then process it as Jirka pointed out. Regards, Felix On 29.10.2010 18:31, Jorge wrote: > Jirka > > I need an easy method inside the admin to upload the csv file with an > web interface. I guess with your method the admin will need access t

Nested Inlines, dynamic forms, templates and all sorts of problems.

2007-10-09 Thread Felix Ingram
similar then I'd appreciate any advice. Any thoughts or ideas would also be gratefully received. Regards, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group

Re: What IDE do you use? (semi-OT)

2006-10-09 Thread Felix Ingram
t that's because I wrote it. http://www.vim.org/scripts/script.php?script_id=1318 There's tips for it on the django wiki: http://code.djangoproject.com/wiki/UsingVimWithDjango > I am looking into the python controlled window manager though, perhaps > that would be even quic

Re: Django Project Manager for Vim

2006-10-10 Thread Felix Ingram
_init__.py files and any other files not needed. * Add new apps to INSTALLED_APPS (?) * Allow the dev server to be run in a scratch buffer. Just some ideas. Anyone looking at this should check out the CreateEntriesFromDir() function in Project and the system() function from Vim. I'd be intere

Re: Retrieve Password

2006-11-30 Thread Felix Ingram
by a few trusted users who's passwords are used to encrypt data then password resetting is a very bad idea. If you're setting up your own online bank and using third party hosting for your database servers then yes, maybe you should hash your users' passwords. Just a thought. Felix -

Re: Re: Retrieve Password

2006-11-30 Thread Felix Ingram
f doing things. 'Common' things, now they're fine. :-) Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.co

Newforms: Form inheritence

2006-12-29 Thread Felix Ingram
eld() The AdminForm would have all the fields from JoUserForm plus the BooleanField. Any ideas? I couldn't find anything in the archives. Another thing: is it still the plan for ValidationWarnings to be added to newforms? Regards, Felix --~--~-~--~~~---~--~---

Re: [Django-users] how about a subject prefix???

2007-01-03 Thread Felix Ingram
ses-with-gmail-199280.php http://www.lifehacker.com/software/top/instant-disposable-gmail-addresses-144397.php Regards, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

FormGen Script

2007-01-04 Thread Felix Ingram
7;ve found it useful for when I need to tweak a couple of fields (which isn't easy without defining the whole form). Enjoy, Felix --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&qu

Re: FormGen Script

2007-01-04 Thread Felix Ingram
On 04/01/07, Adrian Holovaty <[EMAIL PROTECTED]> wrote: On 1/4/07, Felix Ingram <[EMAIL PROTECTED]> wrote: > ScaffoldScript is dead; long live FormGen! > Using this script: http://code.djangoproject.com/wiki/FormGenScript > in this manner: python formGen.py -a MyApp -

Newforms 'preferred practice'

2007-01-12 Thread Felix Ingram
x27;d like the form to handle editing of an instance. I could construct a dictionary of values and pass it to the form as per the docs but I'd like to just pass a model instance and have the form sort things out. Is this advisable? If so then does anyone have any pointers about what methods I ne

Re: Newforms 'preferred practice'

2007-01-12 Thread Felix Ingram
Hi Honza, On 12/01/07, Honza Král <[EMAIL PROTECTED]> wrote: > On 1/12/07, Felix Ingram <[EMAIL PROTECTED]> wrote: > > > > Hello all, > > > > I've been playing around with the newforms library and I'd like to > > check that I'm on the r

Re: Newforms 'preferred practice'

2007-01-12 Thread Felix Ingram
Hi Chris, On 12/01/07, Chris Rose <[EMAIL PROTECTED]> wrote: > Felix Ingram wrote: > > 3. Binding data - I'd like the form to handle editing of an instance. > > I could construct a dictionary of values and pass it to the form as > > per the docs but I'd l

Q()s, m2ms and failing queries

2007-01-16 Thread Felix Ingram
ls to produce anything and I get no results. If an Article has a Picture then results are returned even if the term only matches on authors__name. Is there something I'm missing? Any pointers or suggestions welcome. Regards, Felix --~--~-~--~~~---~--~~ You

Re: Newforms practice (common situation)

2007-01-18 Thread Felix Ingram
Hi Robert, On 18/01/07, Robert <[EMAIL PROTECTED]> wrote: I know newforms are still in development, but maybe there are known practiced on how to manage custom Form. Let's say there's a model: ITEM_TYPE_CHOICES = ( ('new','new'), ('used','

Re: Q()s, m2ms and failing queries

2007-01-24 Thread Felix Ingram
Quick reply to myself in case someone is looking through the archives. This seems to be covered in ticket 1801: http://code.djangoproject.com/ticket/1801 It's noted as a 'hard bug'. On 16/01/07, Felix Ingram <[EMAIL PROTECTED]> wrote: > Hello all, > > I've ru

Re: Newforms dynamic fields (good to know)

2007-01-25 Thread Felix Ingram
# etc. > >> > >>>>> # No form data as we are viewing the objects. > >>>>> form1 = DaForm(obj1, prefix='obj1') > >>>>> form2 = DaForm(obj2, prefix='obj2') I'm curious about this method. How do you use th

Re: Password Generator

2006-07-12 Thread Felix Ingram
On 7/12/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Wed, 2006-07-12 at 03:18 +, Scott McCracken wrote: > > I also ran into this problem when trying to create new users in the > > Django admin interface. According to the Django documentation "We've > > added extra security to the s

Re: Password Generator

2006-07-12 Thread Felix Ingram
On 7/12/06, Felix Ingram <[EMAIL PROTECTED]> wrote: > On 7/12/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > So whack the following into a script or type it into a interactive session > > import sha, random > raw_password = script though)> > a

Re: Password Generator

2006-07-12 Thread Felix Ingram
On 7/12/06, Jyrki Pulliainen <[EMAIL PROTECTED]> wrote: > > On 7/12/06, Felix Ingram <[EMAIL PROTECTED]> wrote: > > > salt = sha.new(str(random.random())).hexdigest()[:5] > > Dunno is this really a developer question, but is there really a point > using sha t

<    1   2   3   >