Regarding postgresql

2011-08-20 Thread Harjot Gill
@ All We have tried to make database of TCC software in postgresql instead of mysql. But we are facing a problem after creating the database for TCC when we are trying to make the tables by using command "python manage.py syncdb" then the following error will occur : no module named psycopg Even w

What I am missing is this Django "logout"?

2011-08-20 Thread Andre Lopes
I am new to Django, and I am trying to put the logout to work... I have installed the an App called, Django-Registration. My problem is that I can do the logout, but the page does not get refreshed, I must to press F5 after the logout to see the page for not logged users. What I have done is the

Re: "app_index.html" = i want to be in admin...

2011-08-20 Thread doniyor
thanks but these links are not for overriding the app_index.html in order to show the APP in adminsite. i know how to override a template but dont know how to override APP_INDEX.html which is supposed to show my app in adminsite. thanks for help in advance.. On 20 Aug., 04:31, Nan wrote: > > w

Re: Missing datepicker in Django 1.3 admin

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 01:53 -0700, George wrote: > ADMIN_MEDIA_PREFIX = '/static/admin/' this does not exist in 1.3 - please read the docs on django.contrib.staticfiles -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" grou

Re: Regarding postgresql

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 14:31 +0530, Harjot Gill wrote: > We have tried to make database of TCC software in postgresql instead > of mysql. But we are facing a problem after creating the database for > TCC when we are trying to make the tables by using command "python > manage.py syncdb" then the foll

Re: Regarding postgresql

2011-08-20 Thread Harjot Gill
> > the backend should be postgresql_psycopg2 and you should install > python-psycopg2. I have done this but error remains same. It shows me the same error after the installation of the python-psycopg2. -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Regarding postgresql

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 15:27 +0530, Harjot Gill wrote: > > the backend should be postgresql_psycopg2 and you should install > > python-psycopg2. > I have done this but error remains same. > It shows me the same error after the installation of the > python-psycopg2. what distro are you running? --

Re: Regarding postgresql

2011-08-20 Thread william ratcliff
Are you sure that you've installed it to the same python that django is using? Can you import it successfully? On Sat, Aug 20, 2011 at 5:57 AM, Harjot Gill wrote: > > > > the backend should be postgresql_psycopg2 and you should install > > python-psycopg2. > I have done this but error remains

Re: Regarding postgresql

2011-08-20 Thread Harjot Gill
Yes, i have installed it to the python that django is using. Yes i have import it successfully. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, s

Re: Specific models without a database table

2011-08-20 Thread Malcolm Box
On 20 August 2011 02:33, Kristofer Pettijohn wrote: > Hello, > > Is it possible to create specific models without a database table? > > Yes, it's possible. You want the "managed" attribute on the model - see https://docs.djangoproject.com/en/1.3/ref/models/options/#managed This will prevent Djang

Re: how to invalidate per-view cache?

2011-08-20 Thread Malcolm Box
On 19 August 2011 23:32, galgal wrote: > I want to use per-view > cache. > I know how it's working, but where's the problem? How can I invalidate that > cache? I must do it each time database records are changed. There is no

Re: Django Test Corrupted Test Data

2011-08-20 Thread Malcolm Box
According to the SO post, you're seeing TestObject.objects.all().count() return two different values on successive calls. That is basically impossible unless there's something else getting in there and doing stuff to your db. Alternatively, does your subclass of TestCase correctly call super(MyTe

Re: Best approach to handling different types of Users

2011-08-20 Thread Malcolm Box
On 19 August 2011 03:37, Andre Terra wrote: > Until you install some third party app that accesses > User.objects.all() and then suddenly nothing works as it's supposed > to. > > I hear this a lot that "things will break" if you subclass User. However, I haven't seen anyone share a concrete examp

unique_together constraint on a ForeignKey field in MySQL

2011-08-20 Thread Alex
I asked this originally on StackOverflow, but I realized you guys might have more experience with these gnarly edge cases: http://stackoverflow.com/questions/7131639/how-can-i-have-a-unique-together-constraint-involving-a-foreignkey-field-in-mysql Thanks for your consideration, -- Alex Ogier --

login auth issue - beginner

2011-08-20 Thread Phil
Hi, I am new to Django and am trying to use the built in auth features for the first time. I have been following the steps on the djangobook website here... http://www.djangobook.com/en/1.0/chapter12/ However I am getting the following error on my login page. Anyone know where I am going w

Model Inheritance and methods

2011-08-20 Thread CrabbyPete
I have the following models: class Deal(models.Model): """ Deal is a deal for Interest. There should only be one deal for each Interest pair """ interest = models.ForeignKey( Interest ) max_sell = models.IntegerField(default = 1) def terms(self): retur

Re: login auth issue - beginner

2011-08-20 Thread Phang Mulianto
hi.. your request is GET, and you try get the query data with POST . this the errror cause 16. username = request.POST['username'] Exception Value: "Key 'username' not found in " check your login form to use POST.. HTH, Mulianto On Sat, Aug 20, 2011 at 9:59 PM, Phil wrote: > Hi, > > I am

Re: login auth issue - beginner

2011-08-20 Thread Scott Danzig
It reports you're missing the key "username" from your POST... so the first thing I'd check for is ... do you have a line like this in your login template page?: -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the

Re: Missing datepicker in Django 1.3 admin

2011-08-20 Thread George
Thanks Kenneth I commented that out .. I'm still not seeing the datepicker icons in admin! On Aug 20, 2:51 pm, kenneth gonsalves wrote: > On Sat, 2011-08-20 at 01:53 -0700, George wrote: > > ADMIN_MEDIA_PREFIX = '/static/admin/' > > this does not exist in 1.3 - please read the docs on > django.c

View-Voodoo: Calling functions in a view does weird things

2011-08-20 Thread Axel Bock
Hi all, I am new to this list (hello btw :), a beginner of Django, and I have discovered a _very_ strange thing. Basicall I have a view handling a file upload (see shortened code below). Depending on a select field a function gets called handling the stuff, and returning. (rtr = render_to_response

Re: login auth issue - beginner

2011-08-20 Thread Phil
Thanks for reply. Yes my form is using POST. Here is my template file... {% block content %} {% if form.errors %} Sorry, that's not a valid username or password {% endif %} User name: Password: {% endblock %} -- You received this message because yo

Re: login auth issue - beginner

2011-08-20 Thread dm03514
Hi, Your traceback is from a 'login' function buy you're posting to base '/' Could that be an issue?? The traceback clearly explains what the problem is, no data is arriving at your login function -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: View-Voodoo: Calling functions in a view does weird things

2011-08-20 Thread dm03514
I think you're 'call_my_other_function' is returning to the 'myview' function -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to djan

Django Admin - relationship between different models

2011-08-20 Thread Petey
Hi, I have two models: - Publisher - my main model - Images - additional model for images http://pastebin.com/VUNCzDye In images model I have a link generator which displays absolute path for uploaded images. I use inline to add images for messages. I want to display admin_tumbnail function as

Re: Best approach to handling different types of Users

2011-08-20 Thread Cameron
> I hear this a lot that "things will break" if you subclass User. However, I > haven't seen anyone share a concrete example of *how* things go wrong. > > Anyone got a good example to scare the children with? > > Malcolm Yeh, I've heard this quite a bit as well. An example of a scenario this real

Re: View-Voodoo: Calling functions in a view does weird things

2011-08-20 Thread Yaşar Arabacı
Do it like this: def myview(request): if request.method =="POST": return call_my_other_func(request) else: rtr("index.html") def call_my_other_func(request): # do something with the data messages.info(request, "hello world") return rtr("index.html", context_instance=RequestC

Re: View-Voodoo: Calling functions in a view does weird things

2011-08-20 Thread Axel Bock
I am _*SO*_ stupid. and equally embarrassed right now. oh boy. thank you so much. Am 20.08.2011 um 18:07 schrieb Yaşar Arabacı: > Do it like this: > > def myview(request): >if request.method =="POST": >return call_my_other_func(request) >else: rtr("index.html") > > def ca

Re: Missing datepicker in Django 1.3 admin

2011-08-20 Thread Yaşar Arabacı
If that is what kenneth says, I might suggest creating a new project and see default settings for static files. it might help you figure out what is going on. 2011/8/20 George > Thanks Kenneth > > I commented that out .. I'm still not seeing the datepicker icons in > admin! > > On Aug 20, 2:51 p

Re: Specific models without a database table

2011-08-20 Thread sedl...@gmail.com
Hi, you may use custom model manager (responsible for retrieving objects from DB) and custom save method (which would not call Model.save), together with managed=True. You may still face some issues, however I think this should be possible. Cheers, Filip On 20 srp, 12:51, Malcolm Box wrote: > O

Re: Missing datepicker in Django 1.3 admin

2011-08-20 Thread George
Yep, that's what I did .. ADMIN_MEDIA_PREFIX = '/static/admin/' ... was there by default. It does't show even with a new Project! On Aug 20, 9:39 pm, Yaşar Arabacı wrote: > If that is what kenneth says, I might suggest creating a new project and see > default settings for static files. it might

Re: Missing datepicker in Django 1.3 admin

2011-08-20 Thread Yaşar Arabacı
Did you copy admin static files to your static path? They are stored in {DJANGO_ROOT_DIR}/contrib/admin/media . You need to copy all of them to {YOUR_STATIC_ROOT}/admin 2011/8/20 George > Yep, that's what I did .. ADMIN_MEDIA_PREFIX = '/static/admin/' ... > was there by default. It does't show

Suspicious mail from django-users mail group

2011-08-20 Thread Yaşar Arabacı
Hi, I got a mail, which I suspect that might be some kind of personal information stealing thingy. It askes me enable images or click some links. Does anyone else got similiar mails? I am attaching original mail. I tried to locate the sender, but, couldn't find the exact location. -- You receive

Re: Random File Path

2011-08-20 Thread Ulisses Dias
Hey Shawn, Thanks, it is working like charm. Best regards, Ulisses Dias 2011/8/20 Shawn Milochik > The reason it's generating the same one every time is that the code as > written executes when Django starts and that name is kept until you restart > your Django process. > > You can use

Port of Django Template Language to PHP

2011-08-20 Thread Rune Kaagaard
Dear Django Users Those of you moonlighting in PHP, might be interested in a pure PHP port of the Django Template Language that I've just released. It's called Chano and has doc pages at http://chano.readthedocs.org and a github account at https://github.com/runekaagaard/php-chano . Thanks for yo

Re: Port of Django Template Language to PHP

2011-08-20 Thread Yaşar Arabacı
Wow, this is definitely going into my blog :) Keep up the good work! 2011/8/20 Rune Kaagaard > Dear Django Users > > Those of you moonlighting in PHP, might be interested in a pure PHP > port of the Django Template Language that I've just released. It's > called Chano and has doc pages at http:/

I need help with reverse and url patterns

2011-08-20 Thread Joshua Russo
I setup this patter in url.py url(r'^events/(?P\d{4})/(?P\d{2})/$', events, name="eventsMonth") in my template I have this tag {% url eventsMonth year=month.prev.year month=month.prev.month %} but I keep getting Caught NoReverseMatch while rendering: Reverse for 'eventsMonth' wit

Re: I need help with reverse and url patterns

2011-08-20 Thread Joshua Russo
Never mind I got it. I changed my url patter to url(r'^events/(?P\d{4})/(?P\d{1,2})/$', events, name="eventsMonth") I'm still not very sharp on my regex skills. I realized that {2} required a 2 digit number -- You received this message because you are subscribed to the Google Groups "Dj

Re: I need help with reverse and url patterns

2011-08-20 Thread Daniel Roseman
On Saturday, 20 August 2011 20:20:12 UTC+1, Joshua Russo wrote: > > I setup this patter in url.py > > url(r'^events/(?P\d{4})/(?P\d{2})/$', events, > name="eventsMonth") > > in my template I have this tag > > {% url eventsMonth year=month.prev.year month=month.prev.month %} > > but I keep

Re: Port of Django Template Language to PHP

2011-08-20 Thread Masklinn
On 2011-08-20, at 20:30 , Rune Kaagaard wrote: > Dear Django Users > > Those of you moonlighting in PHP, might be interested in a pure PHP > port of the Django Template Language that I've just released. It's > called Chano and has doc pages at http://chano.readthedocs.org and a > github account at

extending the User profile - which way to go?

2011-08-20 Thread Axel Bock
Hi again, I will need to add some properties to a user in the future. Now I found two ways of doing it. First, the Django-way (as described in the Django docs). Then I found some other posts from other people, all doing an inheritance of the original User-class and using this one. That seems ra

Re: extending the User profile - which way to go?

2011-08-20 Thread Subhranath Chunder
My suggestion, do it the Django way. In any case, even if you use the inheritance model, the additional data would be stored in a separate database table, and the data belonging to the super-class would be stored in the main user's database table. On Sun, Aug 21, 2011 at 1:26 AM, Axel Bock wrote:

Re: What I am missing is this Django "logout"?

2011-08-20 Thread Subhranath Chunder
> Welcome {{ request.user.username }}. Logout This part of your code is generating a logout URL like this in your template: "/logout/directorio" Now, your urls.py has the pattern: url(r'^logout/(?P.*)/$', 'django.contrib.auth.views.logout', name='auth_logout_next'), This makes, the variable 'next

Admin TabularInline collapsed fieldset missing expand button

2011-08-20 Thread Lee
I need to display TabularInlines for multiple related tables and have them all initially collapsed. I overrided admin/edit_line/tabular.html and added the "collapsed" class to the element. This collapses the fieldset alright, but there is no button/control to expand it. I've googled for hours and

Django beginner question

2011-08-20 Thread Christian Ramsey
Hi I am a Django beginner and I am just getting into creating apps with it, my goal was to create a simple order application for practice. The app will be somewhat like this: 1.A user will login or create an account. 2.A user will order from a list of items and depending on the item it may have si

Re: Django beginner question

2011-08-20 Thread Shawn Milochik
Christian, We understand that you're a beginner, and there are a lot of people that are willing to help people new to Django on this list. However, you've basically laid out an assignment here and asked how to go about it. That comes across as asking others to do your work for you. You won't

Re: Django beginner question

2011-08-20 Thread Christian Ramsey
Thank you Shawn, Thank you for your response, I was trying to explain it in detail, I believe I get the greater whole of the project which I've specified by explaining the project but the parts I don't I've asked a question about. Maybe my approach is incorrect, I did not mean that my informat

Re: Django beginner question

2011-08-20 Thread Gelonida N
On 08/21/2011 12:56 AM, Christian Ramsey wrote: > Hi I am a Django beginner and I am just getting into creating apps > with it, my goal was to create a simple > order application for practice. The app will be somewhat like this: > > 1.A user will login or create an account. > 2.A user will order f

Re: Django beginner question

2011-08-20 Thread Christian Ramsey
Hi and thank you so much, this provided a ton of clarity, especially the modelling of the order table with a foreign key to a user, I was locked on thinking the user table needed to somehow have the orders within it. But I see I needed to step back. I've already started to implement all of this a

Re: Missing datepicker in Django 1.3 admin

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 03:40 -0700, George wrote: > I commented that out .. I'm still not seeing the datepicker icons in > admin! did you do python manage.py collectstatic? -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users"

Re: Missing datepicker in Django 1.3 admin

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 10:40 -0700, George wrote: > Yep, that's what I did .. ADMIN_MEDIA_PREFIX = '/static/admin/' ... > was there by default. It does't show even with a new Project! ADMIN_MEDIA_PREFIX is not there in 1.3 -- regards Kenneth Gonsalves -- You received this message because you a

Re: Missing datepicker in Django 1.3 admin

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 20:49 +0300, Yaşar Arabacı wrote: > Did you copy admin static files to your static path? They are stored > in {DJANGO_ROOT_DIR}/contrib/admin/media . You need to copy all of > them to {YOUR_STATIC_ROOT}/admin > > or do collectstatic -- regards Kenneth Gonsalves -- You re

Re: Port of Django Template Language to PHP

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 21:28 +0200, Masklinn wrote: > > Those of you moonlighting in PHP, might be interested in a pure PHP > > port of the Django Template Language that I've just released. It's > > called Chano and has doc pages at http://chano.readthedocs.org and a > > github account at https://gi

Re: Django beginner question

2011-08-20 Thread kenneth gonsalves
On Sat, 2011-08-20 at 17:03 -0700, Christian Ramsey wrote: > Thank you for your response, I was trying to explain it in detail, I > believe I get the greater whole of the project which I've specified by > explaining the project but the parts I don't I've asked a question > about. Maybe my approach

DB based translations?

2011-08-20 Thread Joshua Russo
Ok, I've been looking into the different database based translation solutions out there and I can't find what I really had in mind. I need to have non-technical people easily update the translations. So I wanted a solution where I could create an interface to ease the process. One problem is th

why i cannot load css from django lib?

2011-08-20 Thread smith jack
face a strange problem, now i am using django.contrib.admin module with its default page, but i cannot load css code now, so the web page is ugly what's wrong? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: why i cannot load css from django lib?

2011-08-20 Thread zhijun wu
I've encountered such a problem, so maybe I can help. I solved that like this: First, make sure you have the right permission to the folder 'media'. Then, #setting.py MEDIA_ROOT='' #Use absolute path ADMIN_MEDIA_PAREFIX='' #'/media/', focus on the 2 slashs #httpd.conf Alias /med