Re: A Problem about UnicodeEncodeError

2016-04-23 Thread Mike Dewhirst
On 24/04/2016 1:48 PM, nku@gmail.com wrote: Yeah,this problem is same as what I met. However the solution the author provided didn't work on my machine. My friend started the project successfully with python2.x,so I decided to change the version of python. Thank you very much for your help!

Re: Help with defining Models for ManyToMany and OneToMany relationships...

2016-04-23 Thread Mike Dewhirst
On 23/04/2016 11:22 PM, Bruce Whealton wrote: Hello all,      So, I setup django in a virtualenv on my Ubuntu environment.  I was reading the docs and thought I had things right for creating the 3 models I wanted with this application. I am using Postgresql.  I have the Postgresql dr

Re: A Problem about UnicodeEncodeError

2016-04-25 Thread Mike Dewhirst
On 25/04/2016 10:29 PM, nku@gmail.com wrote: Thank you for your help. But my project is not in the desktop folder. I'll show you the traceback information: Well I don't think I can help. I can say that my development setup has given me no trouble at all. What works for me is ... C:\Users

Re: Help with defining Models for ManyToMany and OneToMany relationships...

2016-04-26 Thread Mike Dewhirst
y") class Meta: verbose_name = 'Connection' verbose_name_plural = 'Connnections' Good luck Mike Bruce Anyway, I will try to remove the ManyToMany statement from the Connections Model. Â I would then have one Contact or Organization maps to

Re: Django StaticFiles

2016-04-28 Thread Mike Dewhirst
On 29/04/2016 1:24 AM, Omar wrote: Hello I am new in Django in Linux, I have already config the apache2 server to run Django and it works but It does’nt load me the static files, when I open the Django’s Admin it just plane text (just html). I need to know how config it. thanks Here is a workin

Re: Integer field choice list keeps triggering migration

2016-05-03 Thread Mike Dewhirst
On 3/05/2016 4:58 PM, jorrit...@gmail.com wrote: I have the following model and choice list: BTW_TARIEF_CHOICES = { (1, '6%'), (2, '21%'), (3, '0%'), } Migrations see these changes as model changes. The model does change because it gets actual new choices in its definition. At any part

Re: How and where should I put a version number in my Django project?

2016-05-03 Thread Mike Dewhirst
On 3/05/2016 7:21 PM, Martin Torre Castro wrote: I'm making a Django project consisting of several apps and I want to use a version number for the whole project, which would be useful for tracking the status of the project between each time it comes to production. I've read and googled and I've

Re: Fixtures won't load twice in same testcase

2016-05-05 Thread Mike Dewhirst
On 6/05/2016 8:42 AM, Rich Rauenzahn wrote: I've been tracing into django core code, and it looks to me that I have a case where the fixture has a auth.User(username=rich) with a pk=1 in the fixture. Â But sometimes as the User fixture with pk=1 is being added (updated?) through Model._save_tabl

Re: how to use css in django 1.9

2016-05-13 Thread Mike Dewhirst
On 13/05/2016 3:37 PM, dk wrote: Â or what would be the best way to "print" the path for static? When I was starting out it was all quite difficult so I added the following to my (dev only) settings to reveal where all my directories were hiding ... BTW, dbhost below is a list of database h

Re: django tutorial part 2: clarification about INSTALLED APPS

2016-05-16 Thread Mike Dewhirst
On 17/05/2016 1:42 AM, Asi Dimbez wrote: Hi, I'm a newbie, there is thing not clear to me in the tutorial, part 2. I left part 1 with poll app working ok. In the tutorial, part 2, I read about INSTALLED_APPS :" That holds the names of all Django applications that are activated in this Django in

Re: Django Project Structure for mixins - best solution?

2016-06-01 Thread Mike Dewhirst
On 2/06/2016 12:54 AM, sevenrrain...@gmail.com wrote: I seen multiple project structure for Django, but they didn't discuss in detail about structuring mixins. I see that some people use mixins.py , others utils folder. Taking in consideration that I have many mixins for views(generic login,aut

CSS question for the Admin

2016-06-02 Thread Mike Dewhirst
I have a varchar field of 300+ chars and I'd like to know how to provide space to wrap it on screen without resorting to a TextField Any CSS ideas? Thanks Mike -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group an

Re: CSS question for the Admin

2016-06-02 Thread Mike Dewhirst
On 2/06/2016 7:31 PM, Michal Petrucha wrote: On Thu, Jun 02, 2016 at 07:22:16PM +1000, Mike Dewhirst wrote: I have a varchar field of 300+ chars and I'd like to know how to provide space to wrap it on screen without resorting to a TextField Any CSS ideas? Thanks Mike Perhaps you

Re: Django built-in: cycle

2016-06-05 Thread Mike Dewhirst
On 6/06/2016 7:26 AM, Mark Cuevas wrote: I'm using the following, which works, but doesn't break properly. Â I'd like three across for each row. Â How can I accomplish that? {% for director in directors %} {{ director.full_name }} {% endfor %} You need to pad out your l

Re: Django built-in: cycle

2016-06-05 Thread Mike Dewhirst
On 6/06/2016 9:39 AM, Mike Dewhirst wrote: On 6/06/2016 7:26 AM, Mark Cuevas wrote: I'm using the following, which works, but doesn't break properly. Â I'd like three across for each row. Â How can I accomplish that? {% for director in directors %} {{ dir

Re: Django and jQuery, I don't get it

2016-06-09 Thread Mike Dewhirst
I can't help at all with jquery but IIRC there is a question in the Admin "Are you sure?" when you try deleting something from a list view. Might be a start Mike On 10/06/2016 1:06 AM, Olivier Dalang wrote: Hi ! I'm using several modules that rely on jQuery, and have some own needs as well :

Re: Beginner question regarding virtualenv

2016-06-23 Thread Mike Dewhirst
On 24/06/2016 4:36 AM, Leo wrote: Hey Everyone, I’m a total newb to using Django and open stack. I am working on creating a Django development environment in a VMware environment/Ubuntu OS. Eventually I want to deploy this to production. The site’s purpose is as an intranet site. I have

pywkhtmltopdf [Was: [mezzanine-users] Re: Images in .pdf Invoice]

2016-06-28 Thread Mike Dewhirst
Sorry for hijacking a thread from Mezzanine ... On 29/06/2016 11:22 AM, Sam Kingston wrote: I'm not sure if this will help you or not, but I developed a replacement library for xhtml2pdf (though not a drop-in): https://github.com/sjkingo/pywkhtmltopdf Thank you Sam :) Do you have a separate

Re: Installing Django Problem.

2016-07-03 Thread Mike Dewhirst
On 4/07/2016 12:01 PM, Steve Burrus wrote: well I uyet again am encountering problems with installing the Django server. I managed to get to this point "(stevesenv) C:\Users\sbur87\Desktop\steves_dir\stevesenv>" It looks as though you have successfully got virtualenv working. Therefore the sho

Re: Installing Django Problem.

2016-07-03 Thread Mike Dewhirst
quite a few third party tutorials on the web. Good luck Mike On Sun, Jul 3, 2016 at 9:32 PM, Mike Dewhirst mailto:mi...@dewhirst.com.au>> wrote: On 4/07/2016 12:01 PM, Steve Burrus wrote: well I uyet again am encountering problems with installing the Django

Re: pywkhtmltopdf [Was: [mezzanine-users] Re: Images in .pdf Invoice]

2016-07-06 Thread Mike Dewhirst
equest, *args, **kwargs): > >        > > >    > > > >update urls.py with this view :) > > > > >On Wednesday, 29 June 2016 10:51:18 UTC+5:30, Mike Dewhirst wrote: > >Sorry for hijacking a thread from Mezzanine ... > >On 29/06/2016 11:22 AM, Sa

Re: How can I change the TabularInline "title" on Django Admin?

2016-07-07 Thread Mike Dewhirst
On 8/07/2016 2:56 AM, Fellipe Henrique wrote: Hello, When we need to use TabulerInline on Django Admin, the admin template create a "title" for the field... it's not the verbose_name... verbose_name is set like a Group.. "Blue" line before TabularInline... after this line, we have a table title.

Re: Newbie question regarding uninstalling Django system-wide.

2016-07-12 Thread Mike Dewhirst
On 13/07/2016 1:55 AM, Leo wrote: I am learning how to use Django. With my first attempt I did not use a virtual environment instead installed Django system-wide. Now I have learned to utilize virtual environments. Can you help me learn how to uninstall the system-wide Django instance? Also, I ca

template include for Django 1.8

2016-07-13 Thread Mike Dewhirst
I need to include the contents of a css file in my template [1] The css content needs to exist within and tags so that the pdf output software I'm using can see the styles. I can get the correct effect by copying and pasting the contents of the css file into the template but that w

Re: template include for Django 1.8

On 14/07/2016 4:53 PM, James Schneider wrote: On Jul 13, 2016 6:54 PM, "Mike Dewhirst" mailto:mi...@dewhirst.com.au>> wrote: I need to include the contents of a css file in my template [1] The css content needs to exist within and </pre></blockquote><pre styl

Re: template include for Django 1.8

On 14/07/2016 5:17 PM, James Schneider wrote: Includes the css file thanks James but it doesn't satisfy the pdf software. Back to the embedded styles copied and pasted. Oh well. I'd be curious as to why. There should be no difference between you c/p the styles in to the template vs. havi

Re: Any way to force Django to commit a write so another process can read the correct data from DB?

On 28/07/2016 5:46 AM, Constantine Covtushenko wrote: Hi Stodge, As said in Django current version of documentation , 'post_delete' signal is sent after record is deleted. This means also that transaction is closed at that moment.

Re: Django Multiple Currencies Implementation

On 8/08/2016 12:23 PM, Ali khan wrote: Thank you Babutunde, So you are saying that the price = models.DecimalField(max_digits=20, decimal_fields=2) will automatically sense it that what currency it is or if someone wants to pay me in different currency how would a payment processor will change cu

Re: Django Multiple Currencies Implementation

On 8/08/2016 4:31 PM, Ali khan wrote: Thank you mike for your kind reply but question was more related to how to setup moneyfield using what available modules. Use case is that a payment processor should be able to determine exchange value for instance if price is listed in Asian currency and som

Re: Trying to use Django 1.9.5, django_pyodbc, MS SQL Server 2012 on 64bit Windows 7

On 11/08/2016 5:11 AM, Evan Roberts wrote: I'm struggling to get a project going. I'm new to python and django. Is django_pyodbc supported on Python 3.5.1 and django 1.9? If not could you suggest a combination of python & django that is known to work with MS SQL Server 2012? Not an answer to y

Re: Using the Django ORM in a long-running worker process

We saw a presentation last weekend at pyconau by Andrew Godwin about Django Channels and you might like to check the YouTube video. It lets long-running processes keep web sockets open in parallel with http requests. Connected by Motorola Daniel Tao wrote: >Thank you for the thorough response

Re: DateField default value

On 23/08/2016 9:03 AM, Rich Shepard wrote: Reading the doc for DateField() I tried to set the default as today's date, but 'default=date.today' is not accepted. If there is a way to set today's data as the default for a DateField() please point me to the doc for it. https://docs.djangoproj

Re: Using version control with django

On 24/08/2016 5:42 AM, Rich Shepard wrote: I want to track django projects with subversion. (Single developer, local, so svn is better suited than the distributed git and mercurial.) I'd like advice on how to lay this out vis-a-vis the django layout. I use svn too. I hope git is a passing fa

Re: Using version control with django

On 24/08/2016 10:19 AM, Rich Shepard wrote: On Wed, 24 Aug 2016, Mike Dewhirst wrote: I use svn too. I hope git is a passing fad. Mike, Since Linus developed it for the kernel devs when BitKeeper became proprietary I very much doubt it's a passing fad. From all I've read, Git is

Re: Running Django Project Locally

On 24/08/2016 5:23 PM, Lekan Wahab wrote: Good morning, I was recently given  a django project to manage at work. However, i noticed the project has neither a django-admin.py or a manage.py file. Is that normal? There is usually a manage.py file in the root of the project. django-admin.py is

Re: Running Django Project Locally

ango.db.backends.sqlite3", "NAME": ":memory:", "USER": "", "PASSWORD": "", "HOST": "", "PORT": "", } } You can probably find where the settings are b

Re: A tricky query in one to many relationship - atleast for me:)

On 30/08/2016 4:33 PM, Web Architect wrote: Hi, I am looking for an elegant and efficient mechanism to have a query filter or a solution for the following one to many relationship model. Please note the following is just an illustration of the models - hope it should provide what I am looking

Re: How to Let a User add a Video not a image as a post?

On 2/09/2016 12:53 AM, djangorobert wrote: I have researched this issue with django for years now and seems that no body in the django community knows how to do this which is a suprise because there are many smart people but not one has been able to solve this mystery? What i'm aiming for is

Recipe to upgrade to Python 3.x on Ubuntu 12.04 and 14.04

I'm looking for a step-by-step system admin recipe to get away from Python 2.7 because unicode on 2.7 is doing my head in. This is ugly I know but that's how it is. Staging server is Ubuntu 12.04on local hardwarewith Python 2.7 and it runs Apache2 and mod_wsgi. It serves Django, Subversion, Bu

Re: Recipe to upgrade to Python 3.x on Ubuntu 12.04 and 14.04

On 7/09/2016 6:49 PM, James Schneider wrote: On Sep 6, 2016 10:44 PM, "Mike Dewhirst" <mailto:mi...@dewhirst.com.au>> wrote: > > I'm looking for a step-by-step system admin recipe to get away from Python 2.7 because unicode on 2.7 is doing my head in. This is ugl

Re: Recipe to upgrade to Python 3.x on Ubuntu 12.04 and 14.04

On 8/09/2016 10:12 PM, Erik Cederstrand wrote: Den 7. sep. 2016 kl. 10.49 skrev James Schneider : You may also want to consider building in a configuration manager such as Ansible or Salt stack. Once set up, you can deploy multiple staging and prod servers with a couple commands. With the righ

Re: Import css in Django

Jonathan I use the attached announce.py to display exactly where all the directories and URLs are. I had trouble in the beginning getting it straight in my head but seeing it every time I looked at the dev-server output helped a lot. Comments in announce.py show how to use it. Good luck Mi

Re: Can't create editable foreign key field in Django admin: going to give up on django

On 13/09/2016 3:02 PM, Hanh Kieu wrote: Hey guys, I'm creating a translation app that allows you to translate from one object to the other. My translation model has two foreign keys that links to two words, and on the admin site I want the Admin to be able to input two different words. The word

Re: Can't create editable foreign key field in Django admin: going to give up on django

anslation_word1") #word2 belongs to another word word2 = models.ForeignKey(Word, on_delete=models.CASCADE, related_name="Translation_word2") def __str__(self): return "{0} - {1}".format(word1.language, word2.language) On Monday, September 12, 2016 a

Re: How to populate self._reverse_dict with a default language code ?

On 14/09/2016 11:43 PM, Etienne Robillard wrote: Hi, Is there a way to populate self._reverse_dict to contain a default language_code in case the setting USE_I18N is set to False? return self._reverse_dict.get("language_code", defaultlanguagecode) or try: languagecode = failing_routine

Re: Import css in Django

On 16/09/2016 1:10 AM, Jonathan Cheng wrote: thx your code,though i cant run it in cmd That is correct. It is designed to be imported and called from settings.py. I'll send you a screenshot off-line Mike -- You received this message because you are subscribed to the Google Groups "Django u

Re: Import css in Django

On 16/09/2016 11:47 AM, Jonathan Cheng wrote: after importing announce,directories in settings.py | | ifDEBUG: Â Â Â Â announce(__name__,databases=DATABASES,backend="Postgres: 9.5",caches=CACHES) | | it said CACHES isn't defined when i running the server | python manage.py runserver | Ok

Re: How to populate self._reverse_dict with a default language code ?

#x27;en-au' which seems to work for me so I think that is a reasonable format for it. Cheers Mike Le 2016-09-14 à 20:33, Mike Dewhirst a écrit : On 14/09/2016 11:43 PM, Etienne Robillard wrote: Hi, Is there a way to populate self._reverse_dict to contain a default language_co

Re: HTML Flexbox CSS

Completely off-topic but I have found the CSS documentation and advice on https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ to be more effective and up-to-date than found on w3schools. w3schools always sorts to the top of the google page but you will see the developer.mozilla item th

email console backend is silent

Some little time ago my admin site stopped sending password reset emails. After checking all the credentials, ports, server names, etc it is still silent. So in the dev-server I set EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' and proceeded to request a password reset. Not

Re: Repetitve/Infinite migrations generated on ManyToManyField

On 27/09/2016 6:58 AM, Marvin Mednick wrote: I've the the following models related to a many-to-many relationship.  (Django 1.9.4 and sqlite) Each time I run makemigrations, it generates an AlterField migration, which migrate successfully executes (no errors), but running makemigrations

Re: email console backend is silent

ote: > > I would put print statements in the Django source code and try to follow > its execution. > > On Sunday, September 25, 2016 at 7:53:20 PM UTC-4, Mike Dewhirst wrote: >> >> Some little time ago my admin site stopped sending password reset >> emails. After

Re: Model Inheritance across apps

On 30/09/2016 10:33 AM, Malik Rumi wrote: Assume two models, class Parent(models.Model): and Child(Parent): Assume they are both in the same Project Can Child be in a different app than Parent? In most cases the answer seems to be yes. True. You only need to import Parent. But it might be be

Re: quasi-distributed system sharing data in django

On 6/10/2016 7:40 AM, Ricardo Pascal wrote: Hello folks, I have two django projects, (let call them A and B) they are independent applications (with different django versions), I'm in need to sync some data/models from A to B. My plan is to use the post_save signal to start a celery task th

Re: Windows users: do the line endings created by startproject/startapp matter?

On 13/10/2016 10:43 AM, Tim Graham wrote: There's an old ticket [0] noting that startproject/app create files with Unix line endings, even on WIndows. My question is whether or not this matters. Some things I thought of: I think version control programs like Git usually normalize line endings

Re: Headless testing

There is also BuildBot which can be programmed to do anything on multiple client/slaves running any OS http://buildbot.net/ On 13/10/2016 1:09 PM, Avraham Serour wrote: Hi, In Linux you can just use selenium chrome or firefox or anything and set up xfvb for headless, I have no idea if such a

Forbidden fix

I have two similar servers behaving differently. This is the staging server ... You don't have permission to access /substance/wsds/7291/ on this server. The production server is fine running Ubuntu 14.04 and Apache 2.2. The difference is that I have just upgraded staging to Ubuntu 16.04 and

Re: A Backup Model in Django?

On 17/10/2016 9:11 AM, James Schneider wrote: On Oct 15, 2016 11:40 PM, "Bernd Wechner" > wrote: > > A curious question I've had trouble finding an answer for alas. I have a model that I'd like to backup in the database in a backup model. This reminded me of

Re: How to: Django development and debugging

On Thursday, October 20, 2016 at 8:30:45 PM UTC-4, Don Thilaka Jayamanne wrote: Hi Everyone, I'm the author of a Python plugin for the VS Code editor (https://github.com/DonJayamanne/pythonVSCode ). Basically it provides intellisense,

transferring data between Postgres databases

I have a user who has done a lot of work (instead of playing) in the staging server and now wants to get that work into the production database. I'm about to research selective dump and load capabilities of Postgres but in the meantime can anyone suggest any shortcuts? Thanks Mike -- You re

Re: transferring data between Postgres databases

Django app. Aaron, thanks for that. Do you know if it will handle a bunch of related records in many tables to be copied as a related "set" to the other database. Both databases have identical structures. M [0] - http://www.sql-workbench.net/ -A On Sun, Oct 23, 2016 at 9:04 PM, M

Re: transferring data between Postgres databases

On 25/10/2016 7:09 AM, Erik Cederstrand wrote: Den 24. okt. 2016 kl. 06.04 skrev Mike Dewhirst: I have a user who has done a lot of work (instead of playing) in the staging server and now wants to get that work into the production database. I'm about to research selective dump and

Re: Negative User ID's

On 27/10/2016 9:57 AM, mich...@zanyblue.com wrote: Hi, The Django contrib User model is used to create accounts in Django applications. I would like to keep accounts associated with real people separate from accounts created for mailing list and/or service accounts. I was planning on using

Re: Django Project Structure

On 28/10/2016 5:17 PM, Deep Shah wrote: I have read this, but still confused. What would be the best practices for this? Your email doesn't say what you have read ("this" above?) so the following recommendation may be a duplication. In any case I recommend Two Scoops of Django[1] for well rea

multiple databases - two questions

I am planning some utility helper code to push selected records and their children from our staging database into the production database. The current database would be 'default' and I could add a second one called 'production' then read from 'default' and write to 'production'. (I need to chec

multiple databases - two questions

(this one might be easier to read) I am planning some utility helper code to push selected records and their children from our staging database into the production database. The current database would be 'default' and I could add a second one called 'production' then read from 'default' and wr

Admin - saveasnew to another database

I'd like to use the [Save as new] infrastructure to transfer records and their children to a different database. Can anyone give me some advice on whether this is a reasonable project to attempt? Would it be valuable for anyone else? My alternative is to build a separate mechanism for my own

Re: Admin - saveasnew to another database

ent ids in the destination database so all transfers will need to be done using queries. This is why piggy-backing on [Save as new] beats doing things either manually or programmatically in my own utility functions. Your thoughts? Mike On Tuesday, November 8, 2016 at 4:29:48 PM UTC-5, Mike D

Re: Canonical way of handling multiple types of users? (Profiles vs subclassing django.contrib.auth.models.AbstractUser)

On 9/11/2016 11:54 AM, Victor Hooi wrote: Hi, What is the current canonical way to handle multiple user-profiles in Django? For example - say you have "Teachers", "Students", "Parents" - you may have slightly different fields for each one and/or different behaviour. Students will have thing

Re: Admin - saveasnew to another database

ory. I'm skipping that one for the moment. I agree with Melvyn See below that it seems unusual to use Django's multi-database facilities to transfer data between staging and production. On Wednesday, November 9, 2016 at 4:51:39 AM UTC-5, Melvyn Sopacua wrote: On Wednesday

Re: localStorage to save answer to form until it is sent to server

On 11/11/2016 2:41 AM, Raniere Silva wrote: Hi all, I have some text area on my form that I expected that the user will take a few minutes to answer and I want to avoid them to need to type everything again if something happen (e.g. their device got out of battery). Something that I think I coul

Re: Admin - saveasnew to another database

To finish this thread, I have decided to abandon the attempt. My solution is to tell the users to avoid doing real work on the staging server. It exists only to check out new features. I feel better now. Thanks Melvyn and Tim Mike On 10/11/2016 11:08 AM, Mike Dewhirst wrote: On 10/11/2016

Re: request

Here is a good place to start ... https://www.djangoproject.com/ then continue here ... https://docs.djangoproject.com/en/1.10/intro/tutorial01/ Welcome On 28/11/2016 9:03 AM, Bhanu jamwal wrote: i am new to it please let me know the aims and steps regards Bhanu -- You received this message

Re: makemigrations generates new migration when nothing has changed

On 1/12/2016 3:56 AM, Francis Fisher wrote: Any idea why makemigrations would fail to recognise that a migration has already been generated? I think migrations is seeing field choices differently each time it scans the model. Can you use a list rather than a tuple for choices? (Or vice versa

How can I access field values generically?

Consider a chemical mixture with a bunch of ingredients. Both mixture and ingredients are instances of the same class so they have the same fields. They also have many related models, including 1:1, 1:n and n:m. Each related model will have none or many TextField's. The objective is to program

How can I access field values generically?

Sorry about that ... here it is again. - - - - - - - - - - - - - - - - - - - Consider a chemical mixture with a bunch of ingredients. Both mixture and ingredients are instances of the same class so they have the same fields. They also have many related models, including 1:1, 1:n and n:m. Each

Re: makemigrations generates new migration when nothing has changed

On 13/12/2016 9:58 AM, Francis Fisher wrote: On Wednesday, 30 November 2016 22:43:55 UTC, Mike Dewhirst wrote: On 1/12/2016 3:56 AM, Francis Fisher wrote: > Any idea why makemigrations would fail to recognise that a migration > has already been generated? I think migr

Re: M2M Question

On 16/12/2016 8:52 AM, Matthew Pava wrote: I have a Document model that has an M2M-symmetrical field on itself. The idea is that we can “link” documents to other documents. It’s very simple to find the linked documents of a particular document, but is there an easy way to get all the linked

Re: How can I access field values generically?

e populated with ingredient data from the same fields. "\ "Edit as required. To retrieve that data again add an ellipsis (...) "\ "somewhere in the field and click [Save]" Any advice would be appreciated. And appreciation might involve red wine. Thanks Mike On 7/12/2016 9:38 AM, Mike De

Re: How can I access field values generically?

universal binder, sawdust). Keep in suitable, closed containers for disposal. Styrene: Soak up with inert absorbent material (e.g. sawdust). Keep in closed containers for disposal. On Wednesday, December 21, 2016 at 4:55:49 AM UTC+2, Mike Dewhirst wrote: Bumping this qu

Re: How can I access field values generically?

Very generous. Thank you. It looks as though you did get the model structure. Your first comment nails it because mixtures can have other mixtures as ingredients. I'm right into recursion nowadays :) Mike On 22/12/2016 7:48 PM, C. Kirby wrote: Ill be honest, I'm still not getting how your mode

Re: Admin - saveasnew to another database

say the staging server gets blown away frequently - use it at your peril! I do like your DRAFT notion. Thanks Mike On 3/01/2017 11:52 AM, Fred Stluka wrote: Mike, On 11/11/16 8:00 AM, Mike Dewhirst wrote: > ... My solution is to tell the users to avoid doing real work on the > staging se

Re: multiple databases - two questions

no Windows or Gates. On 11/4/16 12:37 AM, Mike Dewhirst wrote: (this one might be easier to read) I am planning some utility helper code to push selected records and their children from our staging database into the production database. The current database would be 'default'

browser testing

Does anyone have any recommendations for testing via the browser? I have heard Selenium mentioned and saw a feature contrast between Selenium and Imacro which indicated Imacro is the best choice. Before I do the right thing and dig into it myself, are there any war stories or testimonials out

Re: browser testing

than the other way around. This could be because of the difference in relative difficulty between the two. Selenium has a learning curve that makes it better suited to professional testers than, say, random client representatives doing UAT. On Wed, Jan 4, 2017 at 6:30 PM, Mike Dewh

Re: browser testing

makes it better suited to professional testers than, say, random client representatives doing UAT. On Wed, Jan 4, 2017 at 6:30 PM, Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote: Does anyone have any recommendations for testing via the browser? I have heard Selenium men

Re: Am I stupid or is there an essential error in Django 1.10 Docs?

On 16/01/2017 5:01 AM, 'Peter Müller' via Django users wrote: Hello everybody. I just began learning how to use django. So I wanted to include data from the database in a testwebsite. Therefore I made a new app and created a model called "user" and You don't need to create your own user mod

Re: Projects vs. apps

On 17/01/2017 9:44 AM, Thufir Hawat wrote: Not sure that I follow: What’s the difference between a project and an app? An app is a Web application that does something – e.g., a Weblog system, a database of public records or a simple poll app. A project is a collection of configuration and app

queries and date ordering

If I have a model with ...     created = models.DateTimeField(auto_now_add=True) ... and in class Meta     ordering = ['-created'] Is it true that with multiple records where the query search params are identical the first record returned by the query will always be the most recent? Pos

Re: queries and date ordering

On 9/01/2019 4:29 pm, Dylan Reinhold wrote: No you can't rely on it being the same order, if the database is re-indexed or reorged that order might change. Thanks On Tue, Jan 8, 2019 at 9:18 PM Mike Dewhirst <mailto:mi...@dewhirst.com.au>> wrote: If I hav

How can I launch a page from a model method

Depending on field content before or after saving, it may - or may not - be necessary (in the Admin) to launch a non-Admin page. In the Admin one particular model can have a combination of properties which require a payment. I want to launch a payment page if that combo is detected. How can

Admin problem launching a non-Admin page

I'm studying the Admin docs trying to figure out how to launch a non-Admin page when required. Django 1.11 and Pythons 2.7/3.6 The parts which look promising are ... [1]    ModelAdmin.response_add() [2] ModelAdmin.response_change() [3]    ModelAdmin.add_view() [4]    ModelAdmin.change_view() an

Re: Admin problem launching a non-Admin page

ate. A bit tricky first time but then it seems straightforward. Derek On Tuesday, 15 January 2019 11:02:30 UTC+2, Mike Dewhirst wrote: I'm studying the Admin docs trying to figure out how to launch a non-Admin page when required. Django 1.11 and Pythons 2.7/3.6 The p

Admin form_url breakout problem

How can I break out of the Admin to a payment gateway? I've tried form_url='billing:payment_view'  in SubstanceAdmin.change_view() unsuccessfully. I can semi-break out of the admin and get the beginning of a payment happening with the following ...

Re: Admin form_url breakout problem

a way ... Thanks Mike *From:*django-users@googlegroups.com [mailto:django-users@googlegroups.com] *On Behalf Of *Mike Dewhirst *Sent:* Wednesday, January 23, 2019 12:57 AM *To:* Django users *Subject:* Admin form_url breakout problem How can I break out of the Admin to a payment gateway? I&

Re: Admin form_url breakout problem

lto:django-users@googlegroups.com] On Behalf Of Mike Dewhirst Sent: Wednesday, January 23, 2019 3:48 PM To: django-users@googlegroups.com Subject: Re: Admin form_url breakout problem On 24/01/2019 1:08 am, Matthew Pava wrote: It looks like your second URL is different than the first. */admin

Re: Charfield variable length

On 24/01/2019 9:14 am, 'Odile Lambert' via Django users wrote: Hello I have problems with the Charfield max_length. In the source code, the possibility exists to have max_length = None but it does not pass Django check when  models.py. contains a charfield = None I can understand that there

Re: Admin form_url breakout problem

inal Message- From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On Behalf Of Mike Dewhirst Sent: Wednesday, January 23, 2019 5:23 PM To: django-users@googlegroups.com Subject: Re: Admin form_url breakout problem On 24/01/2019 9:35 am, Matthew Pava wrote: Have you trie

Re: how can I reference a field from one model to another model

On 24/01/2019 5:28 pm, carlos wrote: Hello, I do not know if I'm asking the question correctly, but I need to call a field of one model in another model example: class ModelDad(models.Model):     name = blablabla class ModelChild1():    fk(ModelDad)    number = models.IntegerField() class

Re: Admin form_url breakout problem

On 25/01/2019 2:40 am, Matthew Pava wrote: Hi Mike, I'm not really seeing why this is throwing errors at you. It seems like you've done everything right. Could you provide the code (or the relevant parts) for the Substance Admin form? Thanks!

<    5   6   7   8   9   10   11   12   13   14   >