Hi
I am looking best model for the following tables:
-
---Table : groups_t
-
CREATE TABLE groups_t
(
id BIGINT NOT NULL,
code VARCHAR NOT NULL,
version BIGINT NOT NULL
);
-
---Table : groups_i18n_t
-
CREATE TABLE groups_i18n_t
(
group_id BIGINT NOT NULL,
This is how Your FreeTDS config should look like:
;--
[mssql2008]
host = 10.0.0.61
port = 1433
tds version = 7.0
;--
Here is the code with pymssql:
#--
import pymssql
conn = pymssql.connect(host='mssql2008', user='erp',
On Monday 31 January 2011 18:38:20 Tim Sawyer wrote:
> > You can't stop the user from closing the browser, or switching to another
> > tab, with JS. And you shouldn't try to stop them navigating away - this
> > sort of thing is only likely to annoy them intensely.
>
> Taking this to the extreme -
if you have circular imports, you can try to put the name of the model. This at
least works for Foreign Keys
http://docs.djangoproject.com/en/dev/ref/models/fields/#foreignkey
On 01.02.2011, at 00:34, Jeffrey Stiles wrote:
> I would really like to make a form instance a model attribute so
> Hi,
> I have expirience with pymssql and mssql server, and that works fine
> (utf-8).
> Did You try utf-8?
I think that I have tried pymssql using charsets including utf-8,
utf-16, iso-.
But I have no luck there. I can not get unicode datas. Also, I have
read that pymssql does not support
On Monday 31 January 2011 18:21:40 Ian wrote:
> On Jan 31, 3:29 am, arief nur andono wrote:
> > oh please...
> >
> > i need only to query the table, have no access to modified the table
> >
> > why there is no way query the database and then make the output as
> >
Karen,
In your use case, large text fields shouldn't be a problem. I would install
the django-toolbar and use the reporting to determine if a particular query or
template is causing the slowdown.
Are you displaying the large text field in the admin list view? If you are and
the view
I would really like to make a form instance a model attribute so that
i have access to the form from the template through an object that I
have handy.
When I try to import import any form into models.py, I get an
ImportError on each of the import statements in the forms.py file
which reference a
I'm not really experienced, but my approach would be to reference files in
some open format in the DB and use python to edit open/edit/save them.
Sounds leaner, cleaner, faster, imho.
Sincerely,
André Terra
On Mon, Jan 31, 2011 at 23:22, Karen McNeil wrote:
> I've
This ticket
http://code.djangoproject.com/ticket/8426
says that, as of six months ago, model field help_text rendered in
forms by {{form.as_p}} gets wrapped in a style-able span. But in
Django 1.2.4, {{form.as_p}} still generates unspanned help_text. It
also doesn't show up spanned in the docs:
I've created an application to manage texts, storing the content in a
TextField, along with metadata in other fields. Now that I've
completed the model and started actually adding the texts, the admin
is getting vey slow. The app is just for the use of me and my
team, so the slowness is not a
Hi,
I'm using Django 1.3 and the included staticfiles app to handle my static
media, and Nginx as the webserver.
It's currently working, but I have a feeling my paths are more complex than
they need to be. I was wondering if anybody could perhaps point out a better
way to config this, or any
Djangoists:
Given a model Tree with many Leaves, I want to write this:
t = Tree(data=42)
t.leaves.add(leafy_data=43)
t.leaves.add(leafy_data=44)
t.save()
I want the save() to create the Tree, then create the leaves. Other
notations would do fine.
Batching like this might permit the ORM
Thanks to both you and Tom.
I suspected that I was going to have to use javascript in order to do this.
I did find Dojo and Dajax that will hopefully lead me in the direction I
need as well.
Bjorn
On Mon, Jan 31, 2011 at 10:39, Joel Goldstick wrote:
>
>
> On Mon, Jan
Following on the smashing success of PostgreSQL Conference West,
PostgreSQL Conference West, The PostgreSQL Conference for Developers,
End Users and Decision Makers, is being held at the Hotel Pennsylvania,
in New York City from March 22nd through 25th 2011. Please
join us in continuing to make
The easiest way would be to get a list of all closed work items, ordered
by user:
context['work'] = Work.objects.filter(whatever).order_by('user')
{% for work_item in work %}
{% ifchanged %}Display {{work_item.user}}{% endifchanged %}
Display {{ work_item }}
{% endfor %}
--
**some corrections from my previous post
By "model" I mean "view" and in #1, index.html gets changed to
poll_list.html
Sorry!
--
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.
Hi group,
I've noticed a few things in the tutorial documentation for 1.2 on page *
http://docs.djangoproject.com/en/1.2/intro/tutorial04/* under the section
"Use generic views: Less code is better":
1. It instructs the user to rename both the *detail.html* and *list.html*pages
to
Ok, right after my last post the content seems to have been corrected!
Nice! Please disregard my previous post. Thank you for the documentation
update!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
I accidentally previously sent this post just to Rob - sorry about that Rob!
I know that this is a couple months old, but the documentation does seem to
be incorrect. I am using 1.2.4, and am on the correct tutorial page
(http://docs.djangoproject.com/en/1.2/intro/tutorial04/), and the import
The behavior seems to have reverted after a couple days. I suspect
that the connection to mysql is being renegotiated, during which it
loses the autocommit setting.
This seems like it should be a setting in django, so if it
renegotiates it will set autocommit again.
Another solution might be to
On Jan 31, 2011, at 9:15 AM, Shawn Milochik wrote:
>
> I was using my iPhone at the time. I probably should have checked it on a
> desktop browser before replying to the thread. Sorry 'bout that.
>
On the iPhone, use two fingers to scroll to the cut-off text in the code box.
--
Eric
I had my settings.py exactly like you suggested.
I realized that the template tag loadflatpages is available in the
Trunk, and not available in 1.2.3 or 1.2.4
I was confused because the documentation for 1.2.3 talks about the
load flatpages tag (and there is a disclaimer there that says
Hello,
I have a model:
class Work(models.Model):
...
user = models.ForeignKey(
User
)
closed = models.DateTimeField(
blank=True
)
...
Now, I want to print all users and for each user all Works closed between
a specific date. If I don't need the
On Mon, Jan 31, 2011 at 12:06 PM, Tom Evans wrote:
> On Mon, Jan 31, 2011 at 4:51 PM, Bjorn Meyer
> wrote:
> > Hi all, I am hoping that someone might be able to point me in the right
> > direction for the following problem. I have been searching
I think I've read most of the documentation on Model Forms, but I
haven't seen much on how to customize them, other than changing the
order in which fields are displayed, or not displaying some fields at
all. The one ModelForm which I've done so far does not look very good
as it is automatically
On Jan 31, 2011, at 12:12 PM, Jacob Kaplan-Moss wrote:
> On Mon, Jan 31, 2011 at 2:40 AM, Shawn Milochik wrote:
>> I'm seeing the code samples being cut off in the docs as well.
>> http://docs.djangoproject.com/en/dev/topics/signals/
>> See sample under:
>> Preventing
On Mon, Jan 31, 2011 at 2:40 AM, Shawn Milochik wrote:
> I'm seeing the code samples being cut off in the docs as well.
> http://docs.djangoproject.com/en/dev/topics/signals/
> See sample under:
> Preventing duplicate signals
It's working for me (Chrome/Safari OSX), so it's
On Mon, Jan 31, 2011 at 4:51 PM, Bjorn Meyer wrote:
> Hi all, I am hoping that someone might be able to point me in the right
> direction for the following problem. I have been searching for a few days now
> and haven't been able to find a way to accomplish this. I have
Its definitely a django thing. It does it on explorer as well. Somehow
the session information is lost. Maybe because it goes out to facebook
to get the log in. I used firebug and I can see the facebook cookies
as well as those for my site.
On Jan 31, 9:33 am, Aljoša Mohorović
Hi all, I am hoping that someone might be able to point me in the right
direction for the following problem. I have been searching for a few days now
and haven't been able to find a way to accomplish this. I have found some
solutions that are close, but only work on editing an entry, not on
> You can't stop the user from closing the browser, or switching to another
> tab, with JS. And you shouldn't try to stop them navigating away - this
> sort of thing is only likely to annoy them intensely.
Taking this to the extreme - what do you want to happen if a person using
your site has a
On Jan 31, 3:29 am, arief nur andono wrote:
> oh please...
>
> i need only to query the table, have no access to modified the table
>
> why there is no way query the database and then make the output as object??
You don't need to modify the table. That was just a
On Mon, Jan 31, 2011 at 4:11 PM, Shawn Milochik wrote:
> Could have been the browser I was using. I'm not seeing the issue there now
> on Chrome.
>
> Shawn
>
I don't think they've been updated yet. I'm using this page:
On Jan 31, 2011, at 11:05 AM, creecode wrote:
> Hello Shawn,
>
> I'm not seeing <
...
Could have been the browser I was using. I'm not seeing the issue there now on
Chrome.
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
Hello Shawn,
On Jan 31, 12:40 am, Shawn Milochik wrote:
> I'm seeing the code samples being cut off in the docs as well.
>
> http://docs.djangoproject.com/en/dev/topics/signals/
>
> See sample under:
> Preventing duplicate signals
I'm not seeing <
thnkzit helped...
--
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...@googlegroups.com.
For more
On Monday, January 31, 2011 3:06:29 PM UTC, Ivan Uemlianin wrote:
>
> Dear Tom
>
> Thanks for your comment.
>
> My use case is a "presence"-type system. When a user logs out their
> status change is sent out to all other logged-in users (using comet).
> If they just close the browser this
On Monday, January 31, 2011 2:45:55 PM UTC, cuteangel wrote:
>
>
> its my first project with django..i already tried the connection with
> sqlite.but now m using django's connection with mysql n m getting
> following error...
>
> D:\project\wogma>manage.py syncdb
> Traceback (most recent call
Dear Tom
Thanks for your comment.
My use case is a "presence"-type system. When a user logs out their
status change is sent out to all other logged-in users (using comet).
If they just close the browser this doesn't happen. I'm mulling over
two possible solutions:
(a) some bit of javascript
On Mon, Jan 31, 2011 at 2:45 PM, cuteangel wrote:
>
> its my first project with django..i already tried the connection with
> sqlite.but now m using django's connection with mysql n m getting
> following error...
>
>
> _mysql_exceptions.OperationalError: (1049,
its my first project with django..i already tried the connection with
sqlite.but now m using django's connection with mysql n m getting
following error...
D:\project\wogma>manage.py syncdb
Traceback (most recent call last):
File "D:\project\wogma\manage.py", line 11, in
On Mon, Jan 31, 2011 at 1:15 PM, Stefan wrote:
> Hi,
>
> Currently we're having some issues with a user of our product who uses
> a proxy on their internal network.
>
> According to their system administrator the proxy is open to port 80
> and 443, and doesn't do anything
On Mon, Jan 31, 2011 at 2:21 PM, Ivan Uemlianin wrote:
> Dear All
>
> Is the setting SESSION_EXPIRE_AT_BROWSER_CLOSE mis-named? As far as I
> can tell the setting doesn't influence the session expiry at all
> (e.g., what happens to the django_session table on the server). What
I am trying to create a dynamic filtered drop down choice fields,i gone
through below blog but it confusing,can any one suggest easy way to do this
in django.
http://www.nerdydork.com/dynamic-filtered-drop-down-choice-fields-with-django.html
Thanks in advance :)
--
You received this message
i AM trying to create a from which is linked with foriegnkey.
Model.py
enter code here
model.py
class CreateD(models.Model):
id=models.IntegerField(primary_key=True)
db = models.CharField(max_length=50, blank=True)
iss = models.CharField(max_length=100, blank=True)
On Mon, Jan 31, 2011 at 2:59 PM, CrabbyPete wrote:
> I am loosing the django session.
try setting the P3P on response:
response['P3P:CP'] = "IDC DSP COR ADM DEVi TAIi PSA PSD IVAi IVDi CONi
HIS OUR IND CNT"
it probably wont help but it fixes this issue with explorer so it
Dear All
Is the setting SESSION_EXPIRE_AT_BROWSER_CLOSE mis-named? As far as I
can tell the setting doesn't influence the session expiry at all
(e.g., what happens to the django_session table on the server). What
this setting seems to affect is the expiry of the *cookie* in the
browser.
I'm
I am loosing the django session.
On Jan 31, 8:44 am, "christian.posta"
wrote:
> Which session are you losing?
> The django authenticated session, or the facebook session?
>
> On Jan 29, 10:30 pm, CrabbyPete wrote:
>
>
>
>
>
>
>
> > I managed to
Which session are you losing?
The django authenticated session, or the facebook session?
On Jan 29, 10:30 pm, CrabbyPete wrote:
> I managed to log into facebook using the graph api, I store the FB id
> and tie it to a User, like this
>
> class FacebookUser(models.Model):
>
Hi,
I have expirience with pymssql and mssql server, and that works fine
(utf-8).
FreeTDS docs says:
"FreeTDS is not fully compatible with multi-byte character sets such as
UCS-2. You must use an ASCII-extension charset (e.g., UTF-8,
Hi,
Currently we're having some issues with a user of our product who uses
a proxy on their internal network.
According to their system administrator the proxy is open to port 80
and 443, and doesn't do anything with cookies and such, only blocks
out some sites.
The problem: when user X logs in
Hello.
I have FreeTDS, pyodbc-2.1.8, python-2.6, ubuntu-10.4.
I also have MSSQL2008 database server on Windows7.
My question is: Can I get unicode data from nvarchar column on
Mssql2008 database using pyodbc?
To do this, what does other library or configuration need me?
I use FreeTDS driver to
On 2011-01-31, at 06:36 , Antônio Ribeiro wrote:
> Hello guys!
>
> I've been wondering about this all night and i've already made a search on
> google and everything, but I didn't get a straight answer.
>
> Is there a way to make a redirect and send data from my current request to
> the other
Maybe this will help you:
http://docs.djangoproject.com/en/dev/topics/http/shortcuts/
Op 31-jan-2011, om 06:36 heeft Antônio Ribeiro het volgende geschreven:
> Hello guys!
>
> I've been wondering about this all night and i've already made a search on
> google and everything, but I didn't get
Hi,
I really like Django's technical error page (the one you get when a view
raises an uncaught exception and DEBUG is true). However, when an AJAX
request causes an error, the technical error page reaches the AJAX error
handler, instead of being displayed in the browser.
To solve this problem,
Aha !!
Is there a notice of this somewhere obvious on the website that I
missed?
Thanks again!
--
Ben
On Jan 31, 11:38 am, Łukasz Rekucki wrote:
> On 31 January 2011 12:17, Ben Dembroski wrote:
>
> > Hi all,
>
> > I was having the same trouble
Hello guys!
I've been wondering about this all night and i've already made a search on
google and everything, but I didn't get a straight answer.
Is there a way to make a redirect and send data from my current request to
the other page.
I mean, I could use the render_to_response to call another
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
On 31 January 2011 12:17, Ben Dembroski wrote:
> Hi all,
>
> I was having the same trouble (using version 1.2). I double checked
> that I was looking at the correct documentation:
>
> http://docs.djangoproject.com/en/1.2/howto/static-files/
Django 1.2 doesn't have (never
Hi all,
I was having the same trouble (using version 1.2). I double checked
that I was looking at the correct documentation:
http://docs.djangoproject.com/en/1.2/howto/static-files/
and it does indicate that I should be truing to use
django.contrib.staticfiles .
Should I instead be using the
errr...what do you think
i read at
http://code.activestate.com/recipes/285262-create-objects-from-variable-class-names/
class Bunch(dict):
def __init__(self,**kw):
dict.__init__(self,kw)
self.__dict__ = self
fruit = Bunch(apples=1, pears=2)
print fruit.apples
print
Arief,
Just do a search and replace in your text file along the lines of,
search for,
max_digits=0, decimal_places=-127
replace,
max_digits=10, decimal_places=2
And Django should be happy.
aid
On 31 Jan 2011, at 10:29, arief nur andono wrote:
> oh please...
>
> i need only to query the
oh please...
i need only to query the table, have no access to modified the table
why there is no way query the database and then make the output as object??
2011/1/31 Ian
> On Jan 31, 12:20 am, arief nur andono
> wrote:
> > class
Hi,
Remove any carriage returns and extra spaces from your binary.xml file, like so,
http://schemas.xmlsoap.org/soap/envelope/;>http://flypp.infy.com/sms/v2010r1_0;>12345343661t1p1p2DICT
test
Seems to parse ok then.
aid
On 31 Jan 2011, at 09:18, sami nathan wrote:
> HI
>I am trying
2011/1/31 bruno desthuilliers :
> If yes, then grep is your friend:
>
> # cd /path/to/your/project
> # grep -rHne "djang\.form"
Yeah, I had done this (except with ack[1]) and 'djang.form.formsets'
appears nowhere… And yes, I had restarted the service.
Anyways, I
HI
I am trying to parse my response by the following method
elif request.method == 'POST':
reqp=request.raw_post_data
response = HttpResponse(mimetype='text/xml')
response.write(reqp)
print response
xmldoc = minidom.parse('binary.xml')
reflist =
I'm seeing the code samples being cut off in the docs as well.
http://docs.djangoproject.com/en/dev/topics/signals/
See sample under:
Preventing duplicate signals
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
On 29 jan, 17:00, Brian Craft wrote:
> Suppose the project is /var/www/django/project. Following the django
> with wsgi docs, you would add /var/www/django to the path, and
> DJANGO_SETTINGS_MODULE would be project.settings.
>
> However, in that case, the path scheme
On 30 jan, 20:02, Samuel Baldwin wrote:
> I was writing a view in Django and I accidentally tried to import from
> a module 'djang.form.formsets'. Naturally this didn't work so I fixed
> it, but I still continue to get an error like it's there. I've tried
> removing
On Jan 31, 12:20 am, arief nur andono
wrote:
> class TempJmlGangguanPyl(models.Model):
> singkatpyl = models.CharField(max_length=4, blank=True)
> singkatgrd = models.CharField(max_length=4, blank=True)
> jumlah_gangguan = models.DecimalField(null=True,
On 31 January 2011 15:55, vishy wrote:
> 1) I want to read files. Where should I put these files? I am not using a
> model to link to the files. And how to discover the path to files? I am
> working on windows, and in development environment I am using the full path
> to
72 matches
Mail list logo