On 23/08/2011 3:29pm, raj wrote:
I am editing my user model, and I want to place a foreign key to a
class in another model, that is in a different app. How would I go
about importing it?
Tree:
/project/myapp/model1.py
/project/myapp2/model2.py
can i simply just say:
from myapp2 import model2
Maybe you need to write package name before it like this. if project is
package "from project.myapp2.models import model2"
On Tue, Aug 23, 2011 at 1:29 PM, raj wrote:
> I am editing my user model, and I want to place a foreign key to a
> class in another model, that is in
I am editing my user model, and I want to place a foreign key to a
class in another model, that is in a different app. How would I go
about importing it?
Tree:
/project/myapp/model1.py
/project/myapp2/model2.py
can i simply just say:
from myapp2 import model2
or do I need to edit something in
thanks for reply ^__^
On Mon, Aug 22, 2011 at 9:50 PM, Jaspreet Sarao wrote:
> On Mon, Aug 22, 2011 at 12:11 PM, Temulen Odbayar
> wrote:
> > I'm creating a web with people registration site. And also companies
> > can register people... I think i
On 2011-08-22, at 5:59 AM, Burcu Hamamcıoğlu wrote:
> Hi all, I 've a strange issue with URLField. It does not validate
> "http://www.babacanyapi.com; and "ttp://www.crowntowers.net". When ı use
> these urls the browser does not open anything I think it troubles into an
> infinite loop.
>
> However, it seems that the redirect removes the safe_marking around my
> message! since the result I get in my browser is html-encoded!
It won't work that way, safe string alters the class not the contents of the
string [1]. The message module turns the string into JSON and stores it. Then
Mac, sqlite, Eclipse with Pydev or AquaMacs, apache
On 23 August 2011 13:06, Jani Tiainen wrote:
> Ubuntu or windows, eclipse with pydev, apache, nginx, virtualenv and
> Oracle.
>
> Stephen Jackson kirjoitti 23.8.2011 kello
> 1.07:
>
> I am new
I'm trying to automatically update audit fields "updated" and
"updated_by" when an existing record is saved through a TabularInline
subform. In my main forms (ModelAdmin) I do that with save_model():
5 class AuditAdmin(admin.ModelAdmin):
6 ordering = ['id']
7 def save_model(self,
Ubuntu or windows, eclipse with pydev, apache, nginx, virtualenv and Oracle.
Stephen Jackson kirjoitti 23.8.2011 kello 1.07:
> I am new to the world of Django. I would like to hear from other django
> developers describe their dev environment (tools, os, editors,
I'll reply to my own question. I started working with django about 4 months
ago. I have three projects that I'm working on using django.
*Editor*
I've tried Aptana.
I've tried Wing IDE and I am currently testing Pycharm.
Ubuntu
South
MySql
--
You received this message because you are
I have a model "Entry" with an "active" field, which is just a
boolean. All of the current entries were false, and I was trying to
set them all as true, and I'm running into a strange problem. Here's
an example, trying to set just one entry to inactive:
>>> from dictionary.models import Entry
On Mon, 22 Aug 2011 15:07:24 -0700 (PDT)
Stephen Jackson wrote:
> I am new to the world of Django. I would like to hear from other
> django developers describe their dev environment (tools, os, editors,
> etc.).
>
fedora, eclipse (pydev), mercurial, virtualenv,
-debian (squeeze) with a few KDE "testing" packages
-jEdit with plugins: "Buffer List", "Editor Scheme", "Text
Autocomplete"
-Eterm, nano,git, qgit
-postgresql, sqlite, nginx, apache2
I'd love to hear from people using Windows XP/VISTA/7, and Mac OS X
--
You received this message because you
uWSGI (this is an absolute MUST)
supervisord
nginx
ddt (django debug toolbar)
Komodo 6 (with modifications - see
http://www.mail-archive.com/django-users@googlegroups.com/msg123666.html )
Debian lenny or squeeze under lxc/cgroups.
winscp (for on-the-fly continuous directory sync from windows)
Instead of printing out Watchdog, you can "print request.path" to see
which two requests are triggering the middleware.
When you know which additional request is causing the problem, you can
use a decorator to filter it. Here is what I do:
---
In
Hello folks,
I am learning to set up multiple databases routing in Django.
Before I started, I had everything working properly. Then, I wrote
dbrouter.py under the site directory, basically by copying the example in the
Django document about using multiple
Ok, that makes sense.
The thing is, we've written some python plugins for Softimage to read and
write to the db that get loaded and stay in memory. When the plugins are
loaded, the django models are imported. So during the lifetime of the host
application, the python session is the same.
So I
On 2011-08-22, at 4:04 PM, Cal Leeming [Simplicity Media Ltd] wrote:
>> > - How will new versions of the product (new code and new content) be
>> > provided?
>>
>> New versions are part of our contract. We're going to provide them via a
>> tarball containing the code, the media files, a
Hello folks,
This probably has been discussed many times, but I still can't find any
solution yet. Basically, it turns out that python can load MySQLdb just
fine, but Apache can't load MySQLdb from the wsgi script.
I am using python2.7 in a virtual environment created by virtualenv. Here is
Ubuntu, VIM, mercurial, DebugToolbar(sometimes)
Sqlite3 for many projects.
On Aug 22, 6:07 pm, Stephen Jackson
wrote:
> I am new to the world of Django. I would like to hear from other django
> developers describe their dev environment (tools, os, editors, etc.).
--
Windows XP and windows 7. Notepad++. Mysql. South.
2011/8/23 Shawn Milochik :
> On 08/22/2011 06:07 PM, Stephen Jackson wrote:
>>
>> I am new to the world of Django. I would like to hear from other django
>> developers describe their dev environment (tools, os, editors, etc.).
Howdy -
Welcome. So far I like the following:
Editors: PyCharm and VIM
OS (Dev) OS X
Tools: Django Debug ToolBar, South
DB: Postgres
I am looking forward to hearing what others are using as well.
Matt
On Mon, Aug 22, 2011 at 3:07 PM, Stephen Jackson
wrote:
> I am
Thanks Shawn,
I think i satisfied with this way. It seems a suitable way for Django.
I'll use it. Thanks again,
2011/8/23 Shawn Milochik :
> On 08/22/2011 05:44 PM, ozgur yilmaz wrote:
>>
>> Ok. Thank you so much. So, formset is a suitable way to achieve this.
>> But, is it
On 08/22/2011 06:07 PM, Stephen Jackson wrote:
I am new to the world of Django. I would like to hear from other django
developers describe their dev environment (tools, os, editors, etc.).
Ubuntu, virtualenv, Komodo Edit, vim, git
Must-haves:
Development:
South,
I am new to the world of Django. I would like to hear from other django
developers describe their dev environment (tools, os, editors, etc.).
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
On 08/22/2011 05:44 PM, ozgur yilmaz wrote:
Ok. Thank you so much. So, formset is a suitable way to achieve this.
But, is it the most django-oriented way? Is there any alternative way?
Maybe using popup window to select a product, and handle the return
value of popup, then use a hiddenvalue to
Ok. Thank you so much. So, formset is a suitable way to achieve this.
But, is it the most django-oriented way? Is there any alternative way?
Maybe using popup window to select a product, and handle the return
value of popup, then use a hiddenvalue to hold the return value. And
repeat this for many
On 08/22/2011 05:33 PM, ozgur yilmaz wrote:
thanks,
but i think i have to use a suitable js for adding a new product. am i wrong?
To do it the way you want you'll have to use JavaScript, but it's easy
(especially with jQuery) to dynamically add elements to your form. No
refreshing
If you want to dynamically update your Cart without refreshing the page, yes
you will need to write some heavy ajax. But if you are okey with page
refreshing, you can temprorarily save your cart in session and use formsets
as shawn suggested.
2011/8/23 ozgur yilmaz
> thanks,
thanks,
but i think i have to use a suitable js for adding a new product. am i wrong?
2011/8/23 Shawn Milochik :
> On 08/22/2011 05:21 PM, ozgur yilmaz wrote:
>>
>> thats not the answer. you can add item to basket by clicking a button
>> "add to basket" on every item page. My
On 08/22/2011 05:21 PM, ozgur yilmaz wrote:
thats not the answer. you can add item to basket by clicking a button
"add to basket" on every item page. My purpose is to fill a single
form, with 1 or many products. Than a single button, saves a checkout
object and many product object.
Use
And also, I suggest that you create Cart model, with ManyToMany field to
your product. And you can add your checkout date there too, and other cart
related information like total price etc. Keep your cart as a session
variable until checked out, you can then save your cart. So that you could
have
thats not the answer. you can add item to basket by clicking a button
"add to basket" on every item page. My purpose is to fill a single
form, with 1 or many products. Than a single button, saves a checkout
object and many product object.
23 Ağustos 2011 00:12 tarihinde Yaşar Arabacı
I don't know the answer, but you may want to check this out:
http://www.satchmoproject.com/
2011/8/23 ozgur yilmaz
> Hi, I have a problem.
>
> I have two models:
>
> class CheckOut(models.Model):
> models.DateField()
>
> class Product(models.Model):
> checkout =
Hi, I have a problem.
I have two models:
class CheckOut(models.Model):
models.DateField()
class Product(models.Model):
checkout = models.ForeignKey( CheckOut )
name = models.CharField()
price = models.FloatField()
With these models, i want to contruct a CheckOut form, and select
Really would advice against using inline-block - for same reasons as before.
Like anything though, CSS is another one of those things you have to
sometimes learn the hard way... But the trick is, CSS/HTML shouldn't be
hard, it should be one of those things that just rolls off the finger tips.
well. inline-block is around since … at least 2007ish, and according to this
table it _really_ should be no problem for a somewhat new browser.
and I honestly think IE6&7 support is … not an option, given that ie8 is around
since 2006!
*if* you have the written requirement … bad. if not, well,
On 08/20/2011 06:51 AM, Scott Danzig wrote:
> I have Django 1.3 working with Python 2.7 and MySQL 5.5 on Mac OSX Lion...
>
> I'm betting I'm missing something straight forward, but:
>
> I have a simple Django app in development that uses a dictConfig setting
> simpler than the default in
Hi Cal,
On Mon, Aug 22, 2011 at 12:49 AM, Cal Leeming [Simplicity Media Ltd]
wrote:
> OP - let me know if you resolved your issue. If not, ill show you the
> standard way of doing it.
I have always considered vertical-align pretty standard. ;)
> For the
On Mon, Aug 22, 2011 at 8:58 PM, Sam Bull wrote:
> Thanks for the reply.
>
> Please don't think I'm looking for anyone to do our work for us. We've
> already implemented a first pass at our solution. I just worried that we
> might be reinventing the wheel and wanted to figure
Thanks for the reply.
Please don't think I'm looking for anyone to do our work for us. We've already
implemented a first pass at our solution. I just worried that we might be
reinventing the wheel and wanted to figure out if there were any strong
conventions out there. I didn't answer the
Is no one else having problems with collapsed TabularInlines? Seems
like this would be a very popular widget, and very important for any
serious database app.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
On Monday, 22 August 2011 17:16:24 UTC+1, Julian Hodgson wrote:
>
> Hi there,
>
> I'm running a production linux django server using wsgi, and have found the
> following issue. Django version (1, 2, 5, 'final', 0).
>
> If I open a python shell I get:
>
> >>> from passion.cg.models import *
> >>>
On Monday, 22 August 2011 18:17:09 UTC+1, mcrk wrote:
>
> Hi everyone!
>
> I've created a simple middleware for mobile detection and when testing
> values in dev console I came up with some pretty strange behavior.
> Let's say, I have this simple middleware class:
>
> class
Sorry to be a party pooper, but inline-block is yet again another one of
those big no-nos when it comes to cross browser/version.
http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
On Mon, Aug 22, 2011 at 7:35 PM, Axel Bock
wrote:
> Hah! I
On Mon, Aug 22, 2011 at 02:09:23PM -0400, Sam Bull wrote:
> Here are some of the questions we've come across:
Whew, those are very general questions where there are no right and
wrong answers (like "how should we run our business" -- which you should
know better), just advantages and
Hah! I can answer something on a Django-list - oh joy :) .
Yes, indeed I have an idea. *inline-block* may be the css thing for you.
A very nice example for that is here:
http://www.brunildo.org/test/inline-block.html
Go to http://www.brunildo.org/ to have an overview over a lot of other stuff,
Hi group,
I have another question about Django forms. I designed a Form for a Model, but
now I want to remove fields depending on some user settings.
Can I do that?
Lets assume the following:
class MyModel(models.Model):
field1 = TextField(null=True, blank=True)
field2 =
Hmm, this email is *bordering* on asking the list to do your work for you,
especially since it is for an enterprise product, and not FOSS.
A lot of the subjects you mentioned have been discussed at length on the
mailing list, three of which quite recently.
I think you might get a better response
Hi friends,
My company is developing a product using Django that's being sold to the
enterprise. Many of our prospective clients require that we offer a way for
them to deploy the product internally. We've settled on a tentative solution,
but I'd like to know if anyone else has dealt with
Hi,
Just to let everyone know - I uninstalled the mysql-python package for
the server (not just in my virtualenv) and re-installed it, and that
fixed the issue.
Thanks for your help!
On Aug 22, 4:56 pm, Cal Leeming wrote:
> Do this:
>
> import sys
> print sys.path
>
> Then
Hi everyone!
I've created a simple middleware for mobile detection and when testing
values in dev console I came up with some pretty strange behavior.
Let's say, I have this simple middleware class:
class MobileRedirect(object):
def process_request(self, request):
print "watchdog"
Hi there,
I'm running a production linux django server using wsgi, and have found the
following issue. Django version (1, 2, 5, 'final', 0).
If I open a python shell I get:
>>> from passion.cg.models import *
>>> print Sequence.objects.all()
[, , , ]
But if I go into the admin and delete
click-a-tell?
From: damola oyeniyi
To: "django-users@googlegroups.com"
Sent: Monday, August 22, 2011 4:03:48 PM
Subject: Django-SMS-GAteway
Is there documentation available on how to use the django-sms
On Mon, Aug 22, 2011 at 9:44 PM, hg wrote:
> Hi All,
> Thanks for taking the time to respond to my question.
> Cal: I did try uninstalling and re-installing.
> Kejun: Yes, it's installed.
>
> May be you can try to remove the mysql and python-mysqldb, and then
reinstall them.
Is there documentation available on how to use the django-sms -gateway API? I
am new to django entirely, even slightly new to web development, but I have a
model that might not need webpages if I get my sms application right. At least
I can to push a demo to my investors, before I take time to
Hello all,
I think I have found a bug, but this time I am not completely sure, so
I post it first in this group.
What I want to do is set an error message in the message-queue and
show this to the user after a redirect. Something pretty common I
guess. So I have the following code:
Do this:
import sys
print sys.path
Then paste result
Thanks
Cal
On Mon, Aug 22, 2011 at 2:44 PM, hg wrote:
> Hi All,
> Thanks for taking the time to respond to my question.
> Cal: I did try uninstalling and re-installing.
> Kejun: Yes, it's installed.
>
>
> On Aug 22,
Do this:
import sys
print sys.path
Then paste result
Thanks
On Mon, Aug 22, 2011 at 2:44 PM, hg wrote:
> Hi All,
> Thanks for taking the time to respond to my question.
> Cal: I did try uninstalling and re-installing.
> Kejun: Yes, it's installed.
>
>
> On Aug 22, 11:18
On Mon, Aug 22, 2011 at 12:11 PM, Temulen Odbayar wrote:
> I'm creating a web with people registration site. And also companies
> can register people... I think i can use admin site to do these things
> and don't need to create another page with registration form. But if
>
Hi All,
Thanks for taking the time to respond to my question.
Cal: I did try uninstalling and re-installing.
Kejun: Yes, it's installed.
On Aug 22, 11:18 am, Kejun He wrote:
> Did you install python-mysqldb in your mechine??
>
> On Mon, Aug 22, 2011 at 3:45 PM, Cal
Hi,
i'm new to Django,tyring to create a website for myself, on win2k3 with
python 2.6 and backend as MSSQL.
i have made all the configurations mentioned in the below link and i'm not
able to make it work.
Any body tried and make it work. please share you knowledge.
I'm creating a web with people registration site. And also companies
can register people... I think i can use admin site to do these things
and don't need to create another page with registration form. But if
companies can use admin site they may do anything they want. So i
think i can use group
Hi all, I 've a strange issue with URLField. It does not validate "
http://www.babacanyapi.com; and "ttp://www.crowntowers.net". When ı use
these urls the browser does not open anything I think it troubles into an
infinite loop. Why django does not recognize these urls?
--
You received this
On 20 août, 03:33, Kristofer Pettijohn
wrote:
> Hello,
>
> Is it possible to create specific models without a database table?
Depends on your definition of "models". If you mean "django.db.Model"
subclasses, nope - this part is nothing but a layer between your app
and
On 20 août, 12:51, Malcolm Box wrote:
> 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
On 22 août, 13:27, Reinout van Rees wrote:
>
> Probably all your logging statements are executed right at file import
> time before the logging is actually configured.
Using the DictConfig in settings.py, the logger is configured before
the apps models / views / whatever
Post your urls.py file - it looks like you have a pattern that is over
aggressively matching /sentry as a poll.
Malcolm
Sent from my iPhone, please excuse any typos
On 21 Aug 2011, at 21:18, tharshan muthulingam wrote:
> Hi,
> I have been having alot of trouble trying
On 20-08-11 06:51, Scott Danzig wrote:
I have a simple Django app in development that uses a dictConfig setting
simpler than the default in settings.py:
LOGGING = {
[snip]
}
Then later in code that I know is run... (I tried in my app's views.py
and also the backend).. I put something like
On Mon, 2011-08-22 at 00:57 -0700, i...@webbricks.co.uk wrote:
> which is fine, but you've missed the only step that actually makes the
> folder a python module.
>
> do this or it'll never import
> touch __init__.py
got distracted and pressed send too soon.
--
regards
Kenneth Gonsalves
--
*(I have never used the package you mentioned. )
Do you think you have configured the urls ( /sentry in your case ) for the
django-sentry !?
*
On Sun, Aug 21, 2011 at 11:18 PM, tharshan muthulingam wrote:
> Hi,
> I have been having alot of trouble trying to install and run
Did you install python-mysqldb in your mechine??
On Mon, Aug 22, 2011 at 3:45 PM, Cal Leeming [Simplicity Media Ltd] <
cal.leem...@simplicitymedialtd.co.uk> wrote:
> Hold on, i would say this is a django-related question (albeit not related
> to a problem within django). OP - try removing and
which is fine, but you've missed the only step that actually makes the
folder a python module.
do this or it'll never import
touch __init__.py
On Aug 22, 8:32 am, kenneth gonsalves wrote:
> On Sun, 2011-08-21 at 08:22 -0700, Jim wrote:
>
> > Here is the story. I
-- Forwarded message --
From: "Cal Leeming"
Date: Aug 22, 2011 8:49 AM
Subject: Re: CSS question
To:
OP - let me know if you resolved your issue. If not, ill show you the
standard way of doing it.
For the record - vertical
OP - let me know if you resolved your issue. If not, ill show you the
standard way of doing it.
For the record - vertical align in some usages isnt going to work very
nicely cross browser/versions.
On Aug 21, 2011 10:47 PM, "Joshua Russo" wrote:
> I know this is a bit off
Hold on, i would say this is a django-related question (albeit not related
to a problem within django). OP - try removing and reinstalling mysqldb on
your python install and/or env.
On Aug 21, 2011 2:20 PM, "Ramiro Morales" wrote:
> On Sun, Aug 21, 2011 at 5:08 AM, Hadassa
On Sun, 2011-08-21 at 08:22 -0700, Jim wrote:
>
> Here is the story. I created a site, mysite, with this command
> django-admin startproject mysite. Then, under the directory mysite/, I
> created an app named apps with this command ./manage.py startapp apps.
> apps is meant to hold all
On Sun, 2011-08-21 at 16:22 +0200, Rune Kaagaard wrote:
> @Kenneth+@Masklinn: You are right, there are a lot of template
> languages already, but this particular wheel is - unlike twig - not a
> compiled language but implemented in pure PHP as an Iterator, allowing
> it to blend in as an extension
78 matches
Mail list logo