Re: Python Django Training

2020-02-02 Thread May
hello .. please add me, i like to learn .. On Saturday, February 1, 2020 at 4:42:52 PM UTC+3, Srikanth K wrote: > > Hi, > > I am from Hyderabad. I am Python Developer by Profession. I am eager take > up any Python , Django Training (online Preferrable or Weekends). Members > who require can

Re: how to convert django application to Windows exe format

2019-07-21 Thread Jonathan May
Pip install pyinstaller and then run “pyinstaller — onefile filename.py” On Sun, Jul 21, 2019 at 6:01 PM Jonathan May wrote: > You can use pyinstaller to convert your py file to exe > > On Sun, Jul 21, 2019 at 5:57 PM Mike Dewhirst > wrote: > >> Try search

Re: how to convert django application to Windows exe format

2019-07-21 Thread Jonathan May
You can use pyinstaller to convert your py file to exe On Sun, Jul 21, 2019 at 5:57 PM Mike Dewhirst wrote: > Try searching for python to exe > > > *Connected by Motorola* > > > Balaji Shetty wrote: > > Hi > > Can anyone please tell me > how to convert django application to Windows exe format.

Re: django channels group subscriptions

2017-06-01 Thread Brian May
On Friday, 2 June 2017 14:08:40 UTC+10, Andrew Godwin wrote: > > I don't have any direct examples to hand - and this sort of thing does > come all the time, but much like Django is not in the business of including > a full CMS, Channels can't add lots of high-level features without really >

Re: django channels group subscriptions

2017-06-01 Thread Brian May
On Friday, 2 June 2017 13:04:48 UTC+10, Andrew Godwin wrote: > > You can't do what you ask with the current Groups system - it is > deliberately very simple as anything more complex involves picking scaling > tradeoffs that are particular to the thing it's powering. You'll have to > layer some

django channels group subscriptions

2017-06-01 Thread Brian May
Hello, I would like to be able to create a Django Channels group such that: 1. Websockets can can subscribe and unsubscribe (or disappear) to group that the client specifies. 2. When the first client subscribes to a group, it starts some process (e.g. via celery task) that feeds

Re: AttributeError: type object 'Product' has no attribute '_meta'

2015-12-02 Thread Lucas Vieira May
try this: from django.db import models # Create your models here. class Product(models.Model): item_name = models.CharField(max_length=100) item_price = models.IntegerField() item_image = models.ImageField() def __unicode__(self): return self.item_name class Meta: # Do

media files

2010-06-01 Thread Brian May
. These apps may be written by multiple people. This raises some issues: * If you are writing an app that is designed to be reusable, and comes with say a JavaScript file, what path should you use to reference the file? Different people seem to have different directory structures for media files

Re: mod_wsgi and stderr

2010-01-11 Thread Patrick May
On Jan 5, 1:55 pm, Patrick May <patrick@codestreet.com> wrote: >                 I'm running Django using mod_wsgi under Apache.  I'm trying > to write messages to the Apache error log with: > >                 sys.stderr.write('Message...') > > but for some

Re: Django, Apache, mod_wsgi, GET works, POST doesn't

2010-01-07 Thread Patrick May
On Jan 6, 3:22 pm, Rob <r.tirr...@gmail.com> wrote: > Have you managed to figure this out - I'm having a similar (I believe > the same) issue. It was the typo pointed out by Daniel Roseman. You may need to turn on a more detailed debugging level in your httpd.conf to see it in th

Re: mod_wsgi and stderr

2010-01-05 Thread Patrick May
On Jan 5, 2:29 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Tue, Jan 5, 2010 at 2:22 PM, Patrick May <patrick@codestreet.com>wrote: > > > > > On Jan 5, 2:18 pm, Karen Tracey <kmtra...@gmail.com> wrote: > > > On Tue, Jan 5, 2010 at 1:5

Re: mod_wsgi and stderr

2010-01-05 Thread Patrick May
On Jan 5, 2:18 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Tue, Jan 5, 2010 at 1:55 PM, Patrick May <patrick@codestreet.com>wrote: > > >                  I’m running Django using mod_wsgi under Apache.  I’m > > trying to write me

mod_wsgi and stderr

2010-01-05 Thread Patrick May
I'm running Django using mod_wsgi under Apache. I'm trying to write messages to the Apache error log with: sys.stderr.write('Message...') but for some reason they don't appear. This is under OS X (Snow Leopard). Do I have to configure something in httpd.conf

RE: Django, Apache, mod_wsgi, GET works, POST doesn't

2010-01-05 Thread Patrick May
Can you make it fail in the development server, with DEBUG turned on? If so, you can get more helpful error display and/or do pdb.set_trace() and poke around. I'll give that a try, thanks! -- You received this message because you are subscribed to the Google Groups "Django users" group. To

RE: Django, Apache, mod_wsgi, GET works, POST doesn't

2010-01-05 Thread Patrick May
Assuming the code you've posted is a real cut and paste, you have "HTTPResponse" for POST but "HttpResponse" for GET. Python is case- sensitive, so only "HttpResponse" will work. Thanks, that was it. Are errors like that written to a log file anywhere? Thanks again, Patrick -- You received

Django, Apache, mod_wsgi, GET works, POST doesn't

2010-01-04 Thread Patrick May
Hi, I have Django running under Apache with mod_wsgi. I've got a simple URL handler that looks like this: def handler(request): response = None if request.method == 'POST' or request.method == 'PUT': response = HTTPResponse(status=201) elif request.method == 'GET':

Re: Timezones in Django

2009-08-11 Thread Brian May
e two fields, one for the datetime in UTC, and another one for the timezone. I have a template filter (or tag - my memory is fuzzy) to convert the UTC time to the specified timezone for displaying. -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~~---~--~

Re: Select_related and foreign keys

2009-08-05 Thread Brian May
uldn't it help here too? {% for i in object.object_set.select_related %} ... {% endfor %} Or have I misunderstood how select_related works? -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~~---~--~~ You received this message because you ar

Re: permalink don't works

2009-07-31 Thread Brian May
t; this case, because we only want to pass keyword parameters, not > positional ones. > --- > isn't it the right text? Yes, you are right. Not sure how I missed this now. Repeatedly. :-( -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~--

Re: Stopping people loging in twice

2009-07-31 Thread Brian May
On Fri, Jul 31, 2009 at 08:04:50AM -0700, When ideas fail wrote: > Is there a way i can stopped people who are already logged in logging > in again? My initial thought - this sounds risky - for a website. How do you know if the user is already logged in? The computer they were using ma

Re: Removing objects with many-to-many relationship

2009-07-30 Thread Brian May
re a different story. You do have to be careful here. -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: permalink don't works

2009-07-29 Thread Brian May
h doesn't work - seems so obvious now...). I think django is great, unfortunately sometimes the documentation is lacking. -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Goog

Re: Model save() weird behaviour

2009-07-20 Thread Brian May
even if it wasn't commented out it does nothing. Maybe you meant to say: self.fulltitle = self.title = 'QWERTY' As such, what you have is: self.fulltitle = self.title self.title = 'sampletext' self.save() So the new value of self.fulltitle depends on what self.title previously was. -- Br

Re: how to call a view from inside a decorator?

2009-06-27 Thread Brian May
eturn HttpResponseRedirect("/2009/message/%s/" % msg) > > return wrapper > --end of decorator > > obviously this f(*args,**kwargs) is not the correct way to call the view. Any > clues? I have never written a decorator, so I may be completely off here, however shou

Re: Rendered output from a template tag

2009-06-26 Thread Brian May
ems silly to have to duplicate everything for every tag. However the documentation seems to suggest it is not possible to simplify this? -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~~---~--~~ You received this message because you are subscribed to th

Re: reverse url fails on existing url

2009-06-16 Thread Brian May
d arguments '{'args': u'my_name'}' not found. I haven't double checked, but I think that should read: {% url public_comments user.username %} or {% url public_comments username=user.username %} -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~~---~--~

Re: dumpdata and loaddata as simple DB migration tool?

2009-06-03 Thread Brian May
ged after doing a loaddata/dumpdata. I could reproduce this on demand. I don't expect anybody to take my claims too seriously, the problems I encountered were probably fixed ages ago. I don't like to assume something is fixed though unless I have some confirmation. -- Brian May <br...@microc

Re: multiple column primary key

2009-06-03 Thread Brian May
dex, meaning it can't be used. -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~~---~--~~ 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

Re: dumpdata and loaddata as simple DB migration tool?

2009-06-03 Thread Brian May
stage, and it seemed fine, until I realized non-ascii (UTF8 I think) characters were being siliently currupted. Of course django has changed a lot since then so this may no longer be an issue. I also tried sql dump with sql, however at the time I couldn't work out how to get sqlite to dump that da

Re: comma seperated lists

2009-05-31 Thread Brian May
On Fri, May 29, 2009 at 01:50:38AM -0700, V wrote: > if you do this to get a comma separated list you might like > https://launchpad.net/django-export-csv No, I don't use CSV here, but it is nice to know such a facility exists - I have used CSV for other projects. Thanks. -- Brian M

Re: comma seperated lists

2009-05-31 Thread Brian May
On Fri, May 29, 2009 at 02:03:59AM -0700, Daniel Roseman wrote: > Alternatively, you could use the join filter: > > {{ object.photoperson_set.all|join:", " }} I considered that, however, I don't think I can set the tag for every person, and the result would be I cna't

Re: comma seperated lists

2009-05-28 Thread Brian May
On Thu, May 28, 2009 at 11:36:10PM -0500, Alex Gaynor wrote: > Loops put some vary helpful variables in the context, so you can do > something like: > > {% for pp in object.photoperson_set.all %}{{pp.person}}{% if not forloop.last %}, > {% endif %} {% endfor %} Thanks. Looks l

comma seperated lists

2009-05-28 Thread Brian May
data types, and rather not have to create a custom tag for every one. If I can help it. Thanks. -- Brian May <br...@microcomaustralia.com.au> --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django u

Re: [br...@vpac.org: selecting foreign keys]

2009-05-26 Thread Brian May
On Thu, May 21, 2009 at 10:45:06AM +1000, Brian May wrote: > A frequent problem people seem to have with Django[1] is the default > interface for selecting foreign keys is slow and clumsy to use if there > are lots of selections. To the best of my knowledge there is no solution &

Re: prev/next links

2009-05-26 Thread Brian May
On Tue, May 26, 2009 at 01:28:07AM -0700, antoxa.sido...@gmail.com wrote: > Tried to do it with a Paginator class? > > Maybe this link can help You > http://docs.djangoproject.com/en/dev/topics/pagination/ Yes, I guess I could do it with paginator, and 1 object per page. Howeve

prev/next links

2009-05-25 Thread Brian May
: models.Photo.objects.filter(album=myalbum)[n] However this would seem to mean that the URL in the search results includes n (instead of the photo id), and as such may refer to the wrong photo if the search results change. Any ideas, suggestions? Any better ways of doing this? Thanks

Re: reverse URLs on Debian Lenny

2009-05-21 Thread Brian May
On Fri, May 22, 2009 at 10:06:50AM +1000, Brian May wrote: > urlpatterns = patterns('', > [...] > (r'^(.*)', include('microcomaustralia.zoph.urls')) > [...] > ) Errr... Sorry, found out it was my fault. That should be: (r'^', include('microcomaustralia.zoph.urls')) I suspect

reverse URLs on Debian Lenny

2009-05-21 Thread Brian May
, reverse URLs are broken when using include(...) Are there any known compatibility issues with Django and Debian Lenny? If not, how do I debug this issue? In all cases I am using the latest stable version of Django (1.0.2) Thanks -- Brian May <br...@microcomaustralia.com.au> --~--~

[br...@vpac.org: selecting foreign keys]

2009-05-20 Thread Brian May
provide a link to the discussion? Thanks. - Forwarded message from Brian May <br...@vpac.org> - Date: Fri, 13 Mar 2009 12:26:12 +1100 From: Brian May <br...@vpac.org> Subject: selecting foreign keys To: undisclosed-recipients: ; Newsgroups: gmane.comp.python.django.user Hello,

django admin manytomany

2009-02-20 Thread May
I have a manytomany relationship between publication and pathology. Each publication can have many pathologies. When a publication appears in the admin template, I need to be able to see the many pathologies associated with that publication. Here is the model statement: class

Re: sql query for manytomany table

2009-02-18 Thread May
. Resolving this problem will probably solve my admin template issue, which is that on the publication screen, I can reveal a contact for the publication, but I can't reveal the institutions the contact is associated with. May On Feb 18, 1:01 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On

Re: sql query for manytomany table

2009-02-18 Thread May
. Thanks, May On Feb 18, 11:55 am, Angel Cruz <mrangelc...@gmail.com> wrote: > this off topic, but i am saving these postings in my gmail.  The problem > with putting  your code in dpaste is that in 29 days, that link is invalid, > and when I look upon this thread in the future, I will ha

Re: sql query for manytomany table

2009-02-18 Thread May
istinct() # original else: results = [] return render_to_response("search/search.html", { "results": results, "query": query, }) On Feb 18, 11:58 am, Karen Tracey <kmtra...@gmail.com> wrote: > On Wed, Feb 18, 2009 at

Re: sql query for manytomany table

2009-02-18 Thread May
The complete view is here: http://dpaste.com/17/ On Feb 18, 11:46 am, May <adles...@gmail.com> wrote: > Hello Karen, > > Here are my views and models: > > http://dpaste.com/122204/ > > http://dpaste.com/14/ > > The manytomany table is actually a t

Re: sql query for manytomany table

2009-02-18 Thread May
Hello Karen, Here are my views and models: http://dpaste.com/122204/ http://dpaste.com/14/ The manytomany table is actually a tertiary table. I was just trying to use django terms, so people would understand what type of table. Thanks for your help! May On Feb 18, 11:33 am, Karen

sql query for manytomany table

2009-02-18 Thread May
I need to get the institution name through an intermediary table (two foreign keys) to display in a template. The code is here: http://dpaste.com/122204/ Thank you anyone, May --~--~-~--~~~---~--~~ You received this message because you are subscribed

form passing id variable problem

2009-02-11 Thread May
Hello, I have spent too much time on this problem and am beginning to think that it can't be done in Django. I am pulling a list of pathogen names from a postgres database to a drop down box. The user selects the pathogen, which requires the id to be passed back through django to the database

Re: html italic tag hinders search code

2009-02-06 Thread May
Creating a duplicate field without tags looks like it might be the way to go, then. I just hate the redundancy of two fields of data. Thanks to both you and Jeff! May On Feb 6, 12:30 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Fri, Feb 6, 2009 at 3:05 PM, May <adles...@gmai

Re: html italic tag hinders search code

2009-02-06 Thread May
: qset = ( Q(pubtitle__icontains=query) | Q(pubauthors__icontains=query) ) Thanks! May On Feb 6, 11:52 am, Jeff FW <jeff...@gmail.com> wrote: > The issue has nothing to do with your templates--it has to do with > your data, and how you'

html italic tag hinders search code

2009-02-06 Thread May
or italics or two; suggest how to get the search to strip the tags? Thanks, May --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: media files apache/modpython windows

2009-01-29 Thread May
so maybe my previous experience tainted me from looking at the django configuration differently than how I would have built a web page in PHP under Apache. Thank you for all your help and please comment if I am incorrect or if the configuration could

Re: links in table - one for URL, one not

2009-01-29 Thread May
Thanks all! I needed to put the curly brackets around the website variable. Dumb mistake on my part. It works now! Thanks! {{ researchproject.institution| > > safe }} On Jan 28, 2:15 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Wed, Jan 28, 2009 at 4:28 PM, May <

links in table - one for URL, one not

2009-01-28 Thread May
Hello, I am extracting data from a postgres table into an html table. I have two columns. The user can select the link in this column, the link will be returned through the URL and view.py to extract more information from the postgres table: {{ researchproject.restitle| safe }} This column

media files apache/modpython windows

2009-01-28 Thread May
Hello, I have the admin templates with CSS working under local server windows/ apache/modpython. Now I would like to get my site css files to work under apache. The settings and http.conf code is here: http://dpaste.com/114010/ I can place mysite css and images under the apache htdocs, but I

Re: http links without using URLs.py

2009-01-27 Thread May
ry and so I had > it use a temp place. > > Perhaps somebody else can better explain eggs. > > > > On Tue, 2009-01-27 at 09:42 -0800, May wrote: > > Hello Adam, > > > Thanks!  I have already set up several sections for the > > django site, so I must not have t

Re: http links without using URLs.py

2009-01-27 Thread May
e as > normal. > > It is quite discouraged to have Django serve static pages on a > production server since it's not meant for that, so it's slow and > inefficient. > > > > On Tue, 2009-01-27 at 09:06 -0800, May wrote: > > Hello, > > > The tutorial suggests

Re: http links without using URLs.py

2009-01-27 Thread May
t need to go thru Django work. > > > > On Tue, 2009-01-27 at 08:42 -0800, May wrote: > > Hello, > > > I'm converting PHP pages to Django.  I'm using base.html  for my > > formatting.  I've included the left-side bar in the base.html, which > > includes links th

http links without using URLs.py

2009-01-27 Thread May
Hello, I'm converting PHP pages to Django. I'm using base.html for my formatting. I've included the left-side bar in the base.html, which includes links that do not require using a database, such as the "contact us" page. Since I'm using localhost for testing my link looks something like

Re: Admin template and Apache

2009-01-23 Thread May
Hello, I changed the URL from this: (r'^admin/(.*)', admin.site.root) (this works, but no CSS) to this: (r'^admin/', include('django.contrib.admin.urls')), I received this error: No module named urls May On Jan 23, 12:15 pm, Austin Gabel <aga...@gmail.com> wrote: > What do

Re: Admin template and Apache

2009-01-23 Thread May
honHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE cpssite.settings PythonInterpreter /cpssite PythonDebug On SetHandler None May On Jan 23, 12:15 pm, Austin Gabel <aga...@gmail.com> wrote: > What do you have for MEDIA_ROOT, MEDIA_URL, and ADMIN_MEDIA_PREFIX in y

Admin template and Apache

2009-01-23 Thread May
: TEMPLATE_DIRS: 'C:/Program Files/Apache Software Foundation/Apache2.2/htdocs/ templates', INSTALLED_APPS: 'django.contrib.admin', URL file: (r'^admin/(.*)', admin.site.root), Is there something I should be adding to the http.conf file? Thanks for any help, May

Re: mod python child server won't start

2009-01-23 Thread May
Thank you Malcolm! Fixing the typo worked! It has been such a struggle to find the right syntax for windows and mod python that I had lost all confidence to think a typo could be the problem, so I wasn't careful enough to check. Thanks, again, May On Jan 22, 4:46 pm, Malcolm Tredinnick <m

mod python child server won't start

2009-01-22 Thread May
ANGO_SETTINGS_MODULE myprograms.settings PythonDebug On SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE cpssite.settings PythonInterpreter cpssite PythonDebug On Now the server quits at child. Any help is mu

Re: Apache server won't start

2009-01-22 Thread May
Oh, Thank you, Karen!! Yes, that was the problem. May On Jan 22, 9:12 am, Karen Tracey <kmtra...@gmail.com> wrote: > On Thu, Jan 22, 2009 at 11:55 AM, May <adles...@gmail.com> wrote: > > > Hello, > > > I'm trying to set up the Apache server with mod_python.  T

Re: Apache server won't start

2009-01-22 Thread May
Hello Tonu, Yes, I tried that as well and still the server won't start. Thanks, May On Jan 22, 9:01 am, Tonu <tonum...@gmail.com> wrote: > I wonder if you need SetHandler None?  Try eliminating those two > lines.  Other source of information for troubleshooting is apache >

Re: Apache server won't start

2009-01-22 Thread May
Ad addendum to message: This is a windows XP server. May On Jan 22, 8:55 am, May <adles...@gmail.com> wrote: > Hello, > > I'm trying to set up the Apache server with mod_python.  The Apache > server works, until I had the following code to the bottom of > http.conf file:

Apache server won't start

2009-01-22 Thread May
myprojects.settings PythonDebug On SetHandler None SetHandler None When I try to start Apache the error is "The requested operation has failed! My path is C:/django/myprojects Thank you for any help! May --~--~-~--~~~---~--~~ You received this message becaus

Re: Need URL help

2009-01-15 Thread May
again! May On Jan 13, 1:11 pm, Wai Yi Leung <tweak...@gmail.com> wrote: > You should rewite the method: > > def commodity(request, commodity_id): >     p = get_object_or_404(Commodity, pk=commodity_id) >     return render_to_response('fsafety/commodity_detail.htm

Re: Need URL help

2009-01-13 Thread May
Hello All, Thank you for the suggestions. I am getting closer to figuring it out. Now my error is this: commodity() takes exactly 2 arguments (1 given) My URL is: (r'^commodity/$', 'commodity'), The Form statement: Thank you! May On Jan 13, 10:56 am, Wai Yi Leung <tweak...@gmail.

Re: Need URL help

2009-01-13 Thread May
Hello, I tried the URL and still received this error: Page not found (404) Request Method: POST Request URL:http://127.0.0.1:8000/fsafety//commodity_detail/ I think now that the ID is not getting passed to this line: Thank you for any help you can give. May On Jan 13, 10:25 am

Need URL help

2009-01-13 Thread May
My error is not being able to get the ID passed to the next template. The code: http://dpaste.com/108580/ Thank you, May --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou