Re: Need help with deployment

2017-05-09 Thread Luiz Guilherme Silva
Here is a tutorial about Django and IIS (old, but...) https://www.toptal.com/django/installing-django-on-iis-a-step-by-step-tutorial 2017-05-09 3:59 GMT-03:00 Antonis Christofides : > Django + Apache does make a good combination, but actually you are talking > about Django + Apache + mod_wsgi + W

Re: Need help with deployment

2017-05-09 Thread Antonis Christofides
Django + Apache does make a good combination, but actually you are talking about Django + Apache + mod_wsgi + Windows (which is pretty much the only combination for Windows, excluding IIS about which I know absolutely zero). But you should also consider another operating system; see https://djangod

Re: Need help with deployment

2017-05-08 Thread Luiz Guilherme Silva
Actually, after using Nginx and Gunicorn I stopped using Apache. Anyway, I think you could try to put it running on IIS. Unfortunatelly I don't have Windows here to help you with this and never did the steps to setup Django on Apache in windows. The experience I had with apache was in a shared hos

Re: Need help with deployment

2017-05-08 Thread sarfaraz ahmed
This is first time I am trying to deploy my django project. Doing online research I found Django+Apache makes good combination. Regards, Sarfaraz Ahmed On 6 May 2017 at 01:41, Luiz Guilherme Silva wrote: > Hello Ahmed. > > Why are you using apache instead of IIS? I know it's not the question, b

Re: Need help with deployment

2017-05-05 Thread Luiz Guilherme Silva
Hello Ahmed. Why are you using apache instead of IIS? I know it's not the question, but I've worked in a project running on IIS for a long time without big problems, and you don't need Apache for this. 2017-05-04 16:00 GMT-03:00 sarfaraz ahmed : > Hello Friends, > > I have an Windows 2016 Server

Re: Need help in posting Multi select option from HTML to MongoDB using Mongoengine

2017-03-07 Thread Carlos Andre
Vinay to this do the simple. The form interprets normally the models. Example: models.py from mongoengine import * class person(Document): name = StringField(max_length = 150) club = EmbeddedModelField(club) class club(Document): name = StringFiend(max_length = 150) form.py class FormPerson

Re: Need help with a school project

2017-01-16 Thread Ryan Nowakowski
On Sat, Jan 14, 2017 at 04:10:09PM -0800, Grant Holman wrote: > I need help starting a django project for a school project. I am brand new > to Django but have some experience with Python. > > I need to design web application where inputs are put onto a screen and > then inputted into a databas

Re: Need help with a school project

2017-01-14 Thread Vijay Khemlani
Read the tutorial I guess https://docs.djangoproject.com/en/1.10/intro/tutorial01/ After that handling form data and saving to the databse should be trivial On 1/14/17, Grant Holman wrote: > I need help starting a django project for a school project. I am brand new > to Django but have some exp

Re: Need help to catch "cart_id" based on session.

2016-11-07 Thread Melvyn Sopacua
On Sunday 06 November 2016 21:00:44 ludovic coues wrote: > I would try request.session.get('cart_id', None) instead of > request.session['card_id']. Negative. First, this is part of the 3rd party app "doorsale". Secondly, at this stage in the order process a cart id SHALL be present in the sessi

Re: Need help to catch "cart_id" based on session.

2016-11-06 Thread ludovic coues
I would try request.session.get('cart_id', None) instead of request.session['card_id']. Both act the same if the key exist in the dict. When the key is missing, the first return the second value (None in this case) while the second raise a Key Error exception. 2016-11-05 13:10 GMT+01:00 Shazia Nu

Re: Need help with a hostel management system project using django

2016-10-30 Thread mulianto
Hi, You can create 3 groups and put each user to specific group. Set the permission on the group an all te group member will have the specified permission for Create, Read, Update, Delete. Mulianto Sent from my iPhone On 30 Okt 2016, at 22:37, YOGITHA A N wrote: > I need to create 3 kinds o

Re: Need help with a hostel management system project using django

2016-10-30 Thread YOGITHA A N
I need to create 3 kinds of users with 3 different permissions. One being that of the student , mess contractor and hostel warden. How do I create 3 differnt kinds of login and user profiles. On Sunday, October 30, 2016 at 7:39:56 PM UTC+5:30, bob gailer wrote: > > On Oct 30, 2016 9:53 AM, "YOGIT

Re: Need help with a hostel management system project using django

2016-10-30 Thread Bob Gailer
On Oct 30, 2016 9:53 AM, "YOGITHA A N" wrote: > > I am beginner in django please help me out with my project To help us help you be more specific. What kind of help do you need? > > -- > You received this message because you are subscribed to the Google Groups "Django users" group. > To unsubscrib

Re: Need help in Django Task

2015-08-18 Thread Jani Tiainen
Hi, How much you pay for this work? :) Sorry, you really have to do your homework... On Mon, 17 Aug 2015 12:06:51 -0700 (PDT) conticki wrote: > Task to be done in Django > > Table structure: > >- Movies > - id > - Title > - Description > - Featured image >

Re: Need help with auto_now_add and auto_now fields

2015-08-03 Thread rajan santhanam
No problem. Still you can provide an one off value by selecting option 1 and migrate. It won't have any impact. I think this warning will arise on every occasion we alter the table structure irrespective of entry being there or not. On 04-Aug-2015 11:05 am, "sarfaraz ahmed" wrote: > I have entri

Re: Need help with auto_now_add and auto_now fields

2015-08-03 Thread sarfaraz ahmed
I have entries present in User Profile Table. But this field belongs to User_Address model which is new and does not have any entries present. Please advice. On Tue, Aug 4, 2015 at 12:51 AM, rajan santhanam wrote: > Hi Ahmed, > > This message is because you hav few entries already present for

Re: Need help with auto_now_add and auto_now fields

2015-08-03 Thread rajan santhanam
Hi Ahmed, This message is because you hav few entries already present for that model in DB. If it is OK for you, you can add datetime.now as default value for the existing rows Many Thanks Rajan -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Need help with auto_now_add and auto_now fields

2015-08-03 Thread sarfaraz ahmed
I missed the pastebin link in my last post. Sorry... Here is the model code http://pastebin.com/5EF1hV8U On Tuesday, 4 August 2015 00:48:18 UTC+5:30, sarfaraz ahmed wrote: > > Hello Team, > > I have a model and I have added two fields to User_Address model > creation_date and updation_date. I h

Re: need help to configure new domain

2015-01-19 Thread zsandrusha .
Sank's for responding, but we already made all, there was no DB after server crash or something like this. On Sat, Jan 17, 2015 at 4:12 PM, Collin Anderson wrote: > Hi, > > Did you figure it out? It looks like you need to configure your urls.py so > it's connected with django-cms. > > Collin > >

Re: need help to configure new domain

2015-01-17 Thread Collin Anderson
Hi, Did you figure it out? It looks like you need to configure your urls.py so it's connected with django-cms. Collin On Tuesday, January 13, 2015 at 9:19:09 PM UTC-5, zsandrusha wrote: > > hello i need urgent help to configure django, > i had site on django cms then i loose my old domaind now

Re: Need help with unique_together - on ForeignKey and Boolean field

2014-11-17 Thread ThomasTheDjangoFan
Hi Javier, oh yes! You seem to be a really creative and experienced programmer! [image: smile.png] My solution will be way number 5: 5) Do not set unique_together - forget about it and give the model a function "get_default_image", which returns the first "default_image=True" in the list. T

Re: Need help with unique_together - on ForeignKey and Boolean field

2014-11-17 Thread Javier Guerra Giraldez
On Mon, Nov 17, 2014 at 6:10 AM, ThomasTheDjangoFan wrote: > > How would you do this? Can you give me a hint? 4 different ways: - don't do it as a flag, add a 'defaultImage=ForeignKey(ProductImage)' to the Product class. - don't use False for non-default, use NULL. since two NULL values aren'

Re: Need help with unique_together - on ForeignKey and Boolean field

2014-11-17 Thread ThomasTheDjangoFan
Hi Jani, thanks for making it clear. [image: smile.png] Actually I would like to assign a lot of images to a product and only have one image as the default image. How would you do this? Can you give me a hint? Am Montag, 17. November 2014 11:25:37 UTC+1 schrieb Jani Tiainen: > > On Sun, 16 N

Re: Need help with unique_together - on ForeignKey and Boolean field

2014-11-17 Thread Jani Tiainen
On Sun, 16 Nov 2014 23:51:16 -0800 (PST) ThomasTheDjangoFan wrote: > Hi guys, > > I'd like to only be able to assign many ProcutImages to a Product, but only > ONE Image as a default image per product > (ProductImage.is_default_image=True). > > I can't get this to work correnctly on Django 1.

Re: Need help my first Django app

2014-05-31 Thread Kelvin Wong
https://docs.djangoproject.com/en/1.6/intro/tutorial01/ K On Saturday, May 31, 2014 12:06:20 AM UTC-7, Mamdou Attallah wrote: > > Since I have never delveoped any Django app before I need to find an easy > tutorial to kick start my first app > I am using free trial of py charm > thanks > -- Yo

Re: Need help on token-based authentication

2014-02-06 Thread Calvin Chen
Hi Rahul Gaur, Thanks for your answer. I will definitely take a look at the gist and repositories that you provided. Hopefully, it will gives me some ideas. :-) Thanks a lot. Kind Regards, Cheng On Thursday, February 6, 2014 6:03:03 PM UTC+8, Rahul Gaur wrote: > > Hi , > You can take a look

Re: Need help on token-based authentication

2014-02-06 Thread Rahul Gaur
Hi , You can take a look at the following GIST : https://gist.github.com/aregee/6310787 I have two projects , that implement the Token based authentication. I have used Django Tastypie for rolling out the RESTful apis and since tastypie offers ApiKeyAuthentication() method , on the client side I ha

Re: Need Help Moving Database to production server

2014-01-29 Thread Babatunde Akinyanmi
Replies are inline On 28 Jan 2014 17:15, "Mark Phillips" wrote: > > On Mon, Jan 27, 2014 at 11:51 PM, Mike Dewhirst wrote: >> >> On 28/01/2014 4:51pm, Mark Phillips wrote: >>> >>> I have a django project running on my laptop. I have (finally) managed >>> to get it to work with apache on a product

Re: Need Help Moving Database to production server

2014-01-28 Thread Mark Phillips
On Tue, Jan 28, 2014 at 2:57 PM, Alex Mandel wrote: > On 01/28/2014 08:15 AM, Mark Phillips wrote: > > On Mon, Jan 27, 2014 at 11:51 PM, Mike Dewhirst >wrote: > > > >> On 28/01/2014 4:51pm, Mark Phillips wrote: > >> > >>> I have a django project running on my laptop. I have (finally) managed > >>

Re: Need Help Moving Database to production server

2014-01-28 Thread Alex Mandel
On 01/28/2014 08:15 AM, Mark Phillips wrote: > On Mon, Jan 27, 2014 at 11:51 PM, Mike Dewhirst wrote: > >> On 28/01/2014 4:51pm, Mark Phillips wrote: >> >>> I have a django project running on my laptop. I have (finally) managed >>> to get it to work with apache on a production server. However, I s

Re: Need Help Moving Database to production server

2014-01-28 Thread Mark Phillips
On Mon, Jan 27, 2014 at 11:51 PM, Mike Dewhirst wrote: > On 28/01/2014 4:51pm, Mark Phillips wrote: > >> I have a django project running on my laptop. I have (finally) managed >> to get it to work with apache on a production server. However, I still >> have a problem. When I access the admin site

Re: Need help with pushing technology ... and a bit more ...

2014-01-27 Thread Avraham Serour
> Isn't there a better way to push notifications? Better than what? > Do I forcibly have to use a service... no, but it will make your life easier > Would it be possible to build our own push service ... yes, why not I suggest not making your life too complicated, make the system as simple as poss

Re: Need Help Moving Database to production server

2014-01-27 Thread Mike Dewhirst
On 28/01/2014 4:51pm, Mark Phillips wrote: I have a django project running on my laptop. I have (finally) managed to get it to work with apache on a production server. However, I still have a problem. When I access the admin site and login as the superuser, I get "you don't have permission to do

Re: Need help in my Django program

2013-09-23 Thread ghenessa sabaldan
How do I display the updated value from another model, example > > Model A > > C = user inputted value > > > > Model B > > A = initial value of 0 + C > > B = initial value of 50 – A > So every time a different user input a value in C the A & B will automatically be updated, when A = 50

Re: Need help in my Django program

2013-09-22 Thread Mark Phillips
I don't think you will get anyone to wade through your code and correct it for you. You need to be much more specific in your question. What behavior do you expect from your code, what is it doing that it shouldn't be doing, what doe the error logs say, where is the specific problem in your code, (

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-19 Thread Leonardo Giordani
I see now that you are not passing the CSRF token, are you? https://docs.djangoproject.com/en/dev/ref/contrib/csrf/ Leonardo Giordani Author of The Digital Cat My profile on About.me - My GitHub page- M

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-19 Thread Leonardo Giordani
In Django key:value are sent the way you specify in your urls configuration. E.g., say that you want to show an object that you can extract from your DB with year=2013 and month=09 ('year' and 'month' are here a primary key for that model if used together). The URL schema is completely up to you, s

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-18 Thread C. Kirby
If you want to use key value pairs like that, and you are modifying data in your database, you should really be using a POST and not a GET On Wednesday, September 18, 2013 10:00:51 AM UTC-5, 7equiv...@gmail.com wrote: > > "So I think that the ajax() function is calling the URL > "/pi/?pathID=so

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-18 Thread 7equivalents
"So I think that the ajax() function is calling the URL "/pi/?pathID=somevalue," Is that different than how a key:value pair are normally sent? I don't know much about this. This is the output from the development server... "GET /pi/ HTTP/1.1" 200 2600 -- You received this message because you

Re: Need help in my Django code

2013-09-18 Thread Rafael E. Ferrero
hello ghenessa, first of all i'll recommend that use pastebin to share code since tabular spaces in python its relevand. now, you want to do something like triggers on database but do it in Django Admin? (something like automatic saving TimeStamp of a creation moment of the registry or update ?)

Re: Need help figuring out why my { key:value } doesn't seem to be passed to my view by my javascript file.

2013-09-17 Thread Leonardo Giordani
If I correctly understand you are using jQuery.ajax(). Documentation says "Data to be sent to the server. It is converted to a query string, if not already a string. It's appended to the url for GET-requests." So I think that the ajax() function is calling the URL "/pi/?pathID=somevalue". May you p

Re: Need help on customizing my django admin page to my own new look

2013-07-17 Thread Rurangwa Moses
Thx a bunch guys it worked -- 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 djang

Re: Need help on customizing my django admin page to my own new look

2013-07-17 Thread Mário Neto
A path to follow: https://docs.djangoproject.com/en/dev/ref/contrib/admin/#overriding-admin-templates 2013/7/17 Rurangwa Moses > Hey guys, > I need some help on how to customize a django admin page to whole new > different look rather than the default django admin page > > Thanks > > -- > You r

Re: Need help on customizing my django admin page to my own new look

2013-07-17 Thread Rafael E. Ferrero
create a /statics/admin folder in your project and paste into admin folder all django admin folder... css, js, etc... then modify this with your own look... Django first try to execute this if not found go with Django Admin looks (original admin interface, dont remember quite well, but must to be

Re: need help with csv export

2013-04-13 Thread Mark Lybrand
Have you looked at this: http://docs.python.org/2/library/csv.html On Fri, Apr 12, 2013 at 2:53 PM, frocco wrote: > Hello, > > I have a php export file that I need to duplicate in django. > I am using django csv import > > Here is the PHP format I want. > > 3128559,"GOODYEAR","4024064","","","

Re: need help designing models

2013-04-06 Thread Mike Dewhirst
On 7/04/2013 4:36pm, surya wrote: actually, you are right, django models do provide id.. but this uid field is something else.. Eg: massachusetts institute of technology. uid = MIT..i will be using it as primary key. Doing so raises questions about investing primary keys with real meaning. I

Re: need help designing models

2013-04-06 Thread surya
On Sunday, April 7, 2013 11:42:50 AM UTC+5:30, Mike Dewhirst wrote: > > On 7/04/2013 3:27pm, surya wrote: > > Consider a university college. > > 1. College has name, uid, website > > 2. Each college has a many departments - Each department has name, uid. > > 3. Each batch in a department has

Re: need help designing models

2013-04-06 Thread Mike Dewhirst
On 7/04/2013 3:27pm, surya wrote: Consider a university college. 1. College has name, uid, website 2. Each college has a many departments - Each department has name, uid. 3. Each batch in a department has name, and ratings. *from django.db import models* * * *class College(models.Model):* *name

Re: need help designing models

2013-04-06 Thread Pankaj Singh
College field in Batch model is redundant. You can get college of a batch using batch.department.college. On Sun, Apr 7, 2013 at 10:57 AM, surya wrote: > Consider a university college. > 1. College has name, uid, website > 2. Each college has a many departments - Each department has name, uid. >

Re: Need help with GeoDjango distance query.

2013-02-16 Thread Sanjay Bhangar
On Fri, Feb 15, 2013 at 10:00 PM, mack the finger wrote: > http://stackoverflow.com/questions/14889780/distance-query-within-a-certain-distance-based-on-value-in-joined-table > > Basically I want all objects within a certain distance, AS WELL as within > each object's preferred distance. > just o

Re: need help

2013-02-05 Thread Russell Keith-Magee
On Wed, Feb 6, 2013 at 8:27 AM, Thiago Avelino wrote: > I believe that this list is not for this kind of topic. > > When you put this kind of topic as [Off topic] > I don't know where you got this idea. If something is off topic you don't invent some sort of special subject syntax for it -- you *

Re: need help

2013-02-05 Thread Thiago Avelino
I believe that this list is not for this kind of topic. When you put this kind of topic as [Off topic] Cheers, Thiago Avelino On Tue, Feb 5, 2013 at 2:33 PM, salah D.J wrote: > i have a web provisioning project > and i need developer to to install it and change some features > we can

Re: NEED HELP ON RUNNING DJANGO ON XAMPP 1.7 UNDER WIN 8

2013-01-13 Thread Damián Pérez
Try something like this. (work so good with me, i have win 7, virtualhost in wamp and wsgi. *apache - httpd:* *modules:* LoadModule wsgi_module modules/mod_wsgi.so *virtual host* ServerAdmin root@localhost DocumentRoot "D:/htdocs" ServerName localhost #RewriteEngine on WSGIScriptAl

Re: NEED HELP ON RUNNING DJANGO ON XAMPP 1.7 UNDER WIN 8

2013-01-12 Thread Nikolas Stevenson-Molnar
Do you have an "Allow" directive for the appropriate directory? http://httpd.apache.org/docs/2.0/mod/mod_access.html#allow _Nik On 1/12/2013 10:27 AM, Kanai Lomayani wrote: > I have managed to install mod_wsgi on apache and django when i try to > access the django address I get this error > *[S

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-11 Thread Nikolas Stevenson-Molnar
It goes in your Apache config file. Probably somewhere like /etc/httpd/httpd.conf _Nik On 1/11/2013 5:10 PM, 7equivale...@gmail.com wrote: > Hey guys, thanks for the help. > (1 )I have confirmed mod-wsgi has been compiled against the correct > version of python. > (2) I have also confirmed mod-ws

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-11 Thread 7equivalents
Hey guys, thanks for the help. (1 )I have confirmed mod-wsgi has been compiled against the correct version of python. (2) I have also confirmed mod-wsgi is in the list of loaded modules. My next question is what file do I place the WSGIScript directive in? I can't seem to find which file it goe

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread Bill Freeman
The apache configuration files must have, at a minimum, a WSGIScriptAlias directive. There is also a list of the apache modules which get loaded, and mod_wsgi must be included. mod_wsgi must be linked against the particular apache, but the distribution, if you're using the OS's package manager, s

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread Nikolas Stevenson-Molnar
I mean configuring Apache, as described here: https://docs.djangoproject.com/en/1.4/howto/deployment/wsgi/modwsgi/ If you're not too attached to Apache, I personally find it easier to use Gunicorn with Nginx: http://gunicorn.org/#deployment _Nik On 1/10/2013 12:27 PM, 7equivale...@gmail.com wrot

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread 7equivalents
When you say "From there it should just be configuration." Do you mean either (1) Configuring mod-wsgi to work with apache, or (2) Configuring mod_wsgi to work with Django. The errors where involved with my first attempt at installing mod-wsgi according to the Django instructions, However now

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread Nikolas Stevenson-Molnar
Also, IIRC mod-wsgi has to be compiled against a specific version of Python, so you may have a version mismatch. I ran Apache + Django + Python 2.7 once and I ended up building modwsgi myself against Python 2.7 (I think the pre-built was 2.6). _Nik On 1/10/2013 10:59 AM, 7equivale...@gmail.com wr

Re: Need help configuring Apache production server on Raspberry PI to work with Django.

2013-01-10 Thread Nikolas Stevenson-Molnar
>From there, it should just be configuration. What errors are you seeing? _Nik On 1/10/2013 10:59 AM, 7equivale...@gmail.com wrote: > Hello, I need help configuring the Apache production server to work > with Django on a Rapberry pi. I am still new to Linux. Here is what > I've done so far. > > (

Re: need help with postgres installation and set-up for doing tutorials

2012-11-22 Thread Bill Freeman
On Wed, Nov 21, 2012 at 8:58 AM, Luisa Beck wrote: > Thank you for your thoughts! I have a few follow-up questions: > > *The reason that I’m trying to figure out postgres is that I’m helping > some folks with a development project and they’re using postgres. I’m > trying to do the tutorial with t

Re: need help with postgres installation and set-up for doing tutorials

2012-11-21 Thread Thomas Lockhart
*On 11/21/12 5:58 AM, Luisa Beck wrote:** * *Thank you for your thoughts! I have a few follow-up questions: * * * *The reason that I’m trying to figure out postgres is that I’m helping some folks with a development project and they’re using postgres. I’m trying to do the tutorial with that so t

Re: need help with postgres installation and set-up for doing tutorials

2012-11-21 Thread Luisa Beck
Thank you for your thoughts! I have a few follow-up questions: *The reason that I’m trying to figure out postgres is that I’m helping some folks with a development project and they’re using postgres. I’m trying to do the tutorial with that so that I can get familiar with postgres and the pgAdm

Re: need help with postgres installation and set-up for doing tutorials

2012-11-20 Thread Bill Freeman
On Mon, Nov 19, 2012 at 6:40 PM, Luisa Beck wrote: > Hi, I'm new to web development and I'm trying to get my mac set up for > doing the tutorials. > I installed postgres and pgAdmin III and set it up on the default port > (5433). I created a test database. Now when I try to open it on the local >

Re: Need help with Query: Q Objects and .extra()

2012-11-18 Thread est
Sorry for bumping this old this, but I found solutionfor this problem qs = models.MyModel.objects.filter(a=1) qs |= models.MyModel.objects.filte(b=2).extra(where=[""]) I checke the generated SQL and it's working exactly as expected. Hope this helps anyone

Re: need help on set_password()..............

2012-07-29 Thread Chris Lawlor
If you're using the User model from contrib.auth, you can simply use User.objects.create_user(username, email=None, password=password). This will create a new User object, and then call set_password() # forms.py class RegistrationForm(form.Form): username = forms.CharField() password = f

Re: Need Help with MySQL configuaration

2012-07-09 Thread Rajan Chaudhari
http://stackoverflow.com/questions/6383310/python-mysqldb-library-not-loaded-libmysqlclient-18-dylib solved this error. Thanks! On Monday, 9 July 2012 17:57:45 UTC-4, Rajan Chaudhari wrote: > > Hello all, > > I have installed Django, MySql, phpMyAdmin and python-mysq. I am able to > create new

Re: Need Help with ForeignKeys

2012-05-23 Thread Mark Phillips
Thanks! I think I understand it now! Mark On Wed, May 23, 2012 at 8:00 AM, Simone Federici wrote: > On Wed, May 23, 2012 at 4:40 PM, Mark Phillips > wrote: > >> Now, can you please explain why it worked? What does the related_name do >> and why do I need it? > > When you define a ForeignKey, dj

Re: Need Help with ForeignKeys

2012-05-23 Thread Simone Federici
On Wed, May 23, 2012 at 4:40 PM, Mark Phillips wrote: > Now, can you please explain why it worked? What does the related_name do > and why do I need it? When you define a ForeignKey, django creates dinamically a reverse relationship. take this example: A B.a -> A from an instance of b = B() yo

Re: Need Help with ForeignKeys

2012-05-23 Thread Kurtis Mullins
The related name, basically, specifies a way to back-reference that particular Team. If you don't specify it, it just uses an automatically generated variable name (for example, just 'team'). You'd have a conflict because there'd be two 'team' variables generated in your game class. The method Simo

Re: Need Help with ForeignKeys

2012-05-23 Thread Mark Phillips
Thanks, that worked. Now, can you please explain why it worked? What does the related_name do and why do I need it? Thanks! Mark On Wed, May 23, 2012 at 7:34 AM, Simone Federici wrote: > class Game(models.Model): > game_id = models.IntegerField(primary_key=True) > gamedate = models.Dat

Re: Need Help with ForeignKeys

2012-05-23 Thread Simone Federici
class Game(models.Model): game_id = models.IntegerField(primary_key=True) gamedate = models.DateField() gamestart = models.TimetField(blank=True) duration = models.IntegerField() innings = models.IntegerField() hometeam = models.ForeignKey(Team, related_name='homegame_set')

Re: Need Help Converting SQL statement into Django Query Syntax

2012-05-06 Thread Mark Phillips
On Sun, May 6, 2012 at 9:24 AM, Dennis Lee Bieber wrote: > On Sun, 6 May 2012 08:16:02 -0700, Mark Phillips > declaimed the following in > gmane.comp.python.django.user: > > > I have three tables - > > Person: id, first_name, last_name, deleted, last_update > > Email: id, email_address, email_typ

Re: Need help

2012-05-03 Thread Kurtis Mullins
Your Database may very well be setup to Authenticate the Accessing User on 127.0.0.1 and not 'localhost' (or vice-versa). This would be setup in the database when setting credentials for a user, in the case with MySQL. On Wed, May 2, 2012 at 9:52 PM, Peter of the Norse < rahmcoff+...@radio1190.org

Re: Need help

2012-05-02 Thread Peter of the Norse
There is a difference between 'localhost' and the empty string. 'localhost' translates into 127.0.0.1 and is sent using the internet. The empty string means to use local sockets for communication. At least with PostgreSQL. (It might be different with MySQL.) In short, this is not a bug. Please

Re: Need help

2012-04-03 Thread Andre Terra
It could be a regression bug. To be honest, I don't see a reason why '' should become 'localhost' automagically. I'd much prefer if users were forced to write 'localhost' rather than having Django do it (and fail) for them. Explicit is better than implicit. If you haven't yet, please file a bug

Re: Need help

2012-04-03 Thread thongor
Wow this post is really old but this also solved my problem strangely enough. On Thursday, June 25, 2009 2:48:32 PM UTC-4, amy wrote: > > I had this same problem...the user and pass were fine but no users > could authenticate on any DB, regardless of settings. > > Turns out my issue was only t

Re: Need help creating model.

2012-03-28 Thread Psamathos
I would create a many-to-many relationship between Student and Class through a custom intermediate model called Grade. You can then add a date field to Grade and any other extra fields you want. Read up on m2m relationships here: https://docs.djangoproject.com/en/dev/topics/db/models/#many-to-m

Re: Need help creating model.

2012-03-27 Thread jondbaker
I think the Foreign Key route is the way to go. After setting up the fields on both the Student and Point models and establishing the FK relationship between the two, you could write a table-level method that returned the number of corresponding Points. On Tuesday, March 27, 2012 7:18:12 PM UTC

Re: Need help on a (maybe complex) query with aggregate/annotate

2012-02-22 Thread Enrico
Works like a charm. Thanks! Ciao Enrico On Feb 21, 11:06 pm, Michael Elkins wrote: > On Tue, Feb 21, 2012 at 01:10:28PM -0800, Enrico wrote: > >But your query counts all the books, even the bad ones. I only need to > >count the good ones... > > >For example, if my books are: > > >1. name: LOTR,

Re: Need help on a (maybe complex) query with aggregate/annotate

2012-02-21 Thread Michael Elkins
On Tue, Feb 21, 2012 at 01:10:28PM -0800, Enrico wrote: But your query counts all the books, even the bad ones. I only need to count the good ones... For example, if my books are: 1. name: LOTR, rating: 10, publisher: A ... 2. name: ASOIAF, rating: 10, publisher: A ... 3. name: Twilight, rating

Re: Need help on a (maybe complex) query with aggregate/annotate

2012-02-21 Thread Enrico
Thanks Micheal for the response! But your query counts all the books, even the bad ones. I only need to count the good ones... For example, if my books are: 1. name: LOTR, rating: 10, publisher: A ... 2. name: ASOIAF, rating: 10, publisher: A ... 3. name: Twilight, rating 1, publisher: B ... an

Re: Need help on a (maybe complex) query with aggregate/annotate

2012-02-21 Thread Michael Elkins
On Feb 21, 6:11 am, Enrico wrote: > This query: > Publisher.objects.filter(book__rating__gt=3.0).annotate(num_books=Count('bo > ok')) > returns all the publishers with at least one good book (ranked > 3) > with annotated the number of good books for each publisher. > > How can i modify the query

Re: Need help regarding url patterns

2012-02-03 Thread akaariai
On Feb 3, 2:50 pm, ankitrocks wrote: > Hi. > Thanks for replying. > > The reason  I used login/logout multiple times in the urls.py because > i was unable to redirect from polls/03/logout to polls/login. When I > am using href="../logout" , it works but sometimes when I am in > level-2 in doesnt w

Re: Need help regarding url patterns

2012-02-03 Thread ankitrocks
Hi. Thanks for replying. The reason I used login/logout multiple times in the urls.py because i was unable to redirect from polls/03/logout to polls/login. When I am using href="../logout" , it works but sometimes when I am in level-2 in doesnt work. Please ignore the parameters of poll id in log

Re: Need help regarding url patterns

2012-02-02 Thread akaariai
On Feb 2, 4:57 pm, ankitrocks wrote: > Please take a look at the following files: > > http://pastebin.com/F86G9XJn > > http://pastebin.com/p6gArpuG > > http://pastebin.com/zxNHVHbV > > http://pastebin.com/Rf9Kg9jf > > Now my problem is that, I want all the logout links in the templates > point to

Re: Need help with userena - assign user to group at signup

2012-01-20 Thread Jesramz
>you just make your choice in the backend depending what your database says Would I have to go into the admin myself? (please, I have the mind of a four year-old) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Need help with userena - assign user to group at signup

2012-01-20 Thread Andres Reyes
What do you mean with the employee choosing the employer option? You normally don't give a choice in the frontend, you just make your choice in the backend depending what your database says 2012/1/19 Jesramz : > > > The problem with that, if I'm understanding correctly, is that a > person who is m

Re: Need help with custom search using admin queryset

2012-01-20 Thread Raoul
Is there nobody using such extended search functions in Django? Does anyone have a similar method for filtering querysets before returning to admin result list? Thanks for any hint! -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to th

Re: Need help with userena - assign user to group at signup

2012-01-19 Thread Jesramz
The problem with that, if I'm understanding correctly, is that a person who is meant to be an employee can easily choose the employer option. I want to add permissions such that an employer can see employee profiles while the employee can't (a separate form might add a tiny bit more security, I t

Re: Need help with userena - assign user to group at signup

2012-01-19 Thread Andres Reyes
I don't think you need two different login forms, it looks more like a UserProfile with field in it saying something like EMPLOYEE_CHOICES = ( (1, 'employer'), (2, 'employee'), ) employee_type = models.IntegerField(choices=EMPLOYEE_CHOICES) 2012/1/19 Jesramz : > I would like to separate

Re: Need help in renaming template tags

2012-01-02 Thread CareerDhaba tech
Sent the previous email without reading the thread. I tried both {% import %} and {% load %}, but it errors out when trying to access either of the thumbnails in the app, spitting out an unpacking error. I have opened an issue on the github page, but haven't heard from the original developer yet.

Re: Need help in renaming template tags

2012-01-02 Thread CareerDhaba tech
I am using two because django-userena uses easy_thumbnail, but I'd like to use sorl-thumbnail for actual thumbnail use in my app. - Harshil On Mon, Jan 2, 2012 at 8:07 PM, francescortiz wrote: > Why are you using two thumbnail providers? > > On Dec 26 2011, 3:01 pm, CareerDhaba tech > wrote: >

Re: Need help in renaming template tags

2012-01-02 Thread CareerDhaba tech
Hi Andre, Thanks for looking into this. Have you come across this django app? https://github.com/codysoyland/django-smart-load-tag The app claims to have a fix for this problem, but I had trouble getting it to work (unpacking issue). If you can keep me in the loop regarding the ticket, that would

Re: Need help in renaming template tags

2012-01-02 Thread francescortiz
Why are you using two thumbnail providers? On Dec 26 2011, 3:01 pm, CareerDhaba tech wrote: > Hey everyone, > > I am running into an issue where two third party apps easy_thumbnail and > sorl_thumbnail are using the custom template tag called thumbnail. Hence, I > am actually unable to use the ta

Re: Need help in renaming template tags

2012-01-02 Thread Andre Terra
I now realize the problem is much more complex than what I though originally. My suggestion to you is to use this nifty third-party tool called django-smart-load-tag[1]. Once you get it up and running, try using {% import %} instead of {% load %}. Cheers, AT [1] https://github.com/codysoyland/

Re: Need help in renaming template tags

2012-01-02 Thread Andre Terra
Hello, I looked into your problem and realized the current implementation of {% load %} doesn't allow for homonimous tags. I plan on working toward a patch to fix this, but this can take a little while. Meanwhile, your best bet would be to fork one of the two projects and change the tag's name, I

Re: Need help in renaming template tags

2012-01-01 Thread CareerDhaba tech
Just bumping this up in case anyone can help. Thanks, Harshil On Mon, Dec 26, 2011 at 7:31 PM, CareerDhaba tech wrote: > Hey everyone, > > I am running into an issue where two third party apps easy_thumbnail and > sorl_thumbnail are using the custom template tag called thumbnail. Hence, I > am a

Re: Need help for using easy_thumbnails

2012-01-01 Thread francescortiz
I wrote a thumbnailing app myself: https://github.com/francescortiz/image The main advantages of this are: - You set the center of attention for images through the admin section. This way, when you crop your image it looks properly aligned, whatever crop you do. This is the reason why I created i

<    1   2   3   4   5   6   7   >