Creating Custom Admin Views

2008-03-30 Thread Bernd
the other functionality should be the same. So I create the URLconf entry, the new view and the customized template in my template directory. But I get this errormessage http://dpaste.com/42185/ I think the original context from the admin view is missing now, but how could I solve this proble

Re: Creating Custom Admin Views

2008-04-01 Thread Bernd
to my custom view, but it would be nice if there > was an easier way.. > > > > On 31 Mar, 10:12, Brot <[EMAIL PROTECTED]> wrote: > > does nobody have some helpful input? > > > > On 30 Mrz., 17:13, Bernd <[EMAIL PROTECTED]> wrote: > > > > > He

Re: mod_python vs. mod_wsgi

2008-05-06 Thread Bernd
-click django/mod_wsgi > > installer. > > > > What's your opinion with mod_wsgi? Is it better than mod_python? > > What's the advantages/disadvantages? > > > > Bernd > > > > > > > --~--~-~--~~~---~-

Re: Getting error after installing on webfaction? - need help

2008-05-15 Thread Bernd
did you installl the latest release or the latest trunk on webfaction? which version do you use locally? I think you are working with different versions of django Bernd On Thu, 2008-05-15 at 15:47 -0700, ydjango wrote: > I installed my app to webfaction > I am getting this error on many

creating objects

2008-05-24 Thread Bernd
: File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py", line 200, in results_iter for rows in self.execute_sql(MULTI): File "/usr/lib/python2.5/site-packages/django/db/models/sql/query.py", line 1466, in execute_sql cursor.execute(sql, params) File "/usr/

Django template language

2007-10-06 Thread Bernd
gif works like a jpeg. But I didn't find a solution to write {% ifequal mime 'image/jpeg' or 'image/gif'%} or {% if mime in ['image/jpeg', 'image/gif] '%} Is there any chance to compare multiple values? Or are there better solution for my problem? Reg

Better solutions for my views?

2007-10-10 Thread Bernd
mediainfo,..]],...} I hope my explanation is understandable and somebody can help me with a better solution. thanks Regards Bernd --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post t

Re: Better solutions for my views?

2007-10-10 Thread Bernd
Question 1 is solved. the brackets are wrong. right way is: {% for event in events %} event.get_thumbnail_url {% endfor %} I would be appreciate if there would be any ideas to my second question Bernd On Wed, 2007-10-10 at 23:46 +0200, Bernd wrote: > Hello, > > I'

Question 1 is solved. the brackets are wrong. right way is: {% for event in events %} event.get_thumbnail_url {% endfor %} I would be appreciate if there would be any ideas to my second question Bernd

2007-10-10 Thread Bernd
Question 1 is solved. the brackets are wrong. right way is: {% for event in events %} event.get_thumbnail_url {% endfor %} I would be appreciate if there would be any ideas to my second question Bernd On Wed, 2007-10-10 at 23:46 +0200, Bernd wrote: > Hello, > > I'

Re: Need help selecting a Django hosting provider

2007-10-18 Thread Bernd
m Austria and webfaction is in United States. Could that be a problem with the traffic, because my website-users are all from europe Regards Bernd 2007/10/18, Greg <[EMAIL PROTECTED]>: > > > Thank for all the help so far. It sounds like Webfaction is the way > to go Howe

generic views

2007-10-22 Thread Bernd
ot; should be redirect to " example.com/app/events/2007/". But 2007 shouldn't be hard-coded. 2007 should be the result from a object-filtering. Is this possible with a generic view: - urlpatterns = patterns('django.views.generic

Re: How to display UserProfiles in newforms-admin

2008-07-20 Thread Bernd Donner
(admin.StackedInline): model = UserProfile max_num = 1 class UserAndProfileAdmin(UserAdmin): inlines = [UserProfileInline, ] admin.site.unregister(User) admin.site.register(User, UserAndProfileAdmin) is that the "best" solution? Thanks, Bernd Donner On Sunday 20 July 2008 22:06:19 Adi

How to display UserProfiles in newforms-admin

2008-07-21 Thread Bernd Donner
CKED) How can the same effect be achieved with newforms-admin? Thanks for your help, Bernd Donner --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Customizing field widgets and classes from model.Field (aka fields, fields and widgets)

2022-12-01 Thread Bernd Wechner
p a PR for the code (and if it passes all tests submit), and take advice on where doc needs changing beyond the page cited above and perhaps: https://docs.djangoproject.com/en/4.1/ref/models/fields/#field-api-reference Regards, Bernd. -- You received this message because you are subscribed to

How to prevent label wrap in Django Administration

2015-04-19 Thread Bernd Wechner
I'm just playing around with Django and have cut a simple model and all is working fine. The Django administration tool works a charm, and I can move onto some views and forms. But what puzzles me immensely is why editing a tuple looks like this (with crazy label wrap). Can I fix this any way?

Re: How to define a url that does not belong to any app?

2017-11-25 Thread Bernd Wechner
I'm curious too ;-). I suspect you can do pretty much anything at the project level that you can do at the app level but am not a pro in that space by any measure. This might be a useful read: https://stackoverflow.com/questions/4879036/django-projects-vs-apps Regards, Bernd. Ku

Fetching next and/or prior objects given an arbitrary ordering

2018-02-28 Thread Bernd Wechner
g a list of all of them. In short I want to solve this problem, not reframe the problem or work around it ;-). Regards, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails f

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-02-28 Thread Bernd Wechner
one, with a next and previous button given an ordering specified in the model and no guarantee of uniqueness on the (sort keys). Regards, Bernd. On Thursday, 1 March 2018 00:58:58 UTC+11, Julio Biason wrote: > > Hi Bernd, > > Well, the thing with `get()` is that it will return only one

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-02-28 Thread Bernd Wechner
by Django in respect of the ordering defined in the model meta class, that is, this is an ordered list. Regards, Bernd. On Thursday, 1 March 2018 00:58:58 UTC+11, Julio Biason wrote: > > Hi Bernd, > > Well, the thing with `get()` is that it will return only one object. What > you&

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-02-28 Thread Bernd Wechner
d be arbitrarily large (millions, or more) which is true for a generic scenario which makes no assumptions about the model other than what is provided by its ordering and known about the current object. Regards, Bernd. Mike Dewhirst wrote: On 1/03/2018 10:50 AM, Bernd Wechner wrote: >

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-03-01 Thread Bernd Wechner
/blogs/michael_zilberstein/archive/2012/03/14/42332.aspx Regards, Bernd. On 2/03/2018 3:48 AM, C. Kirby wrote: I'm having a hard time envisioning the SQL statement that could do what you are asking, without a sub select or something like that. If you can write the expression in sql you

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-03-01 Thread Bernd Wechner
tions and all migth work neatly in Django 2.0 ORM. Regards, Bernd. On 2/03/2018 3:48 AM, C. Kirby wrote: I'm having a hard time envisioning the SQL statement that could do what you are asking, without a sub select or something like that. If you can write the expression in sql you _might_

Making an object unsaveable ...

2018-03-04 Thread Bernd Wechner
to discuss the merits of one approach over the other at all, am more interested in possibility - projects have huge amounts of context not readily shareable that influence the relative merits of one approach over another of course. Regards, Bernd. -- You received this message because you are s

Re: Making an object unsaveable ...

2018-03-04 Thread Bernd Wechner
ch a signal prior to save and do something, there's no guarantee some downstream code won't do a save. I wonder if overriding save() is more secure, or if there's any possibility other code could go around such an override. Regards, Bernd. On Sunday, 4 March 2018 22:24:38 UTC+1

Customizing mode loading ...

2018-03-04 Thread Bernd Wechner
I have it right. Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send e

Re: Django 1,11 upgrade, render template with context in template.Node

2018-03-04 Thread Bernd Wechner
lready and the way to go? I'm on 1.11 and about to move to 2.0. Regards, Bernd. On Saturday, 3 March 2018 06:26:46 UTC+11, Christian Ledermann wrote: > > In Django 1,8 it worked but in Django 1.11 it throws: > > TypeError: context must be a dict rather than RequestContext.

Re: Making an object unsaveable ...

2018-03-07 Thread Bernd Wechner
Melvyn, Just preference. Nothing more. Fix the issue at its source so all views that exist or might exist honor the demand basically. One model, many views. Regards, Bernd. On Tuesday, 6 March 2018 19:13:42 UTC+11, Melvyn Sopacua wrote: > > Hi Bernd, > > On zondag 4 maart 2018

Re: Making an object unsaveable ...

2018-03-07 Thread Bernd Wechner
e of interesting options (the main interest I have is in loading an object, modifying an object for display purposes and sandbox purposes, but securing against an inadvertent save of the object). Regards, Bernd. On Tuesday, 6 March 2018 19:28:58 UTC+11, James Bennett wrote: > >

Re: Customizing mode loading ...

2018-03-09 Thread Bernd Wechner
ws. I use this to enforce privacy on certain fields, marke them appropriately and overrride save() to similarly not save private fields. And it all works like a charm! On Monday, 5 March 2018 14:53:15 UTC+11, Bernd Wechner wrote: > > Found this lovely doc: > > > https://docs.djangopr

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-03-12 Thread Bernd Wechner
the WHERE on the table produced by the SELECT/FROM as per SQL above to make this work. Regards, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email t

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-03-13 Thread Bernd Wechner
se ends up on the select in in my_querset. we want to wrap the whole of my_queryset with select * from my_queryset where pk=pk But how? Can anyone think of a way to do that? Regards, Bernd. On Monday, 12 March 2018 23:43:33 UTC+11, Bernd Wechner wrote: > > OK Trying to implement this now and h

How to add an OR criterion to an existing QuerySet?

2018-03-14 Thread Bernd Wechner
t to it, and then reapply the filter. Bit of a mystery to me. Hoping someone has some insights I'm not getting from the docs here. Regards, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this

Re: Email = models.EmailField()

2018-03-14 Thread Bernd Wechner
angoproject.com/en/2.0/ref/models/fields/#django.db.models.TextField>.link under that class spec for TextField specific options. Your question is not very specific and does not suggest you've tried reading the documentation alas. Regards, Bernd. On Thursday, 15 March 2018 12:12:59 UTC+

Re: How to add an OR criterion to an existing QuerySet?

2018-03-14 Thread Bernd Wechner
s a rather cryptic assertion failure then ;-). But nailed it, by examing the SQL and yes, one contained a DISTINCT clause so I just added it to the other and was happy ... Regards, Bernd. Simon Charette wrote: Hello Bern, You're actually pretty close to the solution. You should b

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-03-14 Thread Bernd Wechner
tr(qs .query), model._meta.pk.name),[pk]) if ao: return (ao[0].neighbour_prior,ao[0].neighbour_next) else: raise None On Wednesday, 14 March 2018 06:28:55 UTC+11, Bernd Wechner wrote: > > Hmmm, really stuck on this. Can find no way of selecting from a selec

Re: Fetching next and/or prior objects given an arbitrary ordering

2018-03-15 Thread Bernd Wechner
n that was possible and I've overlooked it somehow. Regards, Bernd. On Friday, 16 March 2018 00:55:09 UTC+11, Matthew Pava wrote: > > Did you look at the Subquery expression? > > > https://docs.djangoproject.com/en/2.0/ref/models/expressions/#subquery-expressions

Re: tutorial 2.0 - 1: problem

2018-03-15 Thread Bernd Wechner
you are using that, and you have set up polls/urls.py as the tutorial states, then that URL should resolve.Assuming the file: *C:\\Users\\ddeen\\Documents\\PYTHON\\mysite\\polls\\urls.py* exists and contains the tutorial recommends. Cheers, Bernd. <http://localhost:8000/polls/> --

Re: Phone Number Validation

2018-03-15 Thread Bernd Wechner
<https://github.com/stefanfoulis/django-phonenumber-field>! https://github.com/stefanfoulis/django-phonenumber-field Try that maybe and save yourself a lot of thinking and hassle on the phone number formats. Regards, Bernd. On Friday, 16 March 2018 14:17:49 UTC+11, Carl Brubaker wrote: >

Given a model, how can I get a widget for each field?

2018-03-20 Thread Bernd Wechner
need it, and so have access to it as well, but again can find no form or widgets there. Spent so long searching doco and the web already I'm either blind (could be) or this is just bothersomely tricky! Regards, Bernd. -- You received this message because you are subscribed to the Goo

Re: Given a model, how can I get a widget for each field?

2018-03-20 Thread Bernd Wechner
model, and it seems modelform_factory is the path forward. Kind regards, Bernd. On Tuesday, 20 March 2018 23:42:16 UTC+11, Andréas Kühne wrote: > > Hi, > > Like Andreas is saying the only way to define the default widgets is to > use a form - and the simplest way to define a fo

Re: Given a model, how can I get a widget for each field?

2018-03-21 Thread Bernd Wechner
Actually I stand corrected, no need to build a format all. *django.forms.fields_for_model* provides just the fields for model and their widgets. Awesome. Neat and tidy. On Wednesday, 21 March 2018 13:08:31 UTC+11, Bernd Wechner wrote: > > Andréas and Andreas, > > I admit I smiled to

Finding a decent ordering widget ...

2018-03-21 Thread Bernd Wechner
I don't like spending my time recreating widgets that exist already. Not a priority. Does anyone here have any experience? Places tom look, terms to use in searching for one? Regards, Bernd. -- You received this message because you are subscribed to the Google Groups "Django use

Re: Finding a decent ordering widget ...

2018-03-21 Thread Bernd Wechner
rt of me wonders if there isn't or shouldn't be, or if I should try and start, a Django widget library with Django Widgets like this for reuse. Just musing. Regards, Bernd. On Wednesday, 21 March 2018 20:54:35 UTC+11, Bernd Wechner wrote: > > Hmmm, my next problem. > >

Re: Finding a decent ordering widget ...

2018-03-22 Thread Bernd Wechner
Julio, Funnily stumbled on the same notion myself last night. I've worked up a niceish sample here: https://jsfiddle.net/34Lv6try/68/ So it's possible without too much hassle using JQuery Think I'll build be a widget out that fiddle ;-). Regards, Bernd. On Wednesday, 21 M

Adding to all templates context via Middleware

2018-05-01 Thread Bernd Wechner
eem structurally impossible if context processing has already happened. I can only imagine a trick using another context key like %%execution_time%% say and replacing that response.content. I wonder if I'm on the right track here? Or if someone has a better idea? Regards, Bernd. -- You r

Adding to all templates context via Middleware

2018-05-02 Thread Bernd Wechner
tructurally impossible if context processing has already happened. I can only imagine a trick using another context key like %%execution_time%% say and replacing that response.content. I wonder if I'm on the right track here? Or if someone has a better idea? Regards, Bernd. -- You received this

Re: Adding to all templates context via Middleware

2018-05-06 Thread Bernd Wechner
lly collected until the whole response is rendered. To wit I have done it by inserting stats just before tag as a safe and clean bet. The result is here: https://github.com/bernd-wechner/CoGs/blob/develop/django_stats_middleware/__init__.py Works well for me and is a good hook for inserting

dumpdata fails with crytpic error

2018-05-31 Thread Bernd Wechner
? I mean I presume it's complaining because there's an illegal value in a field in the database. But you think it's mention which field in which model on which record? Is there a quick way to find out? Regards, Bernd. -- You received this message because you are subscribed to t

Re: dumpdata fails with crytpic error

2018-06-01 Thread Bernd Wechner
All sorted, thanks for the tips. Bernd Wechner wrote: Just tried this: | $ python3 manage.py dumpdata --format json --indent 4>data.json CommandError:Unableto serialize database:'NoneType'objecthas noattribute 'is_authenticated' | Anyone seen this before. How does

Is it possible to instantiate a model (create an object) and flag the instance as unsaveable?

2018-06-02 Thread Bernd Wechner
oing this or if there's a canonical method for doing it. I'll experiment but in the mean time fishing as I said for experience and any standard methods out there. Regards, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Is it possible to instantiate a model (create an object) and flag the instance as unsaveable?

2018-06-03 Thread Bernd Wechner
Thanks James, I like that idea. I'll experiment with it. Have used Proxies before just not with this in mind. On Sunday, 3 June 2018 15:06:41 UTC+10, James Schneider wrote: > > > > On Sat, Jun 2, 2018, 6:14 PM Bernd Wechner > wrote: > >> I'd like to instantiat

Generating server-side off-line HTML of Django pages ...

2018-06-03 Thread Bernd Wechner
ponse (with embedded Javascript) into a rendering engine and then save (or request) the rendered page? Kind regards, Bernd. -- 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: Generating server-side off-line HTML of Django pages ...

2018-06-04 Thread Bernd Wechner
Thanks Melvyn, looks exactly like what I wanted! Will investigate. I had a feeling this could not be a novel or unique use case. Regards, Bernd. On Monday, 4 June 2018 20:09:25 UTC+10, Melvyn Sopacua wrote: > > On maandag 4 juni 2018 08:00:08 CEST Bernd Wechner wrote: > > > Sa

A Backup Model in Django?

2016-10-15 Thread Bernd Wechner
mit hear options for doing that than philosophic appraisals of the benefits of an in-database copy vs, database exports. Regards, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: A Backup Model in Django?

2017-01-19 Thread Bernd Wechner
cal tables suits my needs and is what I'm now in process of implementing. Of course data entry is transactioned and the database will be backed up regularly, but they are separate issues. Regards, Bernd. On Sunday, 16 October 2016 17:40:15 UTC+11, Bernd Wechner wrote: > > A curious

Pretty printing filters

2017-01-20 Thread Bernd Wechner
ne contains 'Lennon' and entry->authors->name is 'Lennon' The thing is there's a fair translation required from the neat filter syntax to a humanized version. Has this been done before? Can I find a tool for it? Or will I look at writing one? Hard to imagin

Using Django Window Functions on a Filtered QuerySet

2019-01-28 Thread Bernd Wechner
, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to dj

Providing help on a website (basic CMS for on-site site documentation)

2019-02-18 Thread Bernd Wechner
ch coordination trouble between its templates and my sites ... etc. etc. I'm full of questions and really just wondering, is there a canonical solution to a site documentation page hierarchy and managing it nicely? Regards, Bernd. -- You received this message because you are subscr

Re: Providing help on a website (basic CMS for on-site site documentation)

2019-02-21 Thread Bernd Wechner
Hmmm, no-one has any thoughts here ... and I'm on ma' own reinventing the wheel? Surely tehre's a canonical way to provide help on Django website . I'm leaning toward simple flatpages app with a tinymce editor for them for the admin. On Tuesday, 19 February 2019 16:26:57 U

Re: Providing help on a website (basic CMS for on-site site documentation)

2019-02-22 Thread Bernd Wechner
aargh, there must be a canoncial way fo managing a hierarchy of flat pages that provide help or FAQs or such for a website. On Friday, 22 February 2019 21:02:27 UTC+11, ukeplayer01 wrote: > > Sorry to go off topic but I can recommend HuGo for simple markdown web > pages. > Cheers >

Re: Using Django Window Functions on a Filtered QuerySet

2019-02-26 Thread Bernd Wechner
Stunning silence on this all round ... Hmmm On Tuesday, 29 January 2019 11:01:56 UTC+11, Bernd Wechner wrote: > > I have a filtered queryset, and annotated it with a few window functions. > I got a most surprising result when the filter is on fields in a related > model and it tu

Re: Providing help on a website (basic CMS for on-site site documentation)

2019-03-04 Thread Bernd Wechner
documented easy way to edit them easily! Regards, Bernd. On Monday, 4 March 2019 17:40:35 UTC+11, Derek wrote: > > "Surely it's a ubiquitous need" > > No, I think not. In the dim and distant past I used to write copious help > files for various Windows apps ... but on

Re: Providing help on a website (basic CMS for on-site site documentation)

2019-03-06 Thread Bernd Wechner
surprised that this is not a fairly ubiquitous issue. I mean does anyone find Django flatpages easy to maintain (edit)? Regards, Bernd. On Wednesday, 6 March 2019 17:27:51 UTC+11, Derek wrote: > > > > > Bernd > > Data-driven sites, such as the ones that Django is very good

Django and timezones ... how to initialize a field to now() in the in clients time zone?

2017-01-21 Thread Bernd Wechner
nvert the submission back to UTC for saving into the database. Still, I wonder openly, is this not long solved, more elegantly? Regards, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and sto

Validating and cleaning related models ...

2017-01-24 Thread Bernd Wechner
with more formsets than that all working fine I can create, update, list and work with it. All charming. I can validate intra-model fields in clean() easily and that works a dream. But I'm stuck on how to validate relationships, when and where that is best done. Regards, Bernd. -- You receive

Re: Django and timezones ... how to initialize a field to now() in the in clients time zone?

2017-01-24 Thread Bernd Wechner
time this need arose and am pleased to see the django-easy-timezones project! Regards, Bernd. On Monday, 23 January 2017 07:12:36 UTC+11, Andréas Kühne wrote: > > Hi, > > The problem here is as you say, your server doesn't know the clients > timezone. This isn't tri

Re: Validating and cleaning related models ...

2017-02-01 Thread Bernd Wechner
Melvyn, Thanks. Alas That was but one example in an apocryphal model set, and I have rather more relationship criteria to test in a more complex nest of models. I'm still drilling down into Django to see what I can uncover. Notably form.instance for the main form and all the related formsets, t

Aggregating a query while selecting more than grouped by ...

2017-05-13 Thread Bernd Wechner
x27;).annotate(Max('book_set__pubdate')).values() Things get bizarre ... as in I see all the Author fields in the returned dictionaries but the group by reverts to id in Author not country. Grrr. Regards, Bernd. -- You received this message because you are subscribed to the Google

Re: Aggregating a query while selecting more than grouped by ...

2017-05-14 Thread Bernd Wechner
QL query in my experience and hence would be nice if it were well documented how to generate it in the ORM and I'm pleased you gave it a name (greatest-per-group). Am experimenting with Subquery and inspecting the SQL generated in the interim. Thanks again for the very very supportive and

Re: Aggregating a query while selecting more than grouped by ...

2017-05-14 Thread Bernd Wechner
loop on saves until uniqueness is guaranteed. Simultaneity causes other headaches in the code I'm writing (which has some strictly order dependent features and so needs an order to be forced anyhow). I owe you a big favour for all this help! Regards, Bernd. Todor Velichkov wrote: There is no

Re: Where is all the time going?

2017-05-22 Thread Bernd Wechner
James, If you have the fortitude and kind heart to look at it, sure the code base (just checked in) is here: https://github.com/bernd-wechner/CoGs it's the Create view on the Session model that is taking 30s to render, no other model, and that one is the central model of interest w

Re: Where is all the time going?

2017-05-23 Thread Bernd Wechner
boxes and seeing if it improves In mean time any other ideas welcome. Regards, Bernd. Thomas Lockhart wrote: On 5/22/17 10:12 PM, Bernd Wechner wrote: James, If you have the fortitude and kind heart to look at it, sure the code base (just checked in) is here: https://github.com/ber

Re: Where is all the time going?

2017-05-23 Thread Bernd Wechner
it ;-), if Django is going it, at least one step closer to understanding. Regards, Bernd James Schneider wrote: On Mon, May 22, 2017 at 10:12 PM, Bernd Wechner mailto:bernd.wech...@gmail.com>> wrote: James, If you have the fortitude and kind heart to look at it, sure the

Re: Django bugfix release: 1.11.2

2017-06-01 Thread Bernd Wechner
Any tips on how to install it? Forgive the ignorance please. Tim Graham wrote: Details are available on the Django project weblog: https://www.djangoproject.com/weblog/2017/jun/01/bugfix-release/ -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: template drop down menu

2017-06-06 Thread Bernd Wechner
If you want a sample for a javascript postback when drop down changes I have one here: https://github.com/bernd-wechner/CoGs/blob/master/Leaderboards/templates/CoGs/view_leaderboards.html It's attached to the select "selNames" which you can trace to the Django view "a

Extending the user model and accessing fields in template context

2017-06-07 Thread Bernd Wechner
relationship isn't working as I'd have hoped. Is there a trick I'm missing? Regards, Bernd. -- 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 ema

Re: Extending the user model and accessing fields in template context

2017-06-07 Thread Bernd Wechner
lacking profile of course, but I'd sort of prefer to be informed too. Still, if it wasn't already so late at night when it hit me, I might have thought to examine the link in the models and database to ensure that I've set the user field in the Dude model ;-). Regards, Bernd.

Adding a attribute to a model property

2017-06-07 Thread Bernd Wechner
ideal, I'd wrap the property decorator itself if I had any hints on how, rather than decorating my property twice. More like my original vision above. Quite stuck alas. I wonder if anyone has either met with such a need before and solved it or just the basic decorator and property skills to

request.GET as an OrderedDict

2017-06-08 Thread Bernd Wechner
nd regards, Bernd -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-us

Re: Adding a attribute to a model property

2017-06-08 Thread Bernd Wechner
the docstring can be written and read it can be used to communicate as desired (metadata about the property), albeit in a sub-optimal and proxy manner I guess. I wonder if I can work out how to do that? We shall see, about to put a 3 year old to bed and may fall asleep in the process ;-). Be

Re: request.GET as an OrderedDict

2017-06-08 Thread Bernd Wechner
, thus passing an order in. Arguably a) is ideal, which leads to you "bad idea" observation but there are loads of options really, it just surprised me in a sense that an ordered string comes in and some of that information is discarded and not made easily available is all. R

Re: Vim plugin that does Django code completion?

2017-07-09 Thread Bernd Wechner
For what it's worth I use PyDev which is free. And am very happy with it. Though I donate money now and again because it is so good and free. On 9/07/2017 10:33 PM, Gabriel - Iulian Dumbrava wrote: I also suggest buying a PyCharm license. If you are working on a professional level and you have

Re: How to Minify, obfuscate, and compress django code

2017-08-09 Thread Bernd Wechner
I'm a little confused as to what this has to do with Django, which runs server side. The code it emits to the client is limited to what you put in your templates, including perhaps the widgets that django provides for forms. I use a lot of javascript in my forms, and it's my responsibility to m

Bizarre URL behaviour after deploying

2017-08-30 Thread Bernd Wechner
w if someone has insights that aren't shared in that SO link above as none of what is shared there seems to apply. For anyone really keen on code explorations urls.py is here: https://github.com/bernd-wechner/CoGs/blob/master/CoGs/urls.py and the whole site is there too. What I want to unde

Re: Bizarre URL behaviour after deploying

2017-08-30 Thread Bernd Wechner
Daniel, Yes, I have deployed, that is the problem in a sense. URLs are clean in dev and suddenly contain an app_name when deployed. Not sure what you mean by configuration? The Django settings are here: https://github.com/bernd-wechner/CoGs/blob/master/CoGs/settings.py The rest of the

Re: Bizarre URL behaviour after deploying

2017-08-30 Thread Bernd Wechner
-from-url-for-single-app-projects except none of the answers apply to my situation, because I have not ever defined app_name and it has never appeared in URLS so far (when running under development). They only appeared, out of the blue, when deploying. The whole project is here: https://git

Re: Bizarre URL behaviour after deploying

2017-08-31 Thread Bernd Wechner
Change that to False, and Django will display a standard 404 page. Now runserver is using port 8000 and lighttpd is using port 80, but to converge those will have to wait till the morrow I think (I have to lighttpd on port 8000 or runserver on port 80) and my guess is no change. I note that D

Re: Bizarre URL behaviour after deploying

2017-08-31 Thread Bernd Wechner
confs I just duplicated the block verbatim for now. Regards, Bernd. Daniel Roseman wrote: On Thursday, 31 August 2017 10:51:22 UTC+1, Tom Evans wrote: On Thu, Aug 31, 2017 at 2:09 AM, Bernd Wechner > wrote: > Daniel, > > Yes, I have deployed, that is the problem in

Re: Bizarre URL behaviour after deploying

2017-08-31 Thread Bernd Wechner
.conf: server.port = 80 vs server.port = 8000 with a a lighttpd restart ("sudo /etc/init.d/lighttpd restart") between. Some code paths differ based on port it seems, I'll go find a wall to bang my head on now ;-). Regards, Bernd. 'Tom Evan

Re: How to display ipconfig /all in template html django

2017-09-07 Thread Bernd Wechner
e, but just look on-line for how to add data to a templates context. Good luck. But if you want better help, try and be more clear about what you want and how you envisage achieving it I guess, share a description or sample of your template and view etc. Regards Bernd. Ramin Farajpour Cam

Re: How to display ipconfig /all in template html django

2017-09-07 Thread Bernd Wechner
d :-(. Regards, Bernd. Ramin Farajpour Cami wrote: Thanks Bernd, Your right, but i have problem show in view with output format ipconfig in html, i try display : PPP adapter VPN: Connection-specific DNS Suffix . : Link-local IPv6 Address . . . . . : fe80::50a6:e568:7895:590d%24

Re: Bizarre URL behaviour after deploying

2017-09-07 Thread Bernd Wechner
ns that, i.e. a django setting that sees django put the app_name into the URLs. I'll move onto an inspection of the admin site next, this coming weekend. Apologies for the slow response, I only get time on weekends and some evenings to look at this and the weekend passed was Fathers Day

Re: How to pre-load model data?

2017-09-08 Thread Bernd Wechner
those SQL methods is over using the ORM itself mind you. I wouldn't go there (or better said, haven't yet ;-). Regards, Bernd. Mark Phillips wrote: I have a several classes in models.py, and I would like to load some data into these models (or tables in the db), as well as add mor

More bizarre URL behaviour after deploying

2017-09-12 Thread Bernd Wechner
around this, but I am not looking for a workaround here, I'm fishing for any clues that help me understand how the url template tag generates its output and when and why it inserts a string like this that seems to be the name of the view that the link is on! Mystery++ and PITA. Regards

Re: Django select filter

2017-09-12 Thread Bernd Wechner
Here are a pile of options: https://djangopackages.org/grids/g/auto-complete/ and the winner it seems is: https://djangopackages.org/packages/p/django-autocomplete-light/ Cheers, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users"

Re: More bizarre URL behaviour after deploying

2017-09-13 Thread Bernd Wechner
les which lighttpd doesn't do to Django's satisfaction and so it needs tweaking and I have both a uwsgi application tweak and a middleware tweak for the job now). Regards, Bernd. Bernd Wechner wrote: OK, I've more or less solved my original problems in deploying in this space.

Re: More bizarre URL behaviour after deploying

2017-09-13 Thread Bernd Wechner
s good: from django.core.urlresolvers import set_script_prefix set_script_prefix(.request.environ['SCRIPT_NAME']) And now the fiddle works in middleware too where I feel it's more at home than with a UWSGIHandler override (i.e. theoretically is more robust against Django

Wrapping basic static HTML page in sites base template. How to?

2017-10-16 Thread Bernd Wechner
. Is that a common sort of need, that;s been solved, and done? Just curious really. Seems a common need at my end ;-). Hence a classic application of the DRY principle, and generalizing the routine elements of Table of Contents building and linking. Regards, Bernd. -- You received thi

Serializing forms and formsets to pass to Celery task

2020-02-28 Thread Bernd Wechner
ither approach would work, 1. would seem less hassle if it has a solution, and 2. seems more likely to provide one to me right now. Kind regards, Bernd. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gro

Generic forms (ModelForm) provide HTML for a form! Can generic views (DetailView) do same?

2015-08-10 Thread Bernd Wechner
Label 4:Value 4 I find it hard to believe not, but danged if I can find it! An odd inconsistency if so. Do I really have to derive a class DetailViewWithHTML from it and write my own wrappers? Regards, Bernd. -- You received this message because you are subscribed to the Google Groups &q

  1   2   >