Isolated virtualenv and mod_wsgi - how do I do this on Apache

2018-06-28 Thread Bruce Whealton
the shared Python hosting, if I don't have ssh access I cannot even issue Pypi commands to install modules that I might need for my Django app. Thanks, Bruce -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this grou

Django in Production and Virtualenv

2017-06-06 Thread Bruce Whealton
as Django/Flask, with nginx listening on port 80 the default. I'm studying nginx now, so, if apache can work as a reverse proxy, load balancer and web server, is it easier or better to use nginx for this? Thanks so much for any help in advance, Bruce -- You received this message because you

Using PyMySQL as a MySQL driver

2016-11-09 Thread Craig Bruce
Hi, I have to use MySQL and an associated driver. Looking through the options in the docs my choices are limited since a) I use Python 3 and b) I can't use GPL code. Unless Django importing a GPL library does not

Re: How to implement a ManyToManyField with a View

2016-05-27 Thread Bruce Whealton
I have that in the contacts/views.py However, I don't know if it needs the context dictionary to have something which would connect a contact to many categories. Thanks, Bruce -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

Questions about Deploying django for production using apache and mod_wsgi.

2016-05-26 Thread Bruce Whealton
vel assets (with js/css) that I would want apache to serve directly versus going through mod_wsgi? It seems like I read something to this effect relating to parts of the admin, that need to be served directly by apache. I could be wrong. Thanks in advance for any help, Bruce P.S. If an

How to implement a ManyToManyField with a View

2016-05-26 Thread Bruce Whealton
ip_set.all %} {{ relationship.category }} {% endfor %} Can someone guide me here, please? I'd actually like to display the categories separated by commas on the same line. However, I am not seeing anything in this area. Thanks in advance for any help, Bruce -- You received this message b

Re: Why don't I see my category ForeignKey field in related Model

2016-05-13 Thread Bruce Whealton
You are absolutely right. So, I just need to figure out how to change things in the models.py. I'm not sure if django needs a third model or not. Thanks for helping where something should have been easier for me, Bruce -- You received this message because you are subscribed to the Google

Why don't I see my category ForeignKey field in related Model

2016-05-11 Thread Bruce Whealton
resource = models.ForeignKey(Resource, related_name='category') def __str__(self): return self.category class Meta: ordering = ('category',) Thanks in advance for any help, Bruce -- You received this message because you are subscribed to the Google Groups "Djang

Help with moving a development project to production

2016-05-02 Thread Bruce Whealton
, Bruce -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@google

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

2016-05-02 Thread Bruce Whealton
. If there is data in the database, how will this be handled? I'll give it a try and see what happens. It is just the development machine that has the data. Thanks, Bruce On Monday, May 2, 2016 at 11:48:52 AM UTC-4, Michal Petrucha wrote: > > On Mon, May 02, 2016 at 08:37:43AM -0700, Bruce Wh

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

2016-05-02 Thread Bruce Whealton
or if one should just do that locally and then import it. Thanks for any advice, This should be part of a larger posting on workflows moving from development to production. Thanks, Bruce On Saturday, April 23, 2016 at 10:30:45 AM UTC-4, Bruce Whealton wrote: > > Hello all, > So

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

2016-04-26 Thread Bruce Whealton
rganization", null=True, blank=True) contact = models.ForeignKey("ContactOrOrganization", related_name="contact", null=True, blank=True) connection_type = models.CharField(max_length=60, choices=CHOICES) Thanks in advance for any help, Bruce -- You received this mess

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

2016-04-26 Thread Bruce Whealton
have a table now for that model. I wonder if I need a ForeignKey field in the ContactsOrOrganization table? Bruce Anyway, I will try to remove the ManyToMany statement from the Connections Model. I would then have one Contact or Organization maps to many Connection types. On Sunday, April

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

2016-04-26 Thread Bruce Whealton
ils.translation import ugettext as _ > ... > class Connection(models.Model): > CHOICES = (('follower', _('Follower')), >('employer', _('Employer')), >('unspecified', _('Unspecified')), > ) > connection_type = models.C

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

2016-04-23 Thread Bruce Whealton
ls.EmailField(max_length=60) website = models.URLField(max_length=90) contact_name = models.ForeignKey(Contact, on_delete=models.CASCADE) class Connection(models.Model): type = models.CharField(max_length=60) contact_name = models.ManyToManyField(Contact) >>> Thanks

Re: Django default auth user but unique email

2015-02-06 Thread Bruce Li
t; uniqueness at the database level. > > -James > On Jan 26, 2015 7:01 PM, "Bruce Li" <bruc...@gmail.com > > wrote: > >> To be more specific, I want the username and email in default user model >> both to be unique and not blank. >> >> On Tues

Re: Django default auth user but unique email

2015-01-26 Thread Bruce Li
To be more specific, I want the username and email in default user model both to be unique and not blank. On Tuesday, January 27, 2015 at 10:56:14 AM UTC+8, Bruce Li wrote: > > Hi, > > I want to build my user management based on default django users. But I > want emails to be

Django default auth user but unique email

2015-01-26 Thread Bruce Li
Hi, I want to build my user management based on default django users. But I want emails to be unique as well. Is it possible to do that without the need to create a custom user model and user managment? Thanks, - Bruce -- You received this message because you are subscribed to the Google

Default auth with username but unique email, is it possible?

2015-01-26 Thread Bruce Li
Hi, I'm using django's default auth settings in my app. All I want is to make email unique for each user. Is it possible to do that without creating a custom user model and user manager? Thanks. -- You received this message because you are subscribed to the Google Groups "Django users"

Best way to learn Django considering Python versions and etc.

2013-12-10 Thread Bruce Whealton
onent of a framework. Thanks in advance for any advice, Bruce -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegro

Re: django1.5 subclass AbstractUser, How to get a password-(re)set field in admin

2012-11-30 Thread Bruce Wade
Hi Russ, Thanks that did solve the problem I was having. -- Regards, Bruce On Fri, Nov 30, 2012 at 9:32 PM, Russell Keith-Magee < russ...@keith-magee.com> wrote: > Hi Bruce, > > Update your Django checkout. This problem was fixed in 0fc5878c. > > Yours, > Russ Magee

Re: questions about generating static web page.

2012-09-25 Thread bruce
). .. class Cell(models.Model): row = models.ForeignKey(Row) . Do you think is there any better way to do this? Thanks!! Bruce On Tuesday, September 25, 2012 4:15:25 PM UTC-4, ke1g wrote: > > I, and probably others, would need a more detailed descr

Re: questions about generating static web page.

2012-09-25 Thread bruce
to the view. Something like this, > > urlpatterns += patterns('', > (r'^users/(?P.+?)/$', 'views.user_profile'), > ) > > 4. Then in the template you can use for loop template tag like > > {% if userdata %} > userdata.username > > > Example Field: >

questions about generating static web page.

2012-09-25 Thread bruce
God. The original subject is too long. I made the Subject shorter. Thanks, Bruce On Tuesday, September 25, 2012 2:11:45 PM UTC-4, bruce wrote: > > Dear All, > > I am a novice. > Currently, > I am thinking to build a simple static personal web page generator for the &g

[need advice and suggestion] questions about generating static web page.

2012-09-25 Thread bruce
? Thanks All! Bruce -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/i4S-nK72vP0J. To post to this group, send email to django-users@google

Re: [old question]NoReverseMatch.. I am sorry.

2012-08-18 Thread bruce
ject.com/en/dev/topics/http/urls/#naming-url-patterns > > https://docs.djangoproject.com/en/dev/topics/http/urls/#defining-url-namespaces > > https://docs.djangoproject.com/en/dev/topics/http/urls/#topics-http-reversing-url-namespaces > > On Fri, Aug 17, 2012 at 6:23 PM, br

Re: [old question]NoReverseMatch.. I am sorry.

2012-08-17 Thread bruce
Thanks. I am going to read it. Have a great weekend! On Friday, August 17, 2012 6:30:26 PM UTC-4, Tomas Neme wrote: > > > But I am confused. > > For example, > > the following code needs to add single quote. > > > > {% block content %} > > Add Todo items > >

Re: [old question]NoReverseMatch.. I am sorry.

2012-08-17 Thread bruce
Tears thanks! But I am confused. For example, the following code needs to add single quote. {% block content %} Add Todo items Is there a link to give me detailed description? I want to learn it and never get stuck again. Thanks!! On Friday, August 17, 2012

[old question]NoReverseMatch.. I am sorry.

2012-08-17 Thread bruce
I am sorry I know this is an old topics. But I spent the whole day and still unable to fix this problem. NoReverseMatch at /1/ Reverse for ''blog.views.add_comment'' with arguments '(1L,)' and keyword arguments '{}' not found. Request Method:GETRequest URL:http://192.168.71.58:8007/1/Django

Re: [sorl thumbnail] get_thumbnail not working -- IOError

2012-07-19 Thread bruce
oh. I forgot the complete error message: IOError at /admin/labcv/person/2/ [Errno 2] No such file or directory: u'/root/django/mysite_new/media/www.jpg' Request Method:POSTRequest URL:http://192.168.1.1:8000/admin/labcv/person/2/Django Version:1.4Exception Type:IOErrorException Value:

[sorl thumbnail] get_thumbnail not working -- IOError

2012-07-19 Thread bruce
Dear All, I am trying to use the ImageField in my model, and use get_thumbnail in the forms.py. The problem is: If I don't use get_thumbnail, it works well. The image was uploaded successfully and the thumbnail shows on the admin page. It works well. However, If I try to use the get_thumbnail

Django-Grappelli...... customize the admin/base_site.html

2012-07-01 Thread bruce
knowledge I need to read? Thanks!! Bruce -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/7Q-F39P9k7EJ. To post to this group, send email to dj

Re: django 1.4 + grappelli 2.4: missing css, img files.

2012-06-28 Thread bruce
t;> directory is) to your settings.py > > > That should do the trick. > > Tervitades/Regards > Karl Sutt > > > On Thu, Jun 28, 2012 at 5:07 AM, bruce <brucehar...@gmail.com> wrote: > >> Dear All, >> >> I know this problem is related

Re: django 1.4 + grappelli 2.4: missing css, img files.

2012-06-28 Thread bruce
h.join(PROJECT_PATH, "static"), add > >> ADMIN_MEDIA_PREFIX = '/static/grappelli/' (or whatever your static >> directory is) to your settings.py > > > That should do the trick. > > Tervitades/Regards > Karl Sutt > > > On Thu, Jun 28, 2012 at

django 1.4 + grappelli 2.4: missing css, img files.

2012-06-28 Thread bruce
Dear All, I know this problem is related with grappelli. But it may be a django configure problem. So I am posting my question here. If it is inappropriate, please let me know. I followed the django 1.4's tutorial to setup the 'polls' app and it was successful. I also followed the grappelli

Re: RedirectView with query_string = True and urlencoded unicode string

2012-05-14 Thread Andrew Bruce
You have passed 'anything' as a keyword argument that will get passed into your view. Unfortunately, you can't access it in your inline constructor call. Try subclassing RedirectView in views.py of your app. class SubRedirectView(RedirectView): query_string = True def

Re: django-registration - stuck at Required templates topic

2011-08-05 Thread Bruce Dou
I also think that should be a default simple template in the package. On Fri, Aug 5, 2011 at 12:52 PM, Phang Mulianto wrote: > well..like the error said..you need to put {% csrf_token %} inside your > form.. do you read the tutorial? you should read it if you serious

Re: Django for a front end designer

2011-08-03 Thread Bruce Dou
Or you can try Rails. On Wed, Aug 3, 2011 at 4:15 PM, Andre Lopes wrote: > If you want to start with a PHP Framework, consider CodeIgniter. It is > the easier Framework for a starter. > > > On Tue, Aug 2, 2011 at 3:46 PM, paulo couto wrote: > > Ok

About user auth page

2011-08-03 Thread Bruce Dou
Why there is not a default user login, user register template? And Can not find some examples. What is your advice to create user auth pages? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Pyjamas and django server setup - how do *you* do it?

2011-08-03 Thread Bruce Dou
Why there is not a default user login, user register template? And Can not find some examples. What is your advice to create user auth pages? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: What is the best server for Django

2011-03-09 Thread Bruce Dou
Linode or EC2. On Wed, Mar 9, 2011 at 5:53 PM, Chen Xu wrote: > I am thinking to buy a server, and integrated with Django environment. So > could anyone please give me some suggestions, which server is the best for > this, amazon ec2 or? > > Thanks very much > Best regards >

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Bruce Wang
On Thu, Jun 3, 2010 at 1:26 PM, Graham Dumpleton wrote: > > > > > Are you running your django app under mod_wsgi? It may not running with > your > > interpreter in your #! line. > > > > Try using > > import sys; print sys.executable > > in your wsgi file to find out

Re: Unable to import libxml2mod from the python script

2010-06-02 Thread Bruce Wang
On Thu, Jun 3, 2010 at 12:38 PM, Superman wrote: > Thanks for your reply. How do you check env path variables diff > between shell and code > execution? > > To my wsgi file, I have this line "#!/usr/local/bin/python" which > tells which interpreter to use. And yes,

Re: API with django

2010-05-24 Thread Bruce Wang
2010/5/24 Alexandre González > Hi! > > I must develop a django app that receives XML and returns XML. > > What's the best way to do this? Create a view that receive the XML and > parse it to return a template with the XML resultant? > > I'm newbie in django and need your tips :)

Re: legacy oracle database -w- existing schema

2009-03-16 Thread bruce
Yes, this resolve the issue. Thank you! On Mar 16, 2:29 pm, "Mad Sweeney" <madswee...@eircom.net> wrote: > - Original Message - > From: "bruce" <bikenbr...@gmail.com> > To: "Django users" <django-users@googlegroups.com> > S

Re: legacy oracle database -w- existing schema

2009-03-16 Thread bruce
I can look into that as an option. I don't have access to administrate this database. On Mar 16, 2:29 pm, "Mad Sweeney" <madswee...@eircom.net> wrote: > - Original Message - > From: "bruce" <bikenbr...@gmail.com> > To: "Django users" &l

legacy oracle database -w- existing schema

2009-03-16 Thread bruce
creating custom sql queries, is there another way to retrieve information found in this schema? Bruce --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Modelform FileField

2008-05-29 Thread Bruce Dockeray
I have a modelform bound to a table. One of the fields in the table is a FileField. I able to upload files using the modelform and this works well. Once i have uploaded a file if i look at the database record using the modelform the FileField continues to display as a file upload widget