Re: Management command scheduling options

2023-10-25 Thread Adam Stein
On Wed, 2023-10-25 at 08:24 -0400, Larry Martell wrote: > On Wed, Oct 25, 2023 at 5:35 AM Mike Dewhirst > wrote: > > > > Ahmedrufai > > > > I looked at APScheduler and like Celery it is too much of a > > sledgehammer for my tiny problem. > > > > I ended up using cron to launch the command each

Re: circular imports error

2021-06-11 Thread Adam Stein
Glad to be of help. Sometimes it just takes a fresh pair of eyes. On Fri, 2021-06-11 at 17:33 -0500, frank dilorenzo wrote: > I hate to sound corny but you sir are my hero!.  Thanks,  it all > works now >   > frank- > > > On Fri, Jun 11, 2021 at 2:43 PM Adam Stein wrote:

Re: circular imports error

2021-06-11 Thread Adam Stein
Since you said 3 separate apps, I assume each of these classes are in a separate file. However, you have the line: from .models import Supplier which would make it seem that Supplier is defined in the same file as Shipment. Shipment should be in ".models" and if Supplier is also defined in the

Re: Django tests and token timeout

2018-07-30 Thread Adam Stein
Whenever I need to set the date or datetime to something specific for unit tests, I use Forbidden Fruit (https://github.com/clarete/forbidden fruit). id="-x-evo-selection-start-marker"> On Mon, 2018-07-30 at 16:12 +0200, Birger Schacht wrote: > hi, > > i'm using my own PasswordResetTokenGenerator

Re: Initial data, tests and migrations

2017-02-22 Thread Adam Stein
On Wed, 2017-02-22 at 15:06 +, 'Tom Evans' via Django users wrote: > On Wed, Feb 22, 2017 at 2:41 PM, Adam Stein <a...@csh.rit.edu> wrote: > > > > On Wed, 2017-02-22 at 14:22 +, 'Tom Evans' via Django users > > wrote: > > > > The URL you refer

Re: Initial data, tests and migrations

2017-02-22 Thread Adam Stein
On Wed, 2017-02-22 at 14:22 +, 'Tom Evans' via Django users wrote: > On Wed, Feb 22, 2017 at 12:47 AM, Melvyn Sopacua > om> wrote: > > > > On Tuesday 21 February 2017 19:00:42 'Tom Evans' via Django users > > wrote: > > > > > > > > > > > > Previously, these instances were loaded from a

Re: Mocking date and time in LiveServerTestCase?

2017-01-25 Thread Adam Stein
When I need to set the date to a known day for tests, I use forbiddenfruit (https://github.com/clarete/forbiddenfruit). On Wed, 2017-01-25 at 20:46 +0100, Carsten Fuchs wrote: > Dear Django fellows, > > I'm using LiveServerTestCase with Selenium. The application code run > by  >

Re: Test fails when run in whole test suite - but not stand-alone?

2016-06-02 Thread Adam Stein
When I've had that happen before, it's because some previous test changed something (like a setting value or the site domain) that influenced the test that failed. To narrow it down, I would run all the tests up to and including the failed one. That should fail, then I start taking out half the

Re: Storing images in a database using Django.

2016-05-06 Thread Adam Stein
You can take a look at django-db-file-storage https://readthedocs.org/projects/django-db-file-storage/ In my case, I was making something for myself and the hosting server doesn't allow me access to any kind of file system, so I found this. On Fri, 2016-05-06 at 15:42 -0500, Alex Heyden wrote: >

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Adam Stein
On Wed, 2014-09-24 at 14:30 -0700, John Schmitt wrote: > I appreciate what you said about deploying and not editing "live" files > directly. Hope the information is of use to you. > However, I have several projects in various stages of development and when I > first start a project, I don't

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Adam Stein
On Wed, 2014-09-24 at 12:03 -0700, John Schmitt wrote: > On Wed, Sep 24, 2014 at 07:40:51AM -0400, Adam Stein wrote: > > Not sure what you are looking for in terms of Django template support. > > The only difference between pycharm community (free) and commercial in > > te

Re: What is *the* django 1.7 IDE which is opensource & multiplattform

2014-09-24 Thread Adam Stein
Not sure what you are looking for in terms of Django template support. The only difference between pycharm community (free) and commercial in terms of Django support that I've noticed is that Django's development web server won't restart automatically when code changes in the community edition.

Re: Did Ubuntu 14.04 or Linux Mint 17 break your Django project files?

2014-07-16 Thread Adam Stein
IntegrityError is at the database level (not the OS). Shouldn't have anything to do with the OS specifically. Has the database you are using changed? On Wed, 2014-07-16 at 13:53 -0700, Pepsodent Cola wrote: > Hi, > I have been learning and developing my first Django project in Linux > Mint 14

Re: Question about moving code to product from local or development server.

2014-06-07 Thread Adam Stein
I use Fabric (http://www.fabfile.org/), which bills itself as a Python library and command line tool for streamlining the use of SSH for application deployment or systems administration tasks. No need to invent your own. On Sat, 2014-06-07 at 16:50 -0400, Chen Xu wrote: > I am building a django

Re: BookMarker Project - Opening local files on localhost through Django generated pages

2014-05-20 Thread Adam Stein
On Tue, 2014-05-20 at 11:29 -0700, Aseem Bansal wrote: > I am working on a BookMarker project for managing my bookmarks. I was > creating the search page for lisitng bookmarks as per categories. I > hit a snag while testing it. I am unable to open locally stored > webpages. I understand that it is

Looking for a full time Django/Python job (Rochester, NY area OR remote)

2014-01-06 Thread Adam Stein
tart) to allow the human to go first. All other projects were created by someone else, but I added functionality that I needed for home Django projects. You can contact me at 'a...@csh.rit.edu' or through my LinkedIn profile. -- Adam Stein (a...@csh.rit.edu) -- You received this mess

Re: Trouble with STATIC_URL in v1.5.2

2013-09-17 Thread Adam Stein
I'm not using RequestContext(). The behavior must have changed between v1.4 and v1.5 regarding this. On Tue, 2013-09-17 at 08:27 -0700, Kelvin Wong wrote: > If your software works then I guess it works, but I just ran this in > the shell on Django 1.5.4. > > > $ python manage.py shell > Python

Re: Trouble with STATIC_URL in v1.5.2

2013-09-17 Thread Adam Stein
Turns out that I had to use the new {% static %} template tag. It seems that STATIC_URL is only set in the context for template use when in DEBUG mode (didn't look in the code, but it appears that way). {% static %} works for both development and production environments. It was pretty simple

Trouble with STATIC_URL in v1.5.2

2013-09-16 Thread Adam Stein
Maybe this is something well known. I'm using STATIC_URL in my templates. Worked perfectly in Django 1.4.x. Upgraded to v1.5.2. Now STATIC_URL ONLY works when the DEBUG setting is True. When set to False (For production), STATIC_URL is an empty string in the template. Anybody have any idea

Re: Generating pdf from html using Pisa

2013-02-20 Thread Adam Stein
In myview(), you are setting "mylist" to results but I don't see results defined in myview() anywhere. On Thu, 2013-02-21 at 00:35 +0530, Satinderpal Singh wrote: > I am trying to produce pdf from html using the following code, but > unable to do so, it gives an error that, global name 'results'

Re: displaying images

2011-11-23 Thread Adam Stein
path. Take a look at the source of your rendered page, make sure the image URL is correct and that there is actually an image there (open the URL in it's own browser window/tab). Hopefully that will lead you to the source of your problem. -- Adam Stein @ HCL America Inc.Email: a...@ppdev.m

Re: Trouble setting a form field's value in clean()

2009-11-16 Thread Adam Stein
is group, send email to django-us...@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=. > -- Adam Stein @ Xerox Corporation Email: a..

Re: Trouble setting a form field's value in clean()

2009-11-16 Thread Adam Stein
On Mon, 2009-11-16 at 17:57 +0100, Dennis Kaarsemaker wrote: > On Mon, Nov 16, 2009 at 5:12 PM, Adam Stein <a...@eng.mc.xerox.com> wrote: > > Running Django v1.1.1 on Apache v2.2.8 with Firefox v3.5.4. > > > > I have a very simplified and unreal example below to demon

Trouble setting a form field's value in clean()

2009-11-16 Thread Adam Stein
ake 'string2' not required (so it winds up being an empty string), there still doesn't seem to be a way to change the empty string to have a value. While validation passes, the resulting POST data still shows 'string2' as an empty string. I thought that changing and returning the cleaned data would do it

Re: Help to choose web-template

2009-10-16 Thread Adam Stein
er or main menu). > > I appreciate any advice. > > -- > regards, > Mihail > > > > -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~

Re: Moving the .py(c|o) files out of the app?

2009-09-28 Thread Adam Stein
iles to be written to? In production, I'm not wild about the idea of > > the app folders being writable by the Apache process. Any guidance? > > Thanks? > > > > -- > > -- Christophe Pettus > > x...@thebuild.com > > > > > > > > > >

Using the login page AND RemoteUserMiddleware depending on user?

2009-09-08 Thread Adam Stein
to use what user is already set to? -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~-~--~~~---~--~~ You received this message

Authentication integration with Netegrity SiteMinder?

2009-08-26 Thread Adam Stein
instead because of corporate policy. Figure I would ask to see if anybody has already done this before I try to figure this out from scratch. SiteMinder gives me the login name in an environment variable which I can then tie into the Django user system. -- Adam Stein @ Xerox Corporation Email

Re: Missing Roles (group of groups)

2009-07-30 Thread Adam Stein
> Are there any other django coders who miss this? > > I know that this can be implemented with only a few lines. But a reusable > solution would be better. > > Thomas > -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views ex

Any way to save the output of a template filter to another variable?

2009-07-08 Thread Adam Stein
it (which is what it looks like), anybody know of any tags that can do this? -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam

Re: Error loading MySQLdb module: libmysqlclient_r.so.16 - Help please

2009-06-15 Thread Adam Stein
import MySQLdb' statement work, is that the correct environment variable? > > > > As a note, I installed mysql from the .tar.gz files and MySQLpython from > > the .tar.gz files as well. I can't use any sort of package manager to > > instal

Re: problem using ajax in django

2009-06-10 Thread Adam Stein
// alert($("#id_state").val()); > // getdistricts($("#id_state").val()); > > $("#id_state").change(function(){ > getdistricts($("#id_state").val()); > }); > > //

Re: Using Django authentication for web pages outside Django?

2009-06-08 Thread Adam Stein
Thanks for the link. The description sounds like just what I need. On Fri, 2009-06-05 at 20:46 -0700, Graham Dumpleton wrote: > Have a look at: > > http://www.openfusion.com.au/labs/mod_auth_tkt/ > > Graham > > On Jun 6, 6:26 am, Adam Stein <a...@eng.mc.xerox.co

Re: Using Django authentication for web pages outside Django?

2009-06-08 Thread Adam Stein
/django/old app) > > On Jun 5, 1:26 pm, Adam Stein <a...@eng.mc.xerox.com> wrote: > > I'm trying to figure out a way to use Django authentication to control > > access to web pages (on the same web server) that are NOT under Django. > > > > I have found som

Using Django authentication for web pages outside Django?

2009-06-05 Thread Adam Stein
if necessary. -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: LDAP support in Django?

2009-06-05 Thread Adam Stein
d up with a > certain other Python web framework's poor documentation and unhelpful > community. > > Thanks, > > Mike > -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been pro

Re: Using the django orm outside a web system

2009-06-03 Thread Adam Stein
set in order to > easily use the ORM automatically for me to be able to work with those > files over the web interface later?? in other words, what settings are > loded everytime I execute python manage.py shell? > > Thanks a lot > jhv > > > -- Adam Stein @ Xerox Corporatio

Re: ValidationError exception message not coming through

2009-05-28 Thread Adam Stein
ore reaching the > clean_PDF_File method, that is it fails at the FileField's clean > method. Perhaps, you haven't supplied a file. :) > > On May 28, 3:02 pm, Adam Stein <a...@eng.mc.xerox.com> wrote: > > Running Django v1.0.2. > > > > I have a form with a file fie

ValidationError exception message not coming through

2009-05-28 Thread Adam Stein
ror message to the form if I don't receive it in the first place. When the field is blank, I get the correct error message that I expect to see: Errors = [ PDF_FileThis field is required. ] Any thoughts on what else I might try or look at? -- Adam Stein @ Xerox Corporation Email: a..

Re: Can not get Django admin page

2009-05-05 Thread Adam Stein
gt; > > > 2. Run python manage.py syncdb. Since you have added a new > > > > application to INSTALLED_APPS, the database tables need to be > > > > updated. > > > > 3. Edit your mysite/urls.py file and uncomment the lines below the > > > > “Uncomment th

Re: Can I limit the choices in a ContentType field in admin?

2009-04-01 Thread Adam Stein
> > So it should be > > CHOICES = ( > > (ContentType.objects.get_for_model(My_Model), "Model 1"), > > (ContentType.objects.get_for_model(My_Other_Model), "Model > > 2"), > > ) > > > > Obviously, make sure you import your model befo

Re: Can I limit the choices in a ContentType field in admin?

2009-04-01 Thread Adam Stein
et_for_model(My_Model), "Model 1"), > (ContentType.objects.get_for_model(My_Other_Model), "Model > 2"), > ) > > Obviously, make sure you import your model before you try to use it. > > On Mar 23, 3:26 pm, Adam Stein <a...@eng.mc.xerox.com> w

Can I limit the choices in a ContentType field in admin?

2009-03-23 Thread Adam Stein
sly, if I don't use choices, it works but then I have a very long list of model choices. -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~-~--~~

Re: Any way to show progress during a short process job?

2009-02-19 Thread Adam Stein
store the iterator's contents. Guess I found a bug to exploit. Too bad they are changing it. Let me take another look at Kevin's suggestion. Maybe I can play around with showing the progress bar (unhiding it) via the JavaScript example. -- Adam Stein @ Xerox Corporation Email: a...@eng.

Re: Any way to show progress during a short process job?

2009-02-19 Thread Adam Stein
} > > //--> > > And your HTML code looks like this: > > >class="checkout_button" /> > > > >Please wait while your request is being processed... > > > Cheers, > Kevin Audleman > > On Feb 18, 2:52

Any way to show progress during a short process job?

2009-02-18 Thread Adam Stein
to indicate the computer hasn't frozen :-{} It seems that I can only return HTML to be displayed once from a view. Is there a way to get the functionality described above somehow? -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been

Re: Changing default app url in development server

2009-02-04 Thread Adam Stein
>> > >> >> >> > >> >> >> > >> >> >> > Hi, > >> >> >> > >> >> >> > My question is: > >> >> >> > >> >> >> > Is there a way to

Re: Changing default app url in development server

2009-02-04 Thread Adam Stein
gt;> > >> >> > If it's a problem, maybe someone have a good reference for > >> >> > configuring > >> >> > apache server on MAC. > >> >> > >> >> > Regards, > >> >> > Arshavski Alexander. > >>

Re: Any way to NOT escape a percent sign using 'contains'?

2009-01-30 Thread Adam Stein
000, Adam Stein wrote: > > According to the docs, when using 'contains' in filter() a percent sign > > or underscore is automatically escaped. However, in my case I want the > > resulting SQL to use the percent sign. > > > > I know 'contains' will fill in the outs

Any way to NOT escape a percent sign using 'contains'?

2009-01-29 Thread Adam Stein
to know that they would have to use "a.*b" instead of "a*b", just trying to make it simplier for myself and the people using the system. -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com Disclaimer: Any/All views expressed here have been proven

Re: http links without using URLs.py

2009-01-27 Thread Adam Stein
SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs > > Thanks, > Ana > > On Jan 27, 9:23 am, Adam Stein <a...@eng.mc.xerox.com> wrote: > > I ONLY use it for development with the Django server. I only set up to > > serve static pages when DEBUG = True (as they sh

Re: http links without using URLs.py

2009-01-27 Thread Adam Stein
o url requests. Do you know of a > way to get apache to override django? > > Thanks, > > Ana > > On Jan 27, 8:55 am, Adam Stein <a...@eng.mc.xerox.com> wrote: > > Check out: > > > > http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs &

Re: http links without using URLs.py

2009-01-27 Thread Adam Stein
t; go directly to the page ignoring the django requests. > > Is there a simple work around for this, that will allow me to continue > to use the convenience of the base.html inheritance? > > Thanks, > > Ana > -- Adam Stein @ Xerox Corporation Email: a...@eng.mc.xerox.com

Re: Your IDE of choice

2009-01-07 Thread Adam Stein
n looking (and I'm pretty sure it's not only me who's been > looking) for some good tutorial on how to do this. > > Luckily I use OS X at home, which probably means that I can use this > without any modification... :-D > > Thank you very much! > > Oscar > > On Wed, Jan 0

Re: Your IDE of choice

2009-01-07 Thread Adam Stein
> >> > prefer the eclipse sort of IDE's. > > >> > > >> > > > >> > > >> > From: django-users@googlegroups.com > > >> > [mailto:django-us...@googlegroups.com] On Behalf Of Damien Hou

Issues with setting attrs and Media when creating my own widget

2009-01-06 Thread Adam Stein
d appreciate any help either by example or pointers to examples or docs. I looked in the Django source and it looks like the admin stuff sets Media just like I'm doing. The Django doc page for Media also shows an example that looks just like what I'm doing (doesn't mention that I have to do anything else).

Re: Looking for an example on how to use us.forms.USZipCodeField

2008-09-30 Thread Adam Stein
agee wrote: > On Fri, Sep 26, 2008 at 9:11 PM, Adam Stein <[EMAIL PROTECTED]> wrote: > > > > While there is are phone number and US state model fields, there doesn't > > seem to be the equivalent zip code field, even though there is a zip > > code form element.

Looking for an example on how to use us.forms.USZipCodeField

2008-09-26 Thread Adam Stein
. Thanks for any links, pointers, examples, etc. -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: Any/All views expressed here have been proven to be my own. [http://www.csh.rit.edu/~adam/] --~--~-~--~~~---~--~~ You received

Re: What do you use as a build tool (like Ant or make)

2008-09-09 Thread Adam Stein
ts. > * transfer distribution > > Perhaps you just hand build python scripts to do it. Or do you use > Ant or make? I'm coming over from Java, and used to use Ant, but I'm > migrating over to Python and would like to use what is generally > considered the Pythonic way. >

Re: Is there a ModelChoiceField() HTML widget that accepts typing?

2008-03-03 Thread Adam Stein
a multiwidget. > > After you've coded up your own, you can tell CharField to use it by > doing something like: > > from django import newforms as forms > class MyForm(forms.Form): > combobox = forms.fields.CharField(widget=MyCustomWidget()) > > On Feb 29, 11:24 a

Re: Having problems changing the default query set for Admin

2008-02-11 Thread Adam Stein
suggestions are welcome. On Mon, 2008-02-11 at 11:17 -0500, Adam Stein wrote: > Using Django v0.96 > > According to what I've been able to find, I can assign my own Manager to > a Model. Setting up my default Manager would then affect the default > query, which includes the one the Admin

Having problems changing the default query set for Admin

2008-02-11 Thread Adam Stein
never was. Am I missing something? Can I affect the query the Admin view uses? -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: All views expressed here have been p

Re: Getting development environment configured

2008-02-08 Thread Adam Stein
e website > directory itself instead of the PARENT of the website directory in the > PythonPath. Now I just need to tell Apache to not process anything > else with mod_python and I should be good to go. > > Thanks Adam, > b > > On Feb 8, 1:08 pm, Adam Stein <[EMAIL

Re: {% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
Where would I put this? -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: All views expressed here have been proved to be my own. [http://www.csh.rit.edu/~adam/] --~--~-~--~~~---~--~

Re: {% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
e page to the 0.96 > documentation. I took the quote from the v0.96 doc (http://www.djangoproject.com/documentation/0.96/templates/). -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: All views expressed here

{% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
This isn't true unless {% load %} doesn't count as a template tag. My derived templates work if I put {% extends %} first or {% load %} first. -- Adam Stein @ Xerox Corporation Email: [EMAIL PROTECTED] Disclaimer: All views expressed here