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: couldn't render a media image via a template

2013-04-06 Thread Pankaj Singh
On Sat, Apr 6, 2013 at 4:11 PM, Fatih Tiryakioglu wrote: > MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/site4/media' This is the absolute path to your media directory. > MEDIA_URL = '/media/' This means files/directories at MEDIA_ROOT directory will be accessible at an url starting with

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: Stop django admin

2013-04-06 Thread Pankaj Singh
Hey, You can run phpmyadmin on different port by creating a virtualhost having default phpmyadmin conf. NameVirtualHost *: Listen # Paste contents of default phpmyadmin conf here For example, visit http://pastie.org/7347686. Save this in /etc/apache2/sites-enabled/phpmyadmin After

need help designing models

2013-04-06 Thread surya
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 = models.CharField(max_length=200)*

Re: couldn't render a media image via a template

2013-04-06 Thread Fatih Tiryakioglu
It doesn't work.. -- On Saturday, April 6, 2013 2:46:05 PM UTC+3, Avnesh Shakya wrote: > > try it.. > > create one more folder media and put that media folder inside this new > folder > and then run.. > > regards, > Avnesh Shakya > > On Sat, Apr 6, 2013 at 4:11 PM, Fatih Tiryakioglu > > > wr

Re: djano user registration form and login(full example)

2013-04-06 Thread Shawn Milochik
I've seen some situations where it looked like signals are received multiple times. However, you can easily fix that by checking for the existence of the user in your function, or a try/except that handles the integrity error. Also, if you're starting a new project, consider upgrading to Django 1

Re: djano user registration form and login(full example)

2013-04-06 Thread sachin
Thanx Shawn, * * UserCreationForm really helped. Now I have a different problem, I'm trying to add custom feilds to *auth user *using storing-additional-information-about-users . But now I m getting th

Re: couldn't render a media image via a template

2013-04-06 Thread Avnesh Shakya
try it.. create one more folder media and put that media folder inside this new folder and then run.. regards, Avnesh Shakya On Sat, Apr 6, 2013 at 4:11 PM, Fatih Tiryakioglu wrote: > I want to render an image via a template, but the template can't show > image, but only a small image symbol..

Re: Can i access my database with Django?(Urgent)

2013-04-06 Thread Giorgos Kontogiorgakis
Thanks for all your answers guys!You helped me a lot with this part!I'll try that last thing with the 2 databases and i'll let you know how it went!Until next time :) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this gro

Creating, retrieving, updating and deleting objects.(Queries??) HELP

2013-04-06 Thread Giorgos Kontogiorgakis
Hey there!I am pretty new to Django,python and generally databases as well!I made it to the point that i have all the tables and their fields on my webinterface!The next thing that i want is being capable of creating,retrieving,updating and deleting objects on my database!Is that possible with

Re: couldn't render a media image via a template

2013-04-06 Thread Fatih Tiryakioglu
I want to render an image via a template, but the template can't show image, but only a small image symbol.. My settings: MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/site4/media' MEDIA_URL = '/media/' STATIC_ROOT = ' ' STATIC_URL = '/unnamed/' I have a template in '/home/mehmet/inte

couldn't render a media image via a template

2013-04-06 Thread Fatih Tiryakioglu
And in the settings: MEDIA_ROOT = '/home/mehmet/internet_projeleri/site4ust/site4/media' MEDIA_URL = '/media/' STATIC_ROOT = ' ' STATIC_URL = '/static/' I have a template in '/home/mehmet/internet_projeleri/site4ust/site4/templatelerim', which has the following line: http://groups.google.com/