Custom form/formset for edit inline

2008-10-12 Thread Emil
use a formset created through inlineformset_factory, and, in creating that, pointing to a custom ModelForm... //emil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: Custom form/formset for edit inline

2008-10-13 Thread Emil
t try limiting the fields), but still no change, no errors, just the same form. Anyone have any more help/tips? I'm trying to get a grip on this stuff, read the docs a bunch of times, but it's still a bit confusing and not doing what I hoped it would... I think I've been staring myself bl

full media_url in db

2008-01-04 Thread Emil
th without the domain (like "/media/" instead of "http://example.com/media/";), right? /emil --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email t

Getting specific related objects via URL variable

2008-01-04 Thread Emil
filtering out, and assigning a template variable for, the main image from that parameter? It feels like there should be some fairly simple solution here, but I can't seem to come up with anything... //emil --~--~-~--~~~---~--~~ You received this message because you

Re: full media_url in db

2008-01-04 Thread Emil
Thanks Marty, at least now I know why it's happening. :-) //emil On 4 Jan, 21:35, "Marty Alchin" <[EMAIL PROTECTED]> wrote: > On Jan 4, 2008 3:23 PM, Emil <[EMAIL PROTECTED]> wrote: > > > > > Hi people, > > > I'm working on a project wh

Re: Getting specific related objects via URL variable

2008-01-04 Thread Emil
so how do I then "attach" each main image to each product so to speak? //emil On 4 Jan, 21:59, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Select needed image object from base and pass it explicitly to > template context > > On 4 янв, 23:43, Emil <[EMAIL PROTECTED]> w

Re: Getting specific related objects via URL variable

2008-01-07 Thread Emil
Thanks alex, I think I'll leave it as-is for now, just getting my teeth cut on writing some simple template tags of my own but I haven't quite figured it all out yet. I'm so glad this list exists though. :-) //emil On 4 Jan, 23:41, "[EMAIL PROTECTED]" <[EMAIL PROT

i18n problem: Some template variables "get stuck" in one language

2008-01-10 Thread Emil
Hi folks, I have a rather peculiar problem. I created translations for my project, and mostly they work fine. Except that on a couple of pages, the language seems to get stuck on the translated language after the first time I change languages. Example: I visist the site. It's in english (which i

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
I'll poke around and see what I find. Thanks. //emil On Jan 11, 3:17 am, Peter Rowell <[EMAIL PROTECTED]> wrote: > Emil: > > > Except that on a couple of pages, > > the language seems to get stuck on the translated language after the > > first time I change langua

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
gn.net/articles/2006/jul/02/langue-depuis-url-django-url-locale-middleware/ //emil On Jan 11, 11:55 am, Emil <[EMAIL PROTECTED]> wrote: > Hi Peter, > > thanks for the tip, I'm reading up on the vary_on_headers-decorator > right now, I'm gonna see if that clears things up.

Re: i18n problem: Some template variables "get stuck" in one language

2008-01-11 Thread Emil
I think I got it! Wrong ordering of middleware - I had the i18n-urls middleware before some other stuff, which screwed up a lot... It's working now, and my hair will probably grow back eventually... //emil On Jan 11, 12:41 pm, Emil <[EMAIL PROTECTED]> wrote: > Nope, that doesn&#

Re: symfony developer looking at converting.....just a few quick questions

2008-01-23 Thread Emil
ied by using the built-in helpers[4] (even I managed to pull off a few, and I'm a lousy programmer... :-)). These tags can easily be set up to take the current page context as an argument and spit back differently rendered templates based on that. > Thanks, > Mat Good luck, hope you find

Re: symfony developer looking at converting.....just a few quick questions

2008-01-23 Thread Emil
uld help someone, this community has helped me a lot in the past! Take care, //emil --~--~-~--~~~---~--~~ 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@goog

Best practice for implementing multilingual content in template

2008-01-27 Thread Emil
ual snippet to a separate snippet (and make the main templates look better), but would still have to repeat the switch-tag code every time. So, finally, my question is this: How have you implemented this functionality? Any tips for making this more hassle- and clut

Re: Best practice for implementing multilingual content in template

2008-01-27 Thread Emil
On 27 Jan, 19:34, Wanrong Lin <[EMAIL PROTECTED]> wrote: > Emil, > > I am having the same problem too. I have not gone that far to > implementing the details of templates, but my planned solution is to use > just one template without any language dependent switching. Instead

Re: Best practice for implementing multilingual content in template

2008-01-28 Thread Emil
Thanks for the tips, Ivan! //emil --~--~-~--~~~---~--~~ 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,

Re: website side component processing

2008-01-28 Thread Emil
cs of writing template tags: http://www.b-list.org/weblog/2006/jun/07/django-tips-write-better-template-tags/ I found the above really helpful when I came from PHP to django, not so long ago... :-) //emil --~--~-~--~~~---~--~~ You received this message because yo

Re: Best practice for implementing multilingual content in template

2008-01-28 Thread Emil
Thank you all for the response. I think Jonathans version with custom methods to get the right field in the template would be the simplest for my moderate level of complexity, for now at least. But I've gotten some ideas on how to do it differently now, so thanks again! //emil On Jan 27,

Trouble running dev server after upgrade to Leopard.

2008-03-26 Thread Emil
I recently upgraded from OS X Tiger to 10.5 Leopard. I've been trying for the last two days to get my Django development setup working again. There seems to be a row of pitfalls involved in this but I think I've gotten at least a part of the way. Right now, I get the "No module named ..."-error w

Re: Trouble running dev server after upgrade to Leopard.

2008-03-27 Thread Emil
mework/Versions/2.5/lib/ python2.5/site-packages/django/utils/translation/trans_real.py", line 185, in _fetch ImportError: No module named pages If I look at the paths for the above, the python version used seems to be the one in '/Library/..', but the one referenced in

Django-contact-form, Akismet and UnicodeEncodeError

2008-05-04 Thread Emil
rm class or akismet.py can't handle unicode properly (which would be surprising) or if this was a common problem, I'd be able to find some search results on it, or find something in some issue tracker somewhere, but I've got nothin

Re: Django-contact-form, Akismet and UnicodeEncodeError

2008-05-05 Thread Emil
Forgot to mention, I'm using python2.5. Help me, Obi-Wan GoogleGroup, you're my only hope. //emil On 5 Maj, 02:15, Emil <[EMAIL PROTECTED]> wrote: > Hi folks. > > I'm having this annoying problem that I don't have the skill to solve. > I'm using James

Problem sending email

2008-05-06 Thread Emil
Hi folks. I'm wrestling with a hosting company where I'm trying to deploy a django powered site. Pretty much the only remaining problem is sending email via the contact form. I don't get any errors while sending, but they never arrive... The following shows up in the sendmail logs: "did not issue

Re: Problem sending email

2008-05-06 Thread Emil
Nevermind. Turns out I'm just incredibly stupid, and had, for some unknown reason, commented out the line with the admins-tuple, so the mail had absolutely no recipient... On May 6, 2:57 pm, Emil <[EMAIL PROTECTED]> wrote: > Hi folks. > > I'm wrestling with a hosting co

Re: Djangonauts in Sweden?

2007-09-06 Thread Emil
of web standards. Over 2+ beers. :-) Let's keep in touch about this, and I hope other swedes (and more danes) join in too. E-mail me directly if there are any specific plans, Nis, and I'll do the same. (Now I'm off to the first day of work as a tutor: wish me luck trying to teach c

How many read operations is the get() method causing?

2011-11-12 Thread Emil Sandin
Hi, I am running a Django app on appengine, but I am constantly hitting the roof with read operations. I have not found an easy way to find what's causing this, so I am trying to find it out myself. To me, it seems that even if I use all().filter(..) or get(), the database is queried for all instan

Creating a custom form field that uses an AND

2010-03-04 Thread Emil Ivanov
receiving one and a token. The validation happens by sending the answer along with the token. I want to write a form field that encapsulates this logic. The elements should render (IMO) like And on submit I need the value of _token to validate the answer. Thanks, Emil -- http://bolddream.com

Re: How can I flush my response stream in django?

2010-10-06 Thread Emil Stenström
y after makes sure new HTTP requests to linked media (CSS and JS) gets requested while the rest of the page is loaded. Now: Is there a nice way of doing this in Django? -- Emil Stenström http://friendlybit.com -- You received this message because you are subscribed to the Google Groups "

Re: Missing Related Objects in MODEL._meta.get_all_related_objects

2013-06-25 Thread Emil Stenström
What you are looking for is probably get_all_related_many_to_many_objects(). "get_all_related_objects" really just means "get_all_related_foreginkey_objects", so that could explain that some fields are missing. /Emil -- You received this message because you are subscribed to the Google Gr

Re: Unittest test-database not empty

2008-03-29 Thread Emil Stenström
Hi rock, I had the same problem and traced it to one of the contrib.auth tests. It seems they don't delete two of the testusers there. I added a ticket about it (http://code.djangoproject.com/ticket/6923), and will just use another username for my own tests meanwhile. /Emil On 30 Jan,

Re: How best to delete one of multiple records?

2008-06-23 Thread Emil Styrke
idea. Another idea is to have a single form with only a hidden ID input - then a link for each item could use javascript to set the correct ID and submit the form. I'm sure there are other javascript contraptions that could accomplish the same, but any such approach would of

Re: url views problem

2008-06-24 Thread Emil Styrke
2008/6/24 sebey <[EMAIL PROTECTED]>: >#temp only fo dev proposes > (r'^shows/(?p\d{1})/ > s','ubermicro.shows.views.show_page') # .* does not work > ) > > can anyone help? You need to use a cap

Re: Problem logging in to admin using Safari

2008-06-24 Thread Emil Styrke
x27;d install wireshark or a similar tool and look at exactly what HTTP traffic passes between Safari and Django - this would probably reveal for certain whether it's the server or the client messing up. Hope that helps, /Emil 2008/6/24 Pieter Claerhout <[EMAIL PROTECTED]>: > >

Re: Problem logging in to admin using Safari

2008-06-26 Thread Emil Styrke
try instead of using the hosts file). /Emil 2008/6/25 Pieter Claerhout <[EMAIL PROTECTED]>: > > I think I got closer to the source of the problem. > > First of all, it's not client related. > > What I tried was the following: > - Removed all the virtual hosting s

Re: url views problem

2008-06-26 Thread Emil Styrke
s to use the show ID you're passing in. So maybe replacing the query line with s = show.objects.get(pk=show_feed) and getting rid of the "for s in query" line might do the trick? Then you'll get only the feed for show 1 parsed when you go to /shows/1. /Emil 2008/6/25 sebey

Djangonauts in Sweden?

2007-09-05 Thread Emil Björklund
Hi folks, Two part post: 1. Just wanted to introduce myself: Emil, web designer/developer from Malmö in southern Sweden, studying Information Architecture at Malmö University where I also work as a tutor. Come mostly from a php background, not much of a programmer in any language but I get by on

Tutorial Problems...

2019-08-06 Thread Emil Lilja
Hey all, I realize I'm somewhat of a buffoon on the subject but I've tried learning Python on my free time the past couple months and want to get in to Django. So after following the tutorial and trying to launch the server with: *python mange.py runserver *all i get is *Watching for files with

Re: Tutorial Problems...

2019-08-07 Thread Emil Lilja
;, line 983, in _find_and_load File "", line 967, in _find_and_load_unlocked File "", line 677, in _load_unlocked File "", line 724, in exec_module

Re: Tutorial Problems...

2019-08-08 Thread Emil Lilja
python will advance to your next error - if any. > > And > > runserver is asking you to Ctrl-c and do python manage.py migrate > --settings= > > This will ensure your database matches all the models in your project > including Django's own models. > > *Connected

Re: admin problems with the docu

2009-08-13 Thread Alexandru-Emil Lupu
HI! the doc is updated for the 1.1 version .. try this urlpatterns = patterns('', (r'^admin/',admin.site.root), ) see more here: http://code.djangoproject.com/ticket/10050 Alecs On Thu, Aug 13, 2009 at 3:52 PM, quant wrote: > > hi > > i am pretty new to django and i started to check the d

Re: how much python do i need to know to learn/use Django?

2009-08-14 Thread Alexandru-Emil Lupu
HI! personally i have started using Python / Django around 2 weeks ago. I do not know very much of it, but on a long term, my situation looks like: 3 years pascal Programming 5 years php Programming (1 with symfony framework) 2 weeks of Python / Django I cannot say that i have read any material, b

Re: ModelForm and ForeignKeys

2009-08-25 Thread Alexandru-Emil Lupu
an ideea: build a custom Model Form for Character, and after that define CharacterHome Model Form. class CharacterForm(forms.ModelForm): class Meta: model = Character exclude = ('some', 'fields','here', 'that', 'you', 'do', 'not', 'want', 'to', 'display' ) class CharacterHomeF

Re: When did Paul join the Beatles?

2009-09-14 Thread Alexandru-Emil Lupu
basically you would have to make a ManyToMany relation thru a class. In that class you make m,n,date field After that you just use a query to answer the question: Who (Paul)? joined to whom (Beatles), and after that will pop up the ManyToMany date field that will answer to question "when". I am pr

Re: When did Paul join the Beatles?

2009-09-14 Thread Alexandru-Emil Lupu
tion is it possible to write a model API statement that gets > > me this information, or would I have to add fields to the model? > > > > Thanks. > > > > On Sep 14, 9:46 am, Alexandru-Emil Lupu wrote: > > > > > > > > > basically you would have t

Re: When did Paul join the Beatles?

2009-09-14 Thread Alexandru-Emil Lupu
lol... i have answered to late ... it seems that after all i have said the same thing as Tiago Regards On Mon, Sep 14, 2009 at 11:58 PM, Alexandru-Emil Lupu wrote: > i do not know if is database killing or not, but you could try some of > those > > Person.objects.select_related(

Re: Join .Net Community

2009-10-20 Thread Alexandru-Emil Lupu
No thanks On Tue, Oct 20, 2009 at 1:43 PM, nostradamnit wrote: > > No thanks > > On Oct 20, 12:30 pm, Shawon_ wrote: > > Join .Net Community > > > > This group represents the Microsoft .Net community. All .net > > programmers all around the world are welcome here. In this group > > you'll find th

Re: order_by function

2008-11-21 Thread Емил Иванов / Emil Ivanov
Check out http://docs.djangoproject.com/en/dev/ref/models/querysets/#order-by-fields 2008/11/21 Luke Seelenbinder <[EMAIL PROTECTED]>: > > Can I order_by a function within the model? I know you can list them > in the admin inteface, etc. But can you order_by a model function? Or > would you have

Re: Why Django doesn't force testing?

2009-01-05 Thread Емил Иванов / Emil Ivanov
As Russell Keith-Magee suggested having a tutorial on how to do testing is a good way to go. Modifying the django tutorial in the docs to include testing in it should help new-commers get used to testing. Also, having tests in the docs should help convince people that testing is the right way to

Re: Django-like PHP framework?

2009-01-05 Thread Емил Иванов / Emil Ivanov
Welding together Zend Framework, Doctrine and PHPUnit can give you a very good stack to work with. All 3 frameworks are very advanced. You won't get stuff like automatic model forms and the admin for example. Doctrine is a very advanced ORM tool (and a big a complex one as well). ZF is sort of th