Re: Runtime Error: maximum recursion depth exceeded while calling Python object

2011-01-24 Thread Derek
Just for the record.  This issue was not solved; appears to be happening on a SUSE Linux Enterprise Server. Does not happen on an Ubuntu server (which I have switched to). There might be some issue with the particular version of Python that was installed on it. On 13 January 2011 13:44, Derek

Lazy translation (unicode) not working for a CharField in the Admin?

2011-01-25 Thread Derek
erently from the others). Any ideas or insights appreciated. Derek -- 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 email to django

Re: Code Review As a Service

2011-01-25 Thread Derek
Yes, I think this is a great idea. Ideally, the charge-rate would be "per lines of code" (excluding blanks, of course!). Hours are just, too, "amorphous" in this particular case. On Jan 25, 11:42 am, Venkatraman S wrote: > Hi, > > I was wondering whether there any freelancers/companies who offe

Re: remove items as they are assigned

2011-01-25 Thread Derek
Have a look at: http://groups.google.com/group/django-users/browse_thread/thread/eaafb5c60108f3bd/50d871a1627453f5?fwc=1 On Jan 24, 9:22 pm, arlen nascimento wrote: > Hi all, > i'm trying to do a simple thing, but it seems not so simple in django. > > I have the following models > >  class Monit

Re: Model Forms Customization

2011-02-02 Thread Derek
The same question was asked on stackoverflow: http://stackoverflow.com/questions/2303268/djangos-forms-form-vs-forms-modelform Its a good explanation - I liked the bit at the end: "The similarities are that they both generate sets of form inputs using widgets, and both validate data sent by the bro

Re: Filtered drop down choice django

2011-02-02 Thread Derek
I suspect I am not the only one really hoping for An Official Way to be developed at some time... In the meantime, also look at: http://www.stereoplex.com/blog/filtering-dropdown-lists-in-the-django-admin I think this is quite detailed and has some good comments as well. On Feb 1, 7:07 pm, shack

Django Project - handling call to the "root" url?

2011-02-02 Thread Derek
n to: def root(request): return render_to_response('admin/login.html', None) This causes a loop condition i.e. displays the page OK, but trying to login just redisplays the page... any ideas how to make this work as intended? Thanks Derek -- You received this message because you are s

Re: Django Project - handling call to the "root" url?

2011-02-02 Thread Derek
Tracey Thanks - that is a neat idea... but I only need it for that one page. I want the rest of the (protected) admin pages to work as normal. Derek On Feb 2, 2:02 pm, Karen Tracey wrote: > On Wed, Feb 2, 2011 at 5:24 AM, Derek wrote: > > I need to handle a call to the root url f

Re: Django Project - handling call to the "root" url?

2011-02-02 Thread Derek
t(request): > >     return render_to_response('admin/login.html', None) > > > This causes a loop condition i.e. displays the page OK, but trying to login > > just redisplays the page... any ideas how to make this work as intended? > > > Thanks > > Derek > >

Re: cascading create

2011-02-02 Thread Derek
Phlip There are a number of posts discussing this issue - one of them may give you some pointers: http://stackoverflow.com/questions/1136106/efficent-way-to-insert-thousands-of-records-into-a-table-sqlite-python-django http://stackoverflow.com/questions/2655670/how-do-i-perform-a-batch-insert-in-

Re: Django Project - handling call to the "root" url?

2011-02-02 Thread Derek
not sure how else to describe this... what is not clear? On 2 February 2011 16:20, Tom Evans wrote: > On Wed, Feb 2, 2011 at 2:12 PM, Derek wrote: > > Tracey > > > > Thanks - that is a neat idea... but I only need it for that one page. > > I want the rest of the

Re: Django Project - handling call to the "root" url?

2011-02-02 Thread Derek
011 16:51, Tom Evans wrote: > On Wed, Feb 2, 2011 at 2:35 PM, Derek wrote: > > Tom > > Restated thusly: > > 1. I want the "/" to display the login form (and not append 'admin/' to > the > > visible URL) > > 2. I want the login form (which

Re: help with foreign keys in admin

2011-02-04 Thread Derek
Python is amazingly good at many things... but mind reading is not one of them yet ;) On Feb 3, 3:08 pm, Bobby Roberts wrote: > nevermind... it was a case issue... you know if python knows there's > an error with case  it would just say "hey check the case here" > > On Feb 3, 12:31 am, Karl Bowde

Re: Specifying Field Data To Display in A DropDown

2011-02-10 Thread Derek
This is core material in terms of learning Django... you need to have (at least) worked through the tutorials. Assuming you have done that, you'll be in a position to attempt to write the code for this. If that code is not working, post it here - along with the error traces and expected output -

Re: How To Code A Dialog Screen And Respond to It

2011-02-10 Thread Derek
Your requirements sound slightly contradictory " display a new screen ... while still keeping the existing screen". I assume you want something like a pop-dialog box that you would get typically in a desktop app. For this, you will need to use javascript. A javascript library, such a jQuery, wil

Re: Login, Password Recovery, etc

2011-02-15 Thread Derek
I am behind a firewall and have no problem downloading; maybe your company has blocked access to github? On Feb 14, 4:07 pm, Andre Terra wrote: > Is it just me or there aren't any downloads available for these projects? > I'm behind a firewall and can't really try cloning from git. > > Thanks in

Re: Progress Bar/ProgressBarUploadHandler Documentation Examples

2011-02-15 Thread Derek
Fortunately, other clever coders have written up on this: http://fairviewcomputing.com/blog/2008/10/21/ajax-upload-progress-bars-jquery-django-nginx/ On Feb 14, 4:56 pm, hank23 wrote: > Are there any exampels of how to code Progress bars or the handlers > which support them somewhere in the djang

Re: chrome extension

2011-02-16 Thread Derek
> On Mon, Feb 14, 2011 at 10:10 PM, Tony wrote: > > Hi, > > Is there any way to have a chrome extension with a backend in Django, > > like for storing data server side and using its views?  Or is this not > > possible? > > thanks > A similar question: http://stackoverflow.com/questions/3411690/ser

Re: Admin - click through to parent / child

2011-02-17 Thread Derek
On Feb 16, 7:22 pm, Alec wrote: > Hi, > > I'm wondering if there are any add-ons that show a list of children > and give the ability to click through to parent or children records. > I'm aware of the InlineAdmin feature, but I'm thinking of a non- > editable list of children for all relations that

Re: How to pivot a table?

2011-02-18 Thread Derek
On Feb 17, 10:52 pm, Phlip wrote: > Djangoists: > > I have a database table like this... > >   red, 1 >   red, 2 >   red, 15 >   blue, 18 >   blue, 20 > > ...and I want to read it into an array like this: > >   [ ['red', [1,2,15]], ['blue', [18,20]], ] > > Of course I can use values_list('color',

Re: Filtering List based on a custom dropdown

2011-02-21 Thread Derek
On Feb 21, 4:22 am, Andre Terra wrote: > I'd also like some input on this, as I'm reaching a point of my project > where I'll have to deal with a similar issue. I was planning on using ajax, > which actually means keeping it simple IMHO, but I would really like to > follow best practice. > > Shoul

Re: How can I control JSON serialization?

2011-02-28 Thread Derek
On Feb 27, 1:46 am, Alexander Bolotnov wrote: > I actually removed this topic from -developers and posted a new one in > -users - I guess you picked it sometime in between. I initially posted in > -developers and then thought it's not very relevant and re-created in > -users. > > sorry for the con

Re: limit number of rows in change_list

2011-02-28 Thread Derek
On Feb 28, 1:55 pm, bigfudge wrote: > How do I limit the number of rows displayed by default in a > change_list? > > Many thanks, In the admin.py file, under the class whose number of rows you want to display - use "list_per_page" class MyModelAdmin(admin.ModelAdmin): list_per_page = 10 The

Re: How to get next and previous element in a forloop in the template

2011-03-10 Thread Derek
On Mar 7, 10:43 pm, Ariel wrote: > Could you give some idea ??? > I am sorry about the previous message I had not finished. > > Any help is appreciated. > Regards. > > > > > > > > On Mon, Mar 7, 2011 at 3:39 PM, Ariel wrote: > > Hi everybody: > > > I would want to know in the django template tags

Re: When do we stop using Django admin?

2011-03-10 Thread Derek
ot *that* much tweaking required in Django to filter data, and the approach of writing a completely new interface is a lot more work. But we had that approach "built-in" from the start; you need to consider your situation and see how many extra changes are needed. In our situation there is

Re: Use admin interface in public facing pages?

2011-03-14 Thread Derek
On Mar 11, 12:40 am, gbl wrote: > The admin interface is perfect for the site I'm working on. Automatic > pagination, customizable search fields, filter via boolean or date > fields in a sidebar, clickable sorting on column headings. Easy to > modify > > Is there really no way to use all this

Re: About database composite keys.

2011-03-23 Thread Derek
On Mar 22, 12:31 pm, Andre Lopes wrote: > Hi, > > I'm new to Django and I have some doubts about the Database Design. I > design Databases two years from now but I'm not accustomed to design > databases without composite keys. > > I have read that Django does not support composite keys. True? > >

Re: extend User Model for custom fields

2011-03-27 Thread Derek
On Mar 26, 12:53 pm, Antonio Sánchez wrote: > Yeah sure, i should have used "recommended" word instead of correct. > > The difference between link i wrote and b-list is that the last one > uses a foreign-key, while first uses one-to-one, and this is the way > is recommended in doc, so... I think i

Re: unique_for_date not working?

2011-03-28 Thread Derek
On Mar 25, 10:42 pm, Karen Tracey wrote: > On Fri, Mar 25, 2011 at 12:17 PM, Andre Terra wrote: > > Overwrite the model's save method and add the date automatically on save. > > That is the best way to do most things "auto" in your models. > > But if you do this, you are past the point where you

Re: Is it possible to output a graph from Matplotlib into Django like this?

2011-04-11 Thread Derek
On Apr 11, 12:39 pm, Xavier Ordoquy wrote: > Le 11 avr. 2011 à 12:21, nai a écrit :> > > > This is the give example from Matplotlib for Django: > > > def simple(request): > >    import random > > >    from matplotlib.backends.backend_agg import FigureCanvasAgg as > > FigureCanvas > >    from matp

Re: Navigation menu

2011-04-12 Thread Derek
On Apr 12, 11:33 am, Daniel Gerzo wrote: > Hello all, > > I was wondering how do you generate the navigation menu in your web > sites, with a possibility to mark up the "active" page? > > My searching revealed some solutions, most of them based on implementing > a custom template tag and then pars

Re: Advice: project hosting apps

2011-04-12 Thread Derek
On Apr 11, 3:50 pm, Peter Herndon wrote: > Thanks very much for the advice, all!  I greatly appreciate it. > > ---Peter > On Apr 4, 2011, at 9:25 AM, Peter Herndon wrote: > > > > > > > > > Hi all, > > > I'm tasked to build an internal project hosting site similar to Github > > or Bitbucket for my

Linking to multiple dynamic images from same web page

2015-01-18 Thread Derek
I have a situation which is puzzling. I have a web page that, when generated embeds links that look like: http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF1Wu3OfN9rmUKTDO%2BT%3DJan%3DF%3DLKODqQObds-tvME%3DUhL

Re: Linking to multiple dynamic images from same web page

2015-01-19 Thread Derek
.) Derek On Sunday, 18 January 2015 16:05:45 UTC+2, mitesh_django wrote: > > Hi Derek, > > I face same issue few months ago, what I did is I destroyed plot object > completely everytime the view is called and regenerated new plot everytime. > You can try that. There is an iss

Re: Smoke tests

2015-01-26 Thread Derek
The same article you refer to says" "A frequent characteristic of a smoke test is that it runs quickly, often in the order of a few minutes and thus provides much quicker feedback and faster turnaround than the running of full test suites which can take hours or even days." I would think that

Re: drop-in replacement for admin module foreign key relation UI

2015-02-18 Thread Derek
I think https://pypi.python.org/pypi/django-autocomplete-light is good, quick and stable. It has "heritage" (been around and battle-tested) and provides the features that are key. (And supports Django 1.7, Python3). On Tuesday, 17 February 2015 01:03:05 UTC+2, Jani Kajala wrote: > > Hi all, >

Re: Django App DB replicas - call for suggestions

2015-02-23 Thread Derek
I recently came across this article: https://www.clairereynaud.net/blog/adding-offline-mode-to-your-mobile-app/ May be of interest as it deals with versions and revisions to track conflict between changes... On Saturday, 21 February 2015 16:45:40 UTC+2, Blazor wrote: > > Hi all, > > I was asked t

Re: Using proxy kind of Table in Admin Interface

2015-03-02 Thread Derek
I am not quite sure what you are trying to achieve (without seeing sample code), but here is some very basic code showing how a proxy could work: models.py class MainModel(Model): """mother of models""" ... class MainModelProxy(MainModel): objects = MainModelProxyManager()

Re: Future for Django, Jobs, Confused :/

2015-03-05 Thread Derek
Good point Andrew - its certainly true for us. Another point is that if you work for yourself (e.g. doing contract work), then you need to pick a tool that you can be productive in, as this is usually more important to most smaller clients than using Tool A or Tool B. On Thursday, 5 March 201

Re: Existing database - new project

2015-03-07 Thread Derek
, using Django conventions (such as an auto-increment primary key, with "unique_together" constraints) and then import the existing data. This has the added benefit of allowing you to validate the existing data and ensure that you start with a 'clean' data set. HTH Derek

Re: how to initiate an interactive python script from an html cgi?

2015-03-25 Thread Derek
You could look at using a tool like Skulpt which allows you to run scripts with interaction in a browser window: http://www.skulpt.org/ E.g. from their example: Python 2.6(ish) (skulpt, Wed Mar 25 2015 17:52:34) [Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chrom

Re: Django Admin should really support Twitter Bootsrap

2015-04-25 Thread Derek
I am a satisfied user of django-suit. Right now there is beta-testing going on of the upgrade from Bootstrap 2 to 3... On Wednesday, 15 April 2015 15:45:36 UTC+2, bobhaugen wrote: > > On Monday, April 13, 2015 at 5:16:40 PM UTC-5, Patrick Lemiuex wrote: >> >> It's about time, the django admin to

Using Anaconda with Apache on Windows?

2015-04-28 Thread Derek
nvironment)? Any help with this would be appreciated, as I am not a regular Windows or Anaconda user. Thanks Derek -- 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

Re: How to find a view in a complex web application

2015-04-28 Thread Derek
of course, but the data in it could be changed dynamically (e.g. adding more categories and aliases) without affecting the logic of your app. [Hey - this could even make a cool app on its own!] Hope these ideas help my project is a just a boring menu-driven one. Derek On Tuesday, 28 Apr

Re: clear database (drop all tables)

2015-04-29 Thread Derek
As usual, StackOverflow to the rescue ... http://stackoverflow.com/questions/3414247/django-drop-all-tables-from-database On Wednesday, 29 April 2015 12:11:51 UTC+2, lars van Gemerden wrote: > > Hi all, > > Is there a simple programmatic way to drop all tables in the database > (e.g. for testin

Re: How to find a view in a complex web application

2015-04-30 Thread Derek
Hi Thomas I do not I understand your question; I made a suggestion previously for what fields you might need in this 'metadata' model, and you can add or change as needed. I do not know what your project looks like, so I cannot comment on what the rest of your database should conta

Re: percentage or number data entry solution please

2015-05-11 Thread Derek
I realise this is probably overkill for your needs; but django-suit allows for a ton of customisation options for the admin, one of which is the ability to supply "units" as part of the data entry forms - see: http://django-suit.readthedocs.org/en/latest/widgets.html#enclosedinput Your other opt

Re: How do I display a map with GeoDjango models?

2015-05-14 Thread Derek
Could you not add them as multiple Leaflet layers; each layer pointing to a view for the model in question. There is a simple overview here: http://www.slideshare.net/makinacorpus/team-up-django-and-web-mapping-djangocon-europe-2014 There is much more detail on the django-leaflet site (e.g. ht

Re: What are some good 3rd party django apps to build a user dashboard and folder management (similar to a Google drive account)

2015-06-14 Thread Derek
I have not had this use case; but I assume you have looked at: https://www.djangopackages.com/grids/g/file-managers/ Perhaps one there is close to what you need; and you could extend/enhance it to match exact requirements. They range from really simple to full-fledged EDMS such as Mayan. (Note:

Re: Match multiple URLs to the same pattern

2015-07-17 Thread Derek
Yes; Django says pretty much this same thing "on the tin": "A view function, or *view* for short, is simply a Python function that takes a Web request and returns a Web response." ( https://docs.djangoproject.com/en/dev/topics/http/views/ ) (I think there *is* magic in Django; but its in the i

Re: design decision tree survey using django admin interface

2015-07-17 Thread Derek
I doubt this is possible with plain admin, which is designed for CRUD operations Trying looking into form wizards: https://docs.djangoproject.com/en/1.7/ref/contrib/formtools/form-wizard/ or, if that cannot handle your logic, then write an action: https://docs.djangoproject.com/en/1.7/ref/contri

Re: Is there a plan to modernize Django-admin?

2015-07-19 Thread Derek
You can also look at http://djangosuit.com/ - works very well. Free for non-commercial projects. In the middle of an upgrade to Bootstrap 3. On Saturday, 18 July 2015 11:18:49 UTC+2, xliiv wrote: > > Thanks for clarification, I'll check both: django-admin2 and > django-xadmin. > > > On Sat, Ju

Re: Is there a plan to modernize Django-admin?

2015-07-22 Thread Derek
dard) iPad. On Wednesday, 22 July 2015 06:46:02 UTC+2, Ezequiel wrote: > > > On Monday, July 20, 2015 at 3:58:31 AM UTC-3, Derek wrote: >> >> You can also look at http://djangosuit.com/ - works very well. Free for >> non-commercial projects. In the middle of an upgrade t

Re: Is there a plan to modernize Django-admin?

2015-07-22 Thread Derek
Ignore the home page (its just for the company I think). Rather work with github and readthedocs. Also see the many comments here: https://github.com/sshwsfc/django-xadmin/issues/67 On Tuesday, 21 July 2015 18:56:33 UTC+2, Lee Hinde wrote: > > > On Sat, Jul 18, 2015 at 12:25 AM, Stuart Longlan

Re: How to filter objects by values of foreign objects in Django admin

2014-07-09 Thread Derek
There is not really enough information about your use case (which is maybe why people seem to be misunderstanding your question). Its not really clear to me what you mean by "pass a parameter", as you have not given any indication where or how this parameter needs to be set. One way I have

Re: Admin UI not commiting to DB

2014-07-12 Thread Derek
Tim Hard to tell without code; but what happens when you test without the form override? Also, unless you can reproduce the errors they get, then you will struggle to debug. Have you tried adding in log statements at key points to try & see where things go haywire? On Saturday, 12 July 2014

Re: Admin UI not commiting to DB

2014-07-13 Thread Derek
01:05:00 UTC+2, Timothy W. Cook wrote: > > Thanks for the reply Derek. This post was just a stab to see if anyone > had seen this before and I just missed the post. > > I guess it is time to roll up my sleeves and take a formal approach at > debugging. This one of VERY fe

Re: mixing python , php and django

2014-08-14 Thread Derek
It can work any way you need it to. It really depends on what aspects he needs to handle and which are yours. If, for example, you create the back-end with the DB and models, then he can communicate from the front-end, using JSON data via GET/PUT requests. One way for you to handle this on th

Re: New user - struggling with database design

2014-09-02 Thread Derek
That looks like a database error - check in your database as to which tables have been created. On Thursday, 28 August 2014 18:05:01 UTC+2, Jason G wrote: > > Ok - here is where I am stuck now. Any thoughts? > > If I try to render {{ vessel.CurrentBrew }} in a view, I get something > like this:

Re: Django admin list sort error

2014-09-04 Thread Derek
names through out my database? (which is a fair amount of rework). Thanks Derek On Saturday, 14 June 2014 18:44:52 UTC+2, Derek wrote: > > I have recently discovered that Django admin is generating errors when > trying to sort a table on certain fields: in particular, those fields that >

Re: Django admin list sort error

2014-09-04 Thread Derek
Well, this is an "internal" project ... but a "translation" of some of the fields of some of the models would look something those below (NB this is a subset with just a few models - and any 'grammatical' errors are from the "translation" - the originals work perfectly in every respect except for

Re: Django admin list sort error

2014-09-04 Thread Derek
Sorry Colin, I have no idea what you mean. Where in the django admin settings would I specify this? AFAIK, the column names / labels / IDs are auto-generated by the admin and it attempts the sort when you click on the column heading. On 4 September 2014 21:19, Collin Anderson wrote: > try so

Re: WHERE TO PLACE BUSINESS LOGIC IN DJANGOS' MTV

2014-09-08 Thread Derek
;s a bad idea. If the implementation is easy to explain, it may be a good idea. HTH Derek On Sunday, 7 September 2014 09:26:13 UTC+2, Eddilbert Macharia wrote: > > Hi All, > > I have been to post like this > https://groups.google.com/forum/#!topic/django-users/Ykppb4uELJ4 and

Re: Updating Django project from 1.4 (if not older) to 1.7

2014-09-08 Thread Derek
Maybe a long shot... but if the project was designed to run in a virtualenv, then there may be a requirements.txt file which will describe what is needed to run it, including the Django version. On Saturday, 6 September 2014 22:30:35 UTC+2, Abdulla Al-Khenji wrote: > > Hello all, > > I have been

Re: Django admin list sort error

2014-09-08 Thread Derek
generated properly? Derek On 5 September 2014 19:26, Collin Anderson wrote: > It guess it's pretty complicated, but it's possible to specify it kind of > like this: > > class MyAdmin(admin.ModelAdmin): > fields = ['name', 'theplace'] > >

Re: Config: DB or git?

2014-09-29 Thread Derek
On Monday, 29 September 2014 15:41:23 UTC+2, Erik Cederstrand wrote: > > Den 29/09/2014 kl. 15.04 skrev Thomas Güttler >: > > > Hi, > > > > of course we separate data from code: > > > > - code belongs into version control (git) > > - data belongs into a database (postgres) > > > > But wher

Re: Python: Assign variable in if statement?

2014-12-03 Thread Derek
On Sunday, 30 November 2014 18:23:22 UTC+2, Masklinn wrote: > > > On 2014-11-30, at 12:30 , ThomasTheDjangoFan < > stefan.eich...@googlemail.com > wrote: > > Hi guys, > > coming from php I am wondering if there is a way to do something like this > in Python/Django: > > if variable = get_a_value_fr

Re: dashboard for user profile

2015-01-04 Thread Derek
Yes, I found some guidance on how to construct a dashboard page; but mine is for creating summary of some of the key data, not so much for user-related info (although I may still need to do this in future). On 3 January 2015 at 14:00, Aaron Reabow wrote: > Did you ever find anything like this? >

Re: Django Admin Error: pop-up entry form

2013-11-20 Thread Derek
a the pop-up route. On Tuesday, 19 November 2013 20:42:25 UTC+2, Derek wrote: > > Hi > > I am using Django 1.5.5. This error happens while running the dev > server. If I click on the "+" button so I can use the pop-up form to add a > new entry to a drop-down list (i.e. FK to

Re: reports

2013-12-12 Thread Derek
There is a tutorial here that seems comprehensive: http://www.geraldoreports.org/docs/tutorial-django.html Assuming you have something basic going, then its best to ask very specific questions - "I tried X (here is my code) and I get this error Y - how to solve..." On Wednesday, 11 December 20

Re: wait message

2014-01-06 Thread Derek
Have a look at this SO Q&A: http://stackoverflow.com/questions/7554405/wait-for-a-file-using-jquery You should be able to easily write a server-side function in Django that can check for the existence of the file... On Sunday, 5 January 2014 15:27:13 UTC+2, fabricio wrote: > > But my process is

Re: I'm getting obsessed! Where should I put this code?

2014-02-10 Thread Derek
A common function that can get called from multiple places may be the way to go. For example (please adapt!): #view file # try allocate some stock to product try: instance.stock = get_stock(availability="Available", product=product): instance.stock.allocate() except: pass # do somet

Re: Looking for direction on some admin console customization.

2014-03-10 Thread Derek
Dennis Your use case is not very clear; but it sounds more like you need a CMS, even a simple one. There you can design templates that will hold all your page content in a layout of your choice. There are many Django-based CMS e.g. https://pythonhosted.org/django-page-cms/ Derek (PS Your

Re: very light weight django task queues

2014-04-06 Thread Derek
Maybe have a look at these ideas: http://themattreid.com/wordpress/2011/01/20/simple-python-a-job-queue-with-threading/ https://www.jeffknupp.com/blog/2014/02/11/a-celerylike-python-task-queue-in-55-lines-of-code/ On Sunday, 6 April 2014 12:33:30 UTC+2, TinyJaguar wrote: > > I've been using bot

Re: Data + admin design problem

2014-05-28 Thread Derek
Hi Off the top of my head (as in "do not use directly"!), it seems to me that: 1. You need a boolean field for 'serial' and also one for 'countable' for a Product. One or both must be checked (use clean() to check) when Product is created. 2. Each Product also needs a 'status' field: one of '

Re: Prywatna wiadomość na temat: Data + admin design problem

2014-05-28 Thread Derek
s, and the more closely it follows actual code, the better your chance of getting a valid answer. Derek On 28 May 2014 20:43, Wojtas wrote: > Thank you Derek for your response. > > What are you writing makes sense, and actually I have it implemented > already. My question is a bit di

Re: Django and Rails

2014-05-30 Thread Derek
Hi Enrique Apart from the mailing list, a good place to keep up with Python and Django in general is the http://www.pythonweekly.com/ newsletter. Its not long, is well-structured and will help give some idea of the current "buzz" ... (PS Not everyone is convinced that Rails is "faster" - ht

Re: Save django queries for reuse

2014-06-01 Thread Derek
You have not given enough details on your reporting setup; so my guess would be to save the details into a new table. This would include data such as: * id (for the record) * user_id * report_id * date_time * parameters The "parameters" are a text field; with the criteria/parameters which cr

Re: distinct().filter() applies filter before distinct

2014-06-11 Thread Derek
It might be worth comparing the SQL that Django generates versus what you would write (or want to write) by hand: MyModel.objects.all().query.sql_with_params() On Tuesday, 10 June 2014 23:17:30 UTC+2, John Rambo wrote: > > This better illustrates what I mean: > > > Example.objects.order_by('a','

Django admin list sort error

2014-06-14 Thread Derek
this error: OperationalError at /admin/myapp/mytable/ (1060, "Duplicate column name 'name'") A full stack trace is shown below. I am working with MySQL 5.5 and Django 1.6.3. Has anyone else encountered this error? Is this a known bug and/or is there a workaround? Thanks Derek Stack

Re: admin generated form, change dropdown with selction from popup menu

2014-06-25 Thread Derek
Yes, you will need to use a third-party app such as django-selectable (http://django-selectable.readthedocs.org/en/v0.8.X/admin.html) On Wednesday, 25 June 2014 07:43:16 UTC+2, Aeh. ABID wrote: > > Is there a way to display a field value other than id in the textbox > > On Wednesday, June 25, 201

Re: dynamic choices based on another field input.

2017-10-22 Thread Derek
See: http://django-autocomplete-light.readthedocs.io/en/master/tutorial.html#filtering-results-based-on-the-value-of-other-fields-in-the-form On Friday, 20 October 2017 13:04:41 UTC+2, rajeev yadla wrote: > > hi have a form which have two fields. one field has a foreignkey from > model A(in ima

Re: Pulling data from database

2017-11-02 Thread Derek
You can look at the guide in the docs: https://docs.djangoproject.com/en/1.11/howto/legacy-databases/ But as everyone will tell you; you need to have done a basic tutorial first (official or otherwise*), otherwise all the jargon will be confusing. After that, you can also look at areas such as

Re: executing python script in html button

2017-11-09 Thread Derek
://www.simplifiedpython.net/django-forms-tutorial-working-forms/ Its likely though, that you might need to work through some of the other material so you can understand how and where forms fit into the overall Django approach. Hope this helps Derek On Friday, 3 November 2017 18:08:58 UTC+2, Rizal M

Re: Building a web app for use of third party python package

2017-11-22 Thread Derek
>From what you have said, this is not too hard. You need a basic view to handle the upload, which is in turn will make a call to the specialised method for processing of the file (and zip creation) before returning the result to the user. A quick Google shows some relevant examples: * https:/

Re: Limit a view to superuser only

2017-11-24 Thread Derek
Bear in mind that unless you are running Django's built-in dev server, you will need to restart your production server for changes to propagate. On Sunday, 19 November 2017 17:21:28 UTC+2, yingi keme wrote: > > All of a sudden and out of the blue, it just worked. I had the re-run my > server > >

Re: Building a web app for use of third party python package

2017-11-26 Thread Derek
I am not aware of such a way; I think HttpResponse does a single thing. But you could create a page which embeds a link to the results file and redirect the user to that (I often find that having an "outcomes" page with some explanation is attached is helpful to the user). Like many similar

Re: Converting any Graphical Chart(pie-chart, gantt chart) into image dynamically.

2017-11-27 Thread Derek
Try reportlab: https://docs.djangoproject.com/en/1.11/howto/outputting-pdf/#write-your-view https://www.blog.pythonlibrary.org/2016/02/18/reportlab-how-to-add-charts-graphs/ https://www.reportlab.com/chartgallery/bar/ The actual data generation will of course be specific to your database and mod

Re: İ want to setup a server at home for testing and lerning to deploy django projects, thanks for any helping.

2017-12-02 Thread Derek
Guides that have helped me: https://simpleisbetterthancomplex.com/tutorial/2016/10/14/how-to-deploy-to-digital-ocean.html A bit older: https://www.digitalocean.com/community/tutorials/how-to-serve-django-applications-with-uwsgi-and-nginx-on-ubuntu-14-04 http://michal.karzynski.pl/blog/2013/06/09

Re: Django editable pdfs

2017-12-17 Thread Derek
Its not clear exactly what you want to do (or why) but here is a good article on different ways of working with PDF forms via Python: https://medium.com/@zwinny/filling-pdf-forms-in-python-the-right-way-eb9592e03dba (Also see: https://code-industry.net/free-pdf-editor/ if you have the option to

Re: How to make a place where you could type in data(number)?

2018-01-05 Thread Derek
You may not need Django for this. You could just use Flask e.g. https://pythonspot.com/flask-web-forms/ and https://stackoverflow.com/questions/27379486/retrieving-html-form-data-and-storing-in-csv-with-flask-python but, as with all web frameworks, you need to look at the fundamentals of how Fl

Re: Designing templates for database application

2018-01-15 Thread Derek
If this is your first Django app, I would try and use the built-in Django Admin as far as possible - there are numerous ways to customise and extend it (and it creates all the "grids" - by which I assume you mean table-views - and forms for you).After that you will have a better idea of how

Re: Customizable Invoice

2018-02-04 Thread Derek
If you plan to use PDF in your solution, then this may help you: https://www.kickstarter.com/projects/34257246/reportlab-pdf-processing-with-python ' On Saturday, 3 February 2018 07:21:50 UTC+2, Rakhee Menon wrote: > > Oops!!I am sorry !! I got your question wrong.Yes I do have some knowledge >

Re: When do I need a new app within the site?

2018-03-01 Thread Derek
Mike Dewhirst wrote: *I also have a "common" app to contain bits and pieces like utilities ...* I don't keep these under apps; my project-wide utility-type code (code without Django Models) sits under a "utils" module (with further namespaces as needed), at the same level as "apps" This means

Re: Making an object unsaveable ...

2018-03-04 Thread Derek
I think the second case is more manageable; I'd actually have a second table that has an exact duplicate structure of the first. Then you can save your newly changed copy into that -- and delete the record just afterward, or even much later, if you need to. I cannot imagine a scenario in wh

Re: Webpage Displays Blank

2018-03-13 Thread Derek
Maybe you need to show what your urls.py looks like as well? On Tuesday, 13 March 2018 05:57:55 UTC+2, Carl Brubaker wrote: > > I'm probably missing something simple, but I can't get my info to display > from my database. > > I have 2 abstract models to make 1 normal model. > My url views aren't

Re: Making django.contrib.admin compatible with Bootstrap4?

2018-03-27 Thread Derek
The dev branch of Django Suit (custome admin style) is using Bootstrap 4: http://django-suit.readthedocs.io/en/develop/getting_started.html#v2-dev-branch On Sunday, 25 March 2018 19:49:21 UTC+2, Tundebabzy wrote: > > Hi Vincent, > I'm not sure what you mean by "compatible". > > If you are askin

Re: Populate a select dropdown based on queryset

2018-03-30 Thread Derek
You can use "smart selects": https://github.com/digi604/django-smart-selects Works for both normal forms and in the admin. On Wednesday, 28 March 2018 23:02:36 UTC+2, James Farris wrote: > > Hi, > > I'm trying to populate a 'vaccine' dropdown based on a 'species' of a > pet. For example, if a

Re: Decoupling Postgres database credentials in django for deployment.

2018-03-31 Thread Derek
How is github "security" going to help you keep your passwords safe and why is this better than ENV variables (which most of use without any problems).? On Friday, 30 March 2018 16:50:03 UTC+2, Bill Torcaso wrote: > > > I have a concern about using environment variables to hold secret > informat

Re: [ANN]: django-todo 2.0

2018-04-12 Thread Derek
Interesting to hear of this. Unfortunately we are currently committed to Django 1.11 as it is an LTS, but if you're planning on keeping this in-sync with all 2.x releases, then that opens up the option to look at using this from 2.2 onwards (that's the next LTS). On Tuesday, 10 April 2018 17:5

<    1   2   3   4   5   6   7   8   9   10   >