newbie - deploy error

2007-03-27 Thread frocco
Hello, I am new to Python and dJango. I am trying to get the tutorial gtd to run on Apache. I installed mod_python and placed gtd directory into htdocs directory. I do not understand how to resolve this. I goal is to run multiple apps in apache. ecample: http://localhost/app1 http://localhost/app

Re: newbie - deploy error

2007-03-27 Thread frocco
I forgot to say I am on Windows XP On Mar 27, 2:36 pm, "frocco" <[EMAIL PROTECTED]> wrote: > Hello, > > I am new to Python and dJango. > I am trying to get the tutorial gtd to run on Apache. > I installed mod_python and placed gtd directory into htdocs director

Re: newbie - deploy error

2007-03-27 Thread frocco
I managed to get this working with these settings: SetHandler python-program PythonPath "['C:\djangoapps'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE mysite.settings PythonDebug On I still need to be able to do http://localhost/app1 http://localhost

newbie needs to copy a record in admin to a new record

2013-01-11 Thread frocco
Hello, I am just learning django and want to allow a user in admin to copy a record from the list to create a new record and make changes. This will prevent having to type similar data. How do I add a link to the admin list? where do I put code to dup the record? Thank you -- You received th

Re: newbie needs to copy a record in admin to a new record

2013-01-11 Thread frocco
view, so you can select any number of list > items and copy them. > > - > Brad Pitcher > Software Developer > (702)723-8255 > > > On Fri, Jan 11, 2013 at 7:06 AM, frocco >wrote: > >> Hello, >> >> I am just learning django and want to all

how to set template and media directory in settings?

2013-01-11 Thread frocco
Hello, The line below does not work. os.path.join(os.path.dirname(__file__),'templates'), I see many references to doing it like above. but if I create it like this, it works PROJECT_PATH = os.path.join(os.path.dirname(__file__)) PROJECT_PATH + '/../templates', What is the best way? I am on Win

How do I display a static image in my index.html file?

2013-01-11 Thread frocco
Hello, I am a newbie and cannot figure out how to do a simple image display that I currently do in PHP. I want to display a logo on my home page. I tried google, but am having no luck. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Re: How do I display a static image in my index.html file?

2013-01-11 Thread frocco
I am still stuck. On Friday, January 11, 2013 3:20:40 PM UTC-5, frocco wrote: > > Hello, > > I am a newbie and cannot figure out how to do a simple image display that > I currently do in PHP. > I want to display a logo on my home page. > > I tried google, but am ha

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
r img My site is: store img auto.jpg staff views.py templates staff index.html image is not showing. This needs to work in development and production On Friday, January 11, 2013 3:20:40 PM UTC-5, frocco wrote: > > Hello, > > I am a newbie and cannot figure

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
Hello, django 1.4 on mac. plan to deploy to Bluehost.com when finished. I have a php site I want to convert to django. but honestly, django is harder for me to learn than php, but I am determined. On Saturday, January 12, 2013 12:24:34 PM UTC-5, @jeffblack360 wrote: > > frocco: >

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
Google keeps deleting my reply. I tried the url to the static/img path and get 404 error. On Saturday, January 12, 2013 2:45:48 PM UTC-5, frocco wrote: > > Hello, > > django 1.4 on mac. > > plan to deploy to Bluehost.com when finished. > > I have a php site I want to co

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
Page not found (404) Request Method: GET Request URL: http://127.0.0.1:8000/static/img/auto.jpg 'img/auto.jpg' could not be found [code] # Django settings for store project. import os import django.contrib.staticfiles DIR = os.path.abspath(os.path.dirname(__name__)) DEBUG = True TEMPLATE_DEBUG =

Re: How do I display a static image in my index.html file?

2013-01-12 Thread frocco
> > > Page not found (404)Request Method:GETRequest URL: > http://127.0.0.1:8000/static/img/auto.jpg > > Using the URLconf defined in ntw.urls, Django tried these URL patterns, > in this order: > >1. ^staff/$ >2. ^static/img/$ >3. ^static/$ >4. ^admin/doc/ >5. ^admin/ > > The

How do I call a query set from views.py

2013-01-13 Thread frocco
in models.py def get_categories(self): return self.objects.filter('category_class <> "sales' in views.py data = Category.get_categories() context = Context({'title': 'Search', 'form': form, 'data': data}) return render_to_response('index.html', context) this is not working. -- Yo

Re: How do I call a query set from views.py

2013-01-13 Thread frocco
Thank you... On Sunday, January 13, 2013 1:29:15 PM UTC-5, frocco wrote: > > > in models.py > > def get_categories(self): > return self.objects.filter('category_class <> "sales' > > in views.py > > data = Category.get_categories() &g

Re: How do I display a static image in my index.html file?

2013-01-13 Thread frocco
: > > Directory structure please? > > FWIW, you have django.contrib.staticfiles defined twice. > > Did you read the howto doc on static files? > > @jeffblack360 > > On Jan 12, 2013, at 2:17 PM, frocco > > wrote: > > >> Page not found (404)Request

Re: How do I display a static image in my index.html file?

2013-01-13 Thread frocco
IW, you have django.contrib.staticfiles defined twice. > > Did you read the howto doc on static files? > > @jeffblack360 > > On Jan 12, 2013, at 2:17 PM, frocco > > wrote: > > >> Page not found (404)Request Method:GETRequest URL: >> http://127.0.0.1:8000/static/im

how to use media, images not showing

2013-01-13 Thread frocco
Hello, In my model, I have image_path = models.FileField(max_length=128, upload_to='staff') in index.html I have In settings I have DIR = os.path.abspath(os.path.dirname(__name__)) MEDIA_ROOT = os.path.join(DIR,'media') MEDIA_URL = 'http://127.0.0.1/media/' media_url prints out as http://127.

Re: How do I display a static image in my index.html file?

2013-01-13 Thread frocco
I see... Thanks for the explanation. --Frank On Friday, January 11, 2013 3:20:40 PM UTC-5, frocco wrote: > > Hello, > > I am a newbie and cannot figure out how to do a simple image display that > I currently do in PHP. > I want to display a logo on my home page. > >

Best way to upload and resize image?

2013-01-13 Thread frocco
Hi All, In the admin, I am using imageField to upload an image. I install PIL and am overriding the save to create a thumbnail. The problem I am having is the original upload is resized. I want to keep the original and thumbnail, so I can allow the users to click and zoom the image. Is there a be

Re: Best way to upload and resize image?

2013-01-14 Thread frocco
Thank you On Sunday, January 13, 2013 10:38:32 PM UTC-5, frocco wrote: > > Hi All, > In the admin, I am using imageField to upload an image. > I install PIL and am overriding the save to create a thumbnail. > The problem I am having is the original upload is resized. > I want to

Anyway to use innovaeditor in admin?

2013-01-14 Thread frocco
Initialize the Editor below any ** you’d like to replace. var oEdit1 = new InnovaEditor("oEdit1"); oEdit1.width = 750; oEdit1.height = 530; oEdit1.groups = [ ["group1", "", ["Bold", "Italic", "Underline", "FontDi

Re: Anyway to use innovaeditor in admin?

2013-01-15 Thread frocco
Thanks, I ended up using ckeditor. I would have perferred using the one I just purchased. The vendor has no experience with django. Mostly .net and PHP On Monday, January 14, 2013 9:39:36 AM UTC-5, frocco wrote: > > src='scripts/innovaeditor.js'> > > Initialize the

Help - how to deploy to nginx in windows

2013-01-17 Thread frocco
Hello, If I create a base django app, how can I get it to run using nginx in windows? I keep getting 404 errors. Thank you -- 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/m

Re: Help - how to deploy to nginx in windows

2013-01-17 Thread frocco
Thanks, Are there any examples on how to get this up and running on windows? On Thursday, January 17, 2013 10:45:26 AM UTC-5, frocco wrote: > > Hello, > > If I create a base django app, how can I get it to run using nginx in > windows? > I keep getting 404 errors. > &

Looking for a session cart

2013-01-21 Thread frocco
Hello, I am learning django and want to port an app over from PHP. In PHP, I use a session cart to store items purchased. Is there anything for django? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit ht

Re: Looking for a session cart

2013-01-21 Thread frocco
essions"<https://docs.djangoproject.com/en/1.4/topics/http/sessions/>( > example<https://docs.djangoproject.com/en/1.4/topics/http/sessions/#examples> > )? > > Am Montag, 21. Januar 2013 13:50:13 UTC+1 schrieb frocco: >> >> Hello, >> >> I am learni

Re: Looking for a session cart

2013-01-21 Thread frocco
olor'] = green" and read by > write "request.session['fav_color']" or "fav_color = > request.session.get('fav_color', 'red')" then "red" is the default value > if "fav_color" is'nt set. > Am Montag, 21. Janu

Re: Looking for a session cart

2013-01-22 Thread frocco
to their cart content > according to the cart id stored inside a cookie. It's a breeze to implement > with any product model. I highly recommend it. > On 22 Jan, 2013 7:43 AM, "frocco" > wrote: > >> Thanks, I need to look at this, not sure how django-cart knows

Where can I put code that will get executed when page refreshes

2013-01-22 Thread frocco
I have a index.html template that extends base.html In Index I has: {% block side_menu %} Content {% endblock %} I fill this block from a database table. This only works if I click on the home link. if I click any other link to view, the side-menu is not populated. url(r'^$', 'ntw.views.inde

how do I code sql using the raw method?

2013-01-23 Thread frocco
Hello, I need to code a select statement based on a dynamic field. select price_a as price from table def return priceLevel(x): if x == 'A': return 'price_a' if x == 'B': return 'price_b' if x == 'C': return 'price_c' so my sql would be: fld = priceLevel('B') select fld as price from table I

Re: how do I code sql using the raw method?

2013-01-23 Thread frocco
Nevermind, I got this working. On Wednesday, January 23, 2013 9:13:46 AM UTC-5, frocco wrote: > > Hello, > > I need to code a select statement based on a dynamic field. > > select price_a as price from table > > def return priceLevel(x): > if x == 'A': r

how do I dynamically modify a choice field

2013-01-23 Thread frocco
Hello, In my view, I am displaying rows of data that have a choice field in a form. one form for each row I want to change the choice this before printing. one row can have 1 to 5 choices another row can have 1 to 10 choices depending on values in each row. -- You received this message because

Re: how do I dynamically modify a choice field

2013-01-23 Thread frocco
Thanks Mike, I do not know if this will work. I want to change the field in the template as I read each row. I do this in PHP rather easy, but am confused on how to do this using django. On Wednesday, January 23, 2013 6:03:28 PM UTC-5, Mike Dewhirst wrote: > > On 24/01/2013 2:36am,

Re: how do I dynamically modify a choice field

2013-01-24 Thread frocco
select more stock than is available. Thanks again for your help. On Wednesday, January 23, 2013 10:36:46 AM UTC-5, frocco wrote: > > Hello, > > In my view, I am displaying rows of data that have a choice field in a > form. > one form for each row > > I want to change the cho

Re: how do I dynamically modify a choice field

2013-01-24 Thread frocco
I see your point. maybe I should validate stock when they press update and/or post order. On Wednesday, January 23, 2013 10:36:46 AM UTC-5, frocco wrote: > > Hello, > > In my view, I am displaying rows of data that have a choice field in a > form. > one form for each row > &

Which django-cart fork should I use?

2013-01-25 Thread frocco
Hello, I installed pip install django-cart, but am having issues when trying to update a cart with a different qty. nothing happens. I see no errors in debug. a new product is added ok, but if I try and add the product again, the qty is not changed. if I call the update_cart method, the qty is

Help, getting keyerrors

2013-01-29 Thread frocco
Hello, On my registration form, if I enter no data and just press enter, i get a key error. Can someone tell me what I am doing wrong? Thanks forms.py from django import forms from django.contrib.auth.models import User from django.forms import ModelForm from customer.models import Customer clas

Re: Help, getting keyerrors

2013-01-29 Thread frocco
gt; return cleaned_data > > > https://docs.djangoproject.com/en/1.4/ref/forms/validation/#cleaning-and-validating-fields-that-depend-on-each-other > > > _Nik > > > On 1/29/2013 11:42 AM, frocco wrote: > > Hello, > > On my registration form, if

Re: Help, getting keyerrors

2013-01-29 Thread frocco
I think I have it. Changed to cleaned_data.get('password') Thank you On Tuesday, January 29, 2013 2:58:45 PM UTC-5, frocco wrote: > > Thanks, > getting error now that I changed it. > > def clean(self): > cleaned_data = super(RegistrationForm, self

Re: Django hosting companies

2013-01-30 Thread frocco
Thanks for the info on webfraction. I currently use bluehost.com, but webfraction looks like better support for django. On Tuesday, January 29, 2013 8:34:54 AM UTC-5, Frankline wrote: > > Have you tried webfaction? Very easy to setup. > > On Tue, Jan 29, 2013 at 4:30 PM, Gustavo Andres Angulo >

Re: PHP vs Django

2013-01-30 Thread frocco
I coded a site in PHP using yii before I stumbled onto django a few weeks back. Now I am rewriting my site in django while I learn. I just love the framework. On Sunday, January 27, 2013 10:50:26 PM UTC-5, Nikhil Verma wrote: > > Well i would say its all about money and passion for programming.I

newbie confused about urls

2013-01-31 Thread frocco
Hi All, I am trouble understanding how to use urls. I see tutorials that have get_absolue_url, url mysite, ect. I need to do: 1. load a page with no parameters 2. load a page with 1 parameter 3. load a page with more than 1 parameter What should my templates look like? Thank you -- You re

Re: newbie confused about urls

2013-01-31 Thread frocco
and use urls.py to map urls to pages/views. And templates are are called > from in views. > > frocco wrote: > > Hi All, > > I am trouble understanding how to use urls. > I see tutorials that have get_absolue_url, url mysite, ect. > > I need to do: > >

Re: newbie confused about urls

2013-01-31 Thread frocco
ere<https://docs.djangoproject.com/en/dev/ref/models/instances/?from=olddocs#get-absolute-url>. > > I advise you to understand how URL routing works in Django thoroughly, > especially how not to hardcode stuff into your models. In the linked page, > you'll also see ho

How is fatcow for django hosting?

2013-02-01 Thread frocco
Hello, Anyone use them? I am trying to compare them to Bluehost.com Thanks -- 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...@googlegroup

Re: How is fatcow for django hosting?

2013-02-01 Thread frocco
I also am looking at hostgator On Friday, February 1, 2013 7:40:27 AM UTC-5, frocco wrote: > > Hello, > > Anyone use them? > I am trying to compare them to Bluehost.com > > Thanks > -- You received this message because you are subscribed to the Google Groups

Re: On the fly image resize

2013-02-02 Thread frocco
I use django-imagekit pip install django-imagekit On Saturday, February 2, 2013 3:33:36 PM UTC-5, nYmo wrote: > > Hi all, > I'm new to django and also python but have already some programming > experience. I'm currently creating my first application in django and get > stucked because I'm look

Help - No module named models

2013-02-03 Thread frocco
Hello, In my settings.py import django.conf.global_settings as DEFAULT_SETTINGS TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS + ( 'utils.context_processors.eStore', ) in my utils directory I have a context_processors.py from django.conf import settings from catal

NoReverseMatch at /my_account/

2013-02-04 Thread frocco
I am getting NoReverseMatch at /my_account/ what is wrong with my urls? Thanks Reverse for 'order_info' with arguments '()' and keyword arguments '{}' not found. main urls.py (r'^my_account/$', include('accounts.urls')), accounts/urls.py urlpatterns = patterns('accounts.views', (r'^$', '

Re: NoReverseMatch at /my_account/

2013-02-04 Thread frocco
My template has Edit Billing/Shipping Information On Monday, February 4, 2013 1:48:37 PM UTC-5, frocco wrote: > > I am getting NoReverseMatch at /my_account/ > what is wrong with my urls? > Thanks > > Reverse for 'order_info' with arguments '()' and keyword

Re: Help - No module named models

2013-02-04 Thread frocco
Thank you On Sunday, February 3, 2013 1:04:15 PM UTC-5, frocco wrote: > > Hello, > > In my settings.py > import django.conf.global_settings as DEFAULT_SETTINGS > TEMPLATE_CONTEXT_PROCESSORS = DEFAULT_SETTINGS.TEMPLATE_CONTEXT_PROCESSORS > + ( > 'utils.context_p

Re: NoReverseMatch at /my_account/

2013-02-04 Thread frocco
Thank you, I can't tell you how long I struggled with this. On Monday, February 4, 2013 1:48:37 PM UTC-5, frocco wrote: > > I am getting NoReverseMatch at /my_account/ > what is wrong with my urls? > Thanks > > Reverse for 'order_info' with arguments '()&#x

Re: NoReverseMatch at /my_account/

2013-02-05 Thread frocco
Coming from PHP, I love django. On Tuesday, February 5, 2013 3:25:28 AM UTC-5, Serkan Sökmen wrote: > > Yeah, i did the same once -) > > On Tue, Feb 5, 2013 at 1:07 AM, frocco >wrote: > >> Thank you, I can't tell you how long I struggled with this. >> >> O

Re: NoReverseMatch at /my_account/

2013-02-05 Thread frocco
> > I am from php too...but build with django is wonderfull and got speed in > production :) > On Feb 5, 2013 11:04 PM, "frocco" > wrote: > >> Coming from PHP, I love django. >> >> On Tuesday, February 5, 2013 3:25:28 AM UTC-5, Serkan Sökmen wrote: >&

No module named models again

2013-02-06 Thread frocco
Hello, What is the best way to track down these types of errors? in ntw.urls I have: (r'^checkout/', include('checkout.urls')), in checkout I have: urlpatterns = patterns('checkout.views', #(r'^$', 'show_checkout', {'template_name': 'checkout/checkout.html' }, 'checkout'), (r'^receipt/$

Re: No module named models again

2013-02-06 Thread frocco
Line 22 does not make any sense to me as to why it is failing. If I remove receipt, it runs fine On Wednesday, February 6, 2013 1:31:59 PM UTC-5, frocco wrote: > > Hello, > > What is the best way to track down these types of errors? > > in ntw.urls I have: (r'^checkout/&#

Re: No module named models again

2013-02-06 Thread frocco
I found the answer. in my app directory called checkout, I also have a checkout.py file. from checkout.models import Order in views.py had to be changed to from models import Order On Wednesday, February 6, 2013 3:02:57 PM UTC-5, Brad Pitcher wrote: > > On Wed, 2013-02-06 at 11:49 -0800,

Any good books for learning django?

2013-02-07 Thread frocco
Hello, Most of what I find are dated, 2008,2009. Are these still good for learning django 1.4? Which books do you recommend? Thanks -- 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 i

Re: Any good books for learning django?

2013-02-07 Thread frocco
Thanks for the recommend. I just purchased it. On Thursday, February 7, 2013 1:10:01 PM UTC-5, Mayukh Mukherjee wrote: > > I'd recommend two scoops of django. > It's a little more intermediate level but it's a gem. > > Sent from my iPhone > > On Feb 7, 2013,

Re: Any good books for learning django?

2013-02-08 Thread frocco
I feel the book is fairly priced, and 12 dollars should not hurt anyone. It is sad, that most of the books out there are 2008,2009 publishing dates. If I am starting a new project, should I be using django 1.5 or wait til the final release? On Friday, February 8, 2013 12:28:53 PM UTC-5, fgallina

ValueError at /admin/flatpages/flatpage/1/

2013-02-08 Thread frocco
If I add a record and do not select the sites dropdown, I get ValueError at /admin/flatpages/flatpage/1/ Cannot use None as a query value Request Method:POSTRequest URL: http://127.0.0.1:8000/admin/flatpages/flatpage/1/Django Version:1.4.3Exception Type:ValueErrorException Value: Cannot use Non

How do I get the integer of a decimal string?

2013-02-09 Thread frocco
Hello, I am reading a cdv file and one col has the value of "14.00" I want to get the integer value if 14 I tried int("14.00") Thanks in advance -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: How do I get the integer of a decimal string?

2013-02-09 Thread frocco
Thank you On Saturday, February 9, 2013 12:32:38 PM UTC-5, Brad Pitcher wrote: > > Convert it to float first: > int(float("14.00")) > > On Sat, 2013-02-09 at 09:27 -0800, frocco wrote: > > Hello, > > > > > > I am reading a cdv file and one co

Re: Any good books for learning django?

2013-02-11 Thread frocco
; >>> I'd recommend two scoops of django. >>> It's a little more intermediate level but it's a gem. >>> >>> Sent from my iPhone >>> >>> On Feb 7, 2013, at 12:49, frocco wrote: >>> >>> Hello, >>> Most

How do I get the current user in a model?

2013-02-11 Thread frocco
Hello, I have some logic I want to put in a model, but it requires know the current user logged in. Is there a way to get this? The template would have to display the results of the field returned from the model. Thanks -- You received this message because you are subscribed to the Google Gr

Re: How do I get the current user in a model?

2013-02-11 Thread frocco
Ok, but is request available in models.py? On Monday, February 11, 2013 9:49:47 AM UTC-5, sandy wrote: > > On Mon, Feb 11, 2013 at 7:42 PM, frocco > > wrote: > > Hello, > > > > I have some logic I want to put in a model, but it requires know the > current

Re: How do I get the current user in a model?

2013-02-11 Thread frocco
What I am trying to do, is I have four price fields in my model and need to return just one based on current user logged in. price_a price_b price_c price_d I want to always return a field named price, based on one of those fields. On Monday, February 11, 2013 9:51:47 AM UTC-5, frocco wrote

Re: How do I get the current user in a model?

2013-02-11 Thread frocco
> > def price(my_model_item, user): > """Returns the price for the user""" > # Logic to evaluate the price could be here on in a > # model method, but if it's in the model method you > # will need to pass the user as a parameter to tha

Re: Updated Django by Example tutorials

2013-02-12 Thread frocco
Thank you On Monday, February 11, 2013 11:24:57 PM UTC-5, Rainy wrote: > > Hi, I've started updating Django by Example tutorials for django version > 1.5 and using class-based views. > I have posted 3 tutorials so far; 3 more will be added soon: > > http://lightbird.net/dbe2/ > > I hope these wil

Re: Has the djangoproject.com site been down?

2013-02-12 Thread frocco
It is working for me. On Tuesday, February 12, 2013 11:40:17 AM UTC-5, +Emmanuel wrote: > > Is it just me or is djangoproject.com not loading? Been trying to access > it for a couple of weeks without success. I've tried different browsers to > no avail. Am accessing it from Africa. -- You rece

Is there an easy way to popup forms?

2013-02-13 Thread frocco
I have a form I want to popup and am having trouble getting this to work. This is not in the admin page. Can someone give me an example? Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving e

Re: Is there an easy way to popup forms?

2013-02-13 Thread frocco
Thanks Tom, Do you know how I would have a form display using this? On Wednesday, February 13, 2013 11:41:59 AM UTC-5, Tom Evans wrote: > > On Wed, Feb 13, 2013 at 4:12 PM, frocco > > wrote: > > I have a form I want to popup and am having trouble getting this to > work

Re: Is there an easy way to popup forms?

2013-02-14 Thread frocco
pen: false }); $( "#opener" ).click(function() { $( "#dialog"{{ row.sku }} ).dialog( "open" ); }); The above is not working On Wednesday, February 13, 2013 11:12:44 AM UTC-5, frocco wrote: > > I have a form I wa

Re: Is there an easy way to popup forms?

2013-02-14 Thread frocco
I get a popup for the first row only and it will not allow me to close the window. On Wednesday, February 13, 2013 11:12:44 AM UTC-5, frocco wrote: > > I have a form I want to popup and am having trouble getting this to work. > This is not in the admin page. > > Can someone giv

Is it necessary to restart server after a change?

2013-02-18 Thread frocco
Hello, In PHP, if I make a change to the database query, like adding a where clause to filter only active records, the user sees the change on the next browser refresh. In django, it seems I have to restart the server and knock everyone off. I am a newbie, so is there a better way? I just start

Re: Is it necessary to restart server after a change?

2013-02-18 Thread frocco
Thank you, so touching wsgi.py will make it reload? That's great, I am also learning linux. :-) On Monday, February 18, 2013 9:26:40 AM UTC-5, frocco wrote: > > Hello, > > In PHP, if I make a change to the database query, like adding a where > clause to filter only active re

Question about not hardcoding paths in settings.py

2013-02-18 Thread frocco
Hello, I have a site under apache www root. www mysite templates media static I am following the two-scoops book. The problem is that my app is looking for templates at www/templates Here is my settings. Thanks from unipath import Path PROJECT_ROOT = Path(__file__).ancestor(3) M

Re: Question about not hardcoding paths in settings.py

2013-02-19 Thread frocco
Thanks for the help. So STATICFILES_DIRS should be something line 'assets' and my static headings and css/js files would live there? On Tuesday, February 19, 2013 10:11:40 AM UTC-5, ke1g wrote: > > > > On Mon, Feb 18, 2013 at 1:17 PM, frocco >wrote: > >> Hello,

Re: Question about not hardcoding paths in settings.py

2013-02-19 Thread frocco
Just remember to run > manage.py collect static after you modify something in one of the > STATICFILES_DIRS directories, or in one of the 'static' subdirectories of > an installed app. > > On Tue, Feb 19, 2013 at 10:42 AM, frocco >wrote: > >> Thanks for

Re: Question about not hardcoding paths in settings.py

2013-02-19 Thread frocco
Thanks Bill, for taking the time to explain this. Regards, Frank On Monday, February 18, 2013 1:17:42 PM UTC-5, frocco wrote: > > Hello, > I have a site under apache www root. > www >mysite > templates >media >static > > I am following the two

switched to webfaction, would 600GB be an issue?

2013-02-20 Thread frocco
Hi all, I swiched from Bluehost to webfaction and am concerned on the bandwidth cap. Bluehost was unlimited. It is a small app of about 200 users. Should I be worried? The site seems to run faster. -- You received this message because you are subscribed to the Google Groups "Django users" gro

Re: switched to webfaction, would 600GB be an issue?

2013-02-20 Thread frocco
loaded > from mirrors, rather than from your site. Webfaction then doesn't have to > serve as much for you. But wait to see if it's a problem before fiddling > with cache headers, and from where the Django admin loads jQuery. > > On Wed, Feb 20, 2013 at 1:32 PM, frocco

Re: switched to webfaction, would 600GB be an issue?

2013-02-20 Thread frocco
ur > limit. I think they also make it possible to automatically upgrade your > plan if you do go over. > > 600GB for 200 users would be 100MB per user per day, so I would doubt that > you would have a problem unless you are serving large media files. > > > On Wed, Feb 20, 2

Re: Easiest Way to Deploy Django?

2013-02-22 Thread frocco
Is PostgreSQL a better solution over MySQL? I too need to learn PostgreSQL. On Thursday, February 21, 2013 7:25:00 PM UTC-5, Russell Keith-Magee wrote: > > > On Fri, Feb 22, 2013 at 5:58 AM, Peter >wrote: > >> I've a new Django user who went through the tutorial and built a few very >> simple

how to use static in development with PyCharm?

2013-02-22 Thread frocco
Hello, I have my static data mapped to: STATIC_ROOT = '/wamp/www/static/' If I hit the app at localhost/app Everything is ok. However when I debug in PyCharm, the static data does not map. My templates use {{ STATIC_URL }}img/ Thank you -- You received this message because you are subscr

How do I join two existing tables?

2013-02-24 Thread frocco
Hi, I have to interface with an existing php app and the key field is character. paginator = Paginator(Shopinventory.objects.exclude(list_price=0).filter(sizenum__contains=search), 20) I want to add to the above and pull the related category. Shopcategories has a character prime key calle

Re: How do I join two existing tables?

2013-02-24 Thread frocco
Thank you On Sunday, February 24, 2013 10:00:58 AM UTC-5, frocco wrote: > > Hi, > > I have to interface with an existing php app and the key field is > character. > > paginator = > Paginator(Shopinventory.objects.exclude(list_price=0).filter(sizenum__contains=search

Re: how to use static in development with PyCharm?

2013-02-24 Thread frocco
roduction. > With that said, PyCharm seems to find static files there as well on my > installation. > > On Friday, February 22, 2013 9:53:05 AM UTC-7, frocco wrote: >> >> Hello, >> >> I have my static data mapped to: >> STATIC_ROOT = '/wamp/www/s

Re: How do I join two existing tables?

2013-02-24 Thread frocco
u could accidentally change the database definitions. > > All the information is here: > https://docs.djangoproject.com/en/dev/howto/legacy-databases/ > > On Feb 24, 2013, at 5:05 PM, frocco > > wrote: > > Thank you > > On Sunday, February 24, 2013 10:00:58 AM UTC-5, frocco wr

How to show list only in admin?

2013-02-26 Thread frocco
Hello, I have a file that I want to allow the admin to view only and not be able to add or change. delete is ok. how do I prevent the admin model from adding or changing records? Thanks Frank -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: ANNOUNCE: Django 1.5 released

2013-02-27 Thread frocco
Congratulation!! Although I am fairly new to Django (PHP website), I really enjoy using it. I appreciate all the hard work and look forward to a long relationship. Everyone on the form here has been great and have helped me understand how Django works. --Django convert. -- You received this m

Need to get a distinct category list from many to many

2013-02-27 Thread frocco
Hello, I Have a product table that has a many to many relation to a category table. When I query the products, I want to display a unique list of the categories associated with the product query. product table product_id categories = models.ManyToManyField(Category, related_name="cat") categor

Is there a way to list users that have logged in within the pass 30 minutes

2013-03-03 Thread frocco
I want to list users currently on our site. Would I use the last login date time? If so, what should the query look like? Thanks -- 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,

Re: urls.py not loading changes

2013-03-04 Thread frocco
That's good to know. On Monday, March 4, 2013 8:12:15 AM UTC-5, Venkatraman.S. wrote: > > Always prefer to delete the .pyc fie for issues such as these wherein > changes are not reflected despite server restart. > > On Sun, Mar 3, 2013 at 9:59 PM, Serge G. Spaolonzi > > > wrote: > >> Maybe the

Re: Is there a way to list users that have logged in within the pass 30 minutes

2013-03-04 Thread frocco
: data = session.get_decoded() uid_list.append(data.get('_auth_user_id', None)) # Query all logged in users based on id list return User.objects.filter(id__in=uid_list) On Sunday, March 3, 2013 11:49:09 AM UTC-5, frocco wrote: > > I want to list users currently on our

Re: Is there a way to list users that have logged in within the pass 30 minutes

2013-03-04 Thread frocco
some more cues. > > On Mon, Mar 4, 2013 at 7:35 PM, frocco >wrote: > >> Thanks for your input, I found this on google also. >> >> def get_all_logged_in_users(): >> # Query all non-expired sessions >> sessions = Session.objects.filter(expire_date__gte

Re: Is there a way to list users that have logged in within the pass 30 minutes

2013-03-04 Thread frocco
ok, do you have a better idea on how I might do this? user is used to seeing this from a PHP site that I am porting. On Monday, March 4, 2013 11:04:41 AM UTC-5, Venkatraman.S. wrote: > > Even then, its till a 'code'. You admin might not even load :) > > On Mon, Mar 4, 2

Re: Is there a way to list users that have logged in within the pass 30 minutes

2013-03-04 Thread frocco
So are you saying the best I can do is show users that logged in xx minutes ago, even through they may have logged off? Thank you On Monday, March 4, 2013 1:06:07 PM UTC-5, Shawn Milochik wrote: > > On Mon, Mar 4, 2013 at 1:02 PM, frocco > > wrote: > > ok, do you have a be

Re: Is there a way to list users that have logged in within the pass 30 minutes

2013-03-04 Thread frocco
Would this do the trick? SESSION_EXPIRE_AT_BROWSER_CLOSE = True I am still kinda new to django, about a month now. :) On Monday, March 4, 2013 2:11:50 PM UTC-5, Shawn Milochik wrote: > > On Mon, Mar 4, 2013 at 2:05 PM, frocco > > wrote: > > So are you saying the best I ca

  1   2   3   >