Hallöchen!
Salvatore Iovene writes:
> On Friday, November 4, 2011 5:31:46 PM UTC+2, Salvatore Iovene wrote:
>>
>> if hasattr(request, 'session'):
>> request.session['django_language'] = lang
>> else:
>> response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lan
Did you try "python django-admin.py startproject mysite"?
Is Python on the path?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-users/-/AkW0jKgnabsJ.
To post to t
I followed the instructions to activate the admindocs (https://
docs.djangoproject.com/en/dev/ref/contrib/admin/admindocs/#overview)
and now I see a link Documentation, next to Welcome, myname in the
admin, and that goes to a nice page at admin/doc. But none of the
hyperlinks go to working pages (T
Is your url pointing to (http://127.0.0.1:8080/admin/) ?
--
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
django-users+unsubscr...
Hey Cal,
Yeah the documentation is a bit lacking. It's kinda difficult to put the
pieces together. But once you learn how to use them -- they're pretty
awesome and powerful. It does seem a little difficult to deviate away from
the box at first, but once you understand how they work -- it's pretty
No worries. Wow, I've got some interesting results. I am pretty sure the
ModelForm class has a bug in it that it is not looking at the secondary
database with the using() method. It is a bug in the foreign reference
fields only, though.
I set up tables in my default database, and in an extra datab
Hey all,
I took a look through some of the documentation for class based views - and
my first reaction was "Eww.".
Imho, it looks much like the "admin section" customization stuff, and would
quickly become a pain to work with if you deviate away from 'the box'.
This comes from me having absolute
Hi
I tried to follow the steps included here
http://www.jetbrains.com/pycharm/quickstart/django_guide.html
but i stopped at running the "Site Administration page" when i run the
application it produces
Congratulations It Worked ! Page actually it's the start page it
appears when i tested the serve
I don't mean to be spamming you like this, just thought you might be
interested in this result:
So I created the same tables (n_test_staff and n_nics_groups) in the
default gibbs database. I removed the using part in the form statement
(form = StaffForm(instance = Staff.objects.using('gold').get(u
I guess the ModelForm must require the Meta class, sorry about that. This
is really strange behavior, but it looks like everything you've got is
correct.
Running syncdb will only create new databases/tables, it does not ALTER any
existing tables or modify any of the data. However, if you have othe
OK, the subject doesn't *quite* describe what I need to do, but
almost. Basically, I'd like to have
1) one "session" that expires after logout or browser close, and
applies to logged-in sessions (like the default Django session
framework using the "SESSION_EXPIRE_AT_BROWSER_CLOSE" setting)
2) on
I found this patch for the raw function (https://
code.djangoproject.com/attachment/ticket/13805/manager.patch), because
according to this ticket (https://code.djangoproject.com/ticket/
13805), .raw does not work in a multi db env. So this is what I have:
in django/db/models/manager.py, I have cre
One thought I have is that the using() is messing things up. Would it
be possible for you to create a second non-default db, throw these two
tables in there and then try the same thing? If that works for you,
then I must have a ghost sitting in my system! :-|
On Nov 4, 2:28 pm, Furbee wrote:
> Th
Yep, n_nics_groups and n_test_staff exist in the same 'gold'
database.
So when I tried:
form = StaffForm(instance = Staff.objects.using('gold').raw("SELECT
s.*, g.n_group_name FROM n_test_staff s LEFT JOIN n_nics_groups g
ON(g.n_group_number = s.nics_group) WHERE s.username = 'tsamuel')"))
I g
On 4 November 2011 07:02, Thomas Guettler wrote:
> Am 03.11.2011 18:42, schrieb Tom Evans:
> > On Thu, Nov 3, 2011 at 2:22 PM, Thomas Guettler wrote:
> >> Hi,
> >>
> >> I try to reduce the number of db-queries in my app.
> >>
> >> There is a model which changes almost never. It is like a "type o
That is very strange... I recreated this on my development system and it
worked fine. I looked for Django bugs, but haven't found any related to
this issue. To be clear, the table n_nics_groups definitely exists in the
same database as n_test_staff, right? It does in mine because I used python
mana
On Friday, November 4, 2011 5:31:46 PM UTC+2, Salvatore Iovene wrote:
>
> if hasattr(request, 'session'):
> request.session['django_language'] = lang
> else:
> response.set_cookie(settings.LANGUAGE_COOKIE_NAME, lang)
>
I have solved my problem by setting the
I go into the folder that I would like to store my project and
successfully start up python 2.7 then I checked to see if django was
installed and it shows that I have 1.3.1 installed. So i run the
command "django-admin.py startproject mysite" it says invalid syntax.
I am using admin command prompt
Hi all,
Appreciate some help trying to build a queryset. Im hoping I can make
this in django, without having to crack open raw sql... Here is my
setup:
class Container(models.Model):
permissions = generic.GenericRelation(Permission)
class Item(models.Model):
container = models.ForeignKey(Con
The error that I'm getting is on the second form instantiation, that
is on the line:
form = StaffForm(instance = Staff.objects.using('gold').get(username =
current_staff)
where current_staff='tsamuel' for instance
This is the traceback of the error that I get when I do a print form
right after ge
Great! I will test your templates. I'm new to Django and I have
searched a lot for this. The templates look awesome.
Best Regards,
On Fri, Nov 4, 2011 at 4:11 AM, Ezequiel Bertti wrote:
> Hi,
> I just release a project on github with bootstrap from twitter v1.4 form
> django-registration.
> Is
hello all.
due to either lack of knowledge or confusion, I am unable to achieve a
relationship using 3 models.
I have the models as below:
Hi Ganesh,
Here are some examples:
Filter: SELECT * FROM device WHERE locked = true - returns a QuerySet
which can be evaluated as a list of Device objects
Get: SELECT * FROM device WHERE id = (value of id variable) LIMIT 1 -
returns a single Device object
All: SELECT * FROM schedule - returns a
PS: I have also tried the @vary_on_header('Accept-Language') decorator, but
unfortunately that didn't help either.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-
Hi,
I've got a Django website that's multi-lingual, and I'd like to use
memcaching on it. While everything works fine with caching disabled, I have
observed the following when caching is enabled:
1) Open any page on the website
2) Click on link (the image of a little flat) to change language
3)
Oh no, that would not be a good thing to share! :-) That's a bummer that
the upgrade broke things.
So, the error is being raised on this line?
staff_form = StaffForm(request.POST, instance=staffinstance).using('gold')
Furbee
On Fri, Nov 4, 2011 at 8:02 AM, Tabitha Samuel wrote:
> So this is how
So this is how I'm creating the staff form:
def staff_info(request, *args, **kws):
class StaffForm(forms.ModelForm):
class Meta:
model= Staff
if request.method == 'POST' and request.POST['event'] ==
'choosestaff':
current_staff =
Good Morning Tabitha.
Actually, do you have a model for StaffForm? That is the object being
instantiated and then causing the error. If there is no nics group
reference field in the StaffForm object, it may raise this error. Also, do
you have this running in a view/template? Do you have a real pag
Just remove the line with "python-format" from your translation since it
isn't a format string after all.
mjl
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/d
Here is staff/models.py
from django.db import models
class NICSGroupType(models.Model):
n_group_number = models.IntegerField(primary_key = True)
n_group_name = models.CharField(max_length = 512)
def __str__(self):
return self.n_group_name
class Meta:
db_table = "n_
Hello,
I am using Django 1.2.5.
* template:
{% trans 'If you cancel queued construction, you will get 75% of resources
back' %}
* django-admin.py makemessages -l sk produces:
#: templates/core/buildings/construction.html:65
#, python-format
msgid "If you cancel queued construction, you w
Hello, Rodrigo
>From looking at the ModelAdmin source code[1], I think all you need to do
is reimplement the queryset() method in your subclass on admin.py.
Make sure you return a filtered queryset based on request.user. I never use
the admin, so I'm not so sure about how the user will be accessi
Great answer. Thanks a lot!
On Thu, Nov 3, 2011 at 8:08 AM, Andre Terra wrote:
> All you have to do is create a MyFormMixin class and add all those methods
> you want to override. Usually you will want to call super() on the class so
> that the normal behavior is also present in your final class
On Fri, Nov 4, 2011 at 4:11 AM, kz26 wrote:
> I'm currently working on a site (Django 1.3) where all users will be
> authenticated through Facebook. To do this, I've written a simple
> custom authentication backend:
>
>
> # custom Facebook authentication backend
> from django.contrib.auth.models i
Hi,
I'm a new to Django. I know mysql queries.
I cant understand django queries, Basically My understanding
complicated to the django queries. please guide me.
Device.objects.filter(device_id = device_id)[0]
Device->table
device-->column
Device.objects.filter(locked = True)
Device.objec
Hi,
I just release a project on github with bootstrap from twitter v1.4 form
django-registration.
Is a simple use of bootstrap just using template for render with css. No
python code need.
Its is perfect sample for designers to know how to use bootstrap without
asking to programmer to do some fi
I'm currently working on a site (Django 1.3) where all users will be
authenticated through Facebook. To do this, I've written a simple
custom authentication backend:
# custom Facebook authentication backend
from django.contrib.auth.models import User
from site_main.models import *
from fb import
Am 03.11.2011 18:42, schrieb Tom Evans:
> On Thu, Nov 3, 2011 at 2:22 PM, Thomas Guettler wrote:
>> Hi,
>>
>> I try to reduce the number of db-queries in my app.
>>
>> There is a model which changes almost never. It is like a "type of ticket"
>> in a trouble ticket system.
>>
>> On one page there
38 matches
Mail list logo