Thanks Patrick,
So, you are voting for the second model. I think Django should have
such relationship builtin where I can avoid defining user_id as a field
in my news table.
I maybe wrong but I don't think (news.get_user.username) works in
templates. I have to double check.
Regards,
Mike
Django should
include such relationship.
> > I maybe wrong but I don't think (news.get_user.username) works in
> > templates. I have to double check.
> it does (i´m using it).
Glad to hear. I will be needing it :)
Regards,
Mike
Adrian,
Actually, this was the 'aha' answer to my question. Thank you. On a
different note, is there anyway to implement approach #2, having
NewsPosting have a user_id field in django-way? If not so, is there any
reason why not?
Regards,
Mike
lication
logic anyway.
>From all your feedbacks, I will go for the approach #1 and include
company_id into my records to optimize the database for speed.
Thanks,
Mike
> I wouldn't recommend approach #2, because it's a slightly messy
> database layout, but it would still work with Django as long as the
> "user" field of NewsPosting was a ForeignKey(User).
Thanks for your response,
Mike
truct me with some pointers where I can
better approach my current project as I am still in planning phase.
Thanks,
Mike
ield to be unique. The other way is the opposite.
> And there is a never ending battle between proponents of 'natural'
> primary keys and 'surrogate' primary keys.
I see. Thanks for your clear explanation.
Regards,
Mike
Dody,
Thanks for your clear explanation.
Regards,
Mike
files allows for multiple programmers
collaborating without running into each other toes.
Thanks,
Mike
Thanks for your helpful response
Mike
Hi,
How do I duplicate objects? Save_as style.
Something like...
a=choices.get_list()[0]
a.poll_id = 2
a.save()
Except not to update the previous record
Thanks,
Mike
Thanks Adrian. Very Useful.
Mike
Hi,
I was trying to save my python objects into my database using Python's
marshal or pickle. O'Reilly's Python Cookbook suggests saving these
objects into 'bytea' BLOBs. I was wondering if Django's model provides
support for bytea?
Thanks,
Mike
Sorry, the subject was supposed to by "Postgre's Bytea Datatype with
Django Model"
Mike
I see. I'll try to work around it somehow.
Thanks,
Mike
How do I do that? To retrieve a field's choices from the model?
class Person(meta.Model):
height = meta.CharField(maxlength=100,
choices=(('tall','Tall'),('short','Short')))
>>> Person.height.choices #
Thanks,
Mike
Thanks guys,
Person._meta.get_field('height').get_choices()
worked just fine. Needed it for my custom manipulator.
Regards,
Mike
I am aware that with magic-removal-branch I can override the 'get_list,
get_object, etc', but at this stage, how can I call a utility function?
Thanks,
sia
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
First, I just found out about Django and really like what I have seen
so far.
Even so, I don't think it will be really successful unless Django
provides tools for automatically coordinating DB Schema changes and the
Python Code. Please don't hang up yet - I have a suggestion.
I just spent abou
In a project I'm working on I have a status bar at the top of the webpage
that will render data using template tags. The status bar will be
displayed on all of my views, so I want to put the html code in my base
template. The base template is imported to all of templates using the
'extends' t
Hi,
Wondering if the limitation (that a page must be completely built in memory
before a response is sent) has been rememdied yet.
Last mention I could find seems to be from almost four years ago:
https://groups.google.com/d/topic/django-users/BJVZHuIBmSA/discussion
--
You received this
Thank you, I'll give it a try.
P.S. My email address seems to be embedded in the text ... is that
normal? I really don't want that. Just a matter of time until the
spammers get a hold of it. Any chance I could delete this thread?
--
You received this message because you are subscribed to t
Hmm, I was able to see my address before logging in, but looking in the
source couldn't find it. Perhaps generated by javascript? Also I don't
see it in your reply, so maybe Tom pasted it in?
I do use the gzip middleware and it doesn't look like there is an easy way
to disable it per view. I
In my app I need a way to associate objects with a specific user. Users
should not have access to other users objects. I'm implementing this in my
model by setting a ForeignKey to the user that owns the object:
owner = models.ForeignKey(User)
Is this a bad idea? Can someone explain under what
o view
it.
On Tuesday, April 17, 2012 11:20:09 AM UTC+2, bruno desthuilliers wrote:
>
> On Apr 17, 8:07 am, Mike wrote:
> > In my app I need a way to associate objects with a specific user. Users
> > should not have access to other users objects. I'm implementing this
e data into the django DB. I
guess this won't work with Celery because the remote workers won't have
access to the django DB. I guess the celery tasks should accept data and
only return data - all the interaction with the database should happen on
the web server hosting the djan
I'm working on a desktop app that will communicate with a server. I have
some experience with Django and with the user authentication system but I
haven't deployed a Django app with authentication yet. I'm planning to use
django for the server side component of this desktop app and the two wil
I developing a mac desktop app and I'm just making the first steps to add a
feature that will connect to a Django server. I have the Django project
running on the development server and the app running on the same machine.
When I try to call a Django project view from the app, on 127.0.0.1:800
I realized that I was heading down the wrong track with my previous message
to this mailing list so I studied the problem some more. Now I am trying
to send a POST request to a view and it gets rejected with a 403 error.
when I disable the csrf requirement using the @csrf_exempt decorator, the
': 'unix2003',
'CONTENT_LENGTH': '47',
'CONTENT_TYPE': 'application/json',
'CSRF_COOKIE': 'qsl91ZDqVL5wirXlUwIYmu8ytTVES3nt',
'CSRF_COOKIE_USED': True,
'DISPLAY': '/tmp/launch-EruXcM/org.x:0'
On Monday, June 25, 2012 3:06:28 PM UTC+2, Melvyn Sopacua wrote:
>
> On 25-6-2012 13:11, Mike wrote:
>
> > POST: > [u'']}>,
>
> Wait a second...
> Where's your csrfmiddlewaretoken from the {% csrf_token %} field that
> you put in your form?
&
On Monday, June 25, 2012 3:12:44 PM UTC+2, Kurtis wrote:
>
> > POST:> > [u'']}>,
>>
>> Wait a second...
>> Where's your csrfmiddlewaretoken from the {% csrf_token %} field that
>> you put in your form?
>>
>> This is the process:
>> - the cookie token is basically a lock
>> - the POST request rese
code
is still in the tutorial so I assume that it is still the right way to do
it. I'm using Django 1.4.
thanks
Mike
--
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.goo
gt; What does the depreciation warning say?
>
>
Here's the full text:
/Users/mike/sieve-django/SIEVEENV/lib/python2.6/site-packages/django/views/generic/simple.py:8:
DeprecationWarning: Function-based generic views have been deprecated; use
class-based views instead.
DeprecationWa
Quick question: I changed my urls.py so I can run my project in a
subdirectory and I broke all the urls in my templates. Should I be using {%
url path.to.some_view v1 v2 %} in all my templates instead of hard coding
the path?
--
You received this message because you are subscribed to the Goog
I just started to use Fabric to automate my deployments to my staging
server. (and when I'm ready, to the production server as well). I have
just a few questions for more experienced folks:
Do you clone your whole git repository onto your server, or upload a new
archive each time you release?
ood idea, I forgot about the hook scripts, and of course I could
git push without leaving a ssh key on the server. Well, now I have it
working by uploading tarballs but its something I can revisit in the future
Thanks
Mike
> so only change/ updated part in the code got uploaded. save Bandwidt
I can get the set null on a foreign key to work.
in my model I have this:
leaguteTypeId = models.ForeignKey(LeagueType,null=True,
db_column='leaguetype', on_delete=models.SET_NULL)
This is what is postgresql dumps:
ALTER TABLE ONLY league
ADD CONSTRAINT league_leaguetype_fkey
FOREIGN KEY (l
NULL constraint.
thanks again,
mike
On Aug 19, 10:53 am, Landy Chapman wrote:
> Have a look:
>
> -http://old.nabble.com/Should-postgresql-cascade-after-truncate-td3188...
>
> - https://code.djangoproject.com/ticket/11665
>
> http://groups.google.com/group/django-developers
I've been searching for a FAQ app for Django and found several but no
commentary as to which is best and still maintained, etc.
This group looks to have mentioned the subject last in 2006 and refers
to this:
http://simon.net.nz/articles/simple-faq-application-for-django/&usg=AFQjCNFwcCQGBUOKI_lMz
Thanks for your help. My requirements are simple, but I'd like
something well done without headaches. I'll try the fack fork. ;)
--
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.co
will I still be able to use Django's ORM?
TIA
--
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...@googlegrou
Many thanks Jacob!
On Dec 13, 8:57 pm, Jacob Kaplan-Moss wrote:
> On Tue, Dec 13, 2011 at 7:22 PM, Mike wrote:
> > will I still be able to use Django's ORM?
>
> Yes, please
> seehttps://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.mo...
> and in partic
I decided to update some packages in the virtualenv for my Django project
but in doing so I seem to have broken celery. After upgrading to the
latest version, I now get this TypeError when calling a view that also
submits a celery job with my_func.delay() Here's the error I get:
set([]) is
:54 PM UTC+1, Sergey Russkih wrote:
>
> Same problem
>
> среда, 28 ноября 2012 г., 12:21:56 UTC+2 пользователь Mike написал:
>>
>> I decided to update some packages in the virtualenv for my Django project
>> but in doing so I seem to have broken celery. After upgradin
I'm running Django 1.4.2
On Wednesday, November 28, 2012 1:37:30 PM UTC+1, Sergey Russkih wrote:
>
> Looks like problem for django 1.3 only. Works for django 1.4 without
> downgrading
>
> среда, 28 ноября 2012 г., 14:26:07 UTC+2 пользователь Mike написал:
>>
>> I
I'm trying to use the url template tag to call the login view from
contrib.auth. I've tried the following but none work:
{% url login %}
{% url auth:login %}
{% url auth.login %}
{% url contrib.auth.login %}
Can someone enlighten me please?
Mike
--
You received this message becau
>
>
> Named urls are URLs defined in your urlconf that have named views. The
> contrib auth app, although it provides a bunch of views, does not
> automatically install any of them at any URLs, hence this would fail.
>
> If you include the login view in one of your urlconfs, it will not
> have
My users will upload text documents ranging from hundreds to thousands of
words. At the moment I store the text in a TextField. Is this going to
cause a performance problem in the future or would it be better to store
the text on the file system and put a file path in the data model? The
tex
On Friday, January 11, 2013 9:30:39 AM UTC+1, iñigo medina wrote:
>
>
> El 11/01/2013 07:36, "Mike" > escribió:
> >
> > My users will upload text documents ranging from hundreds to thousands
> of words. At the moment I store the text in a TextField. Is
On Friday, January 11, 2013 7:47:18 AM UTC+1, Srinivas Reddy T wrote:
>
>
>
>
> On Fri, Jan 11, 2013 at 12:05 PM, Mike >wrote:
>
>> My users will upload text documents ranging from hundreds to thousands of
>> words.
>
> What kind of documents? pdf? word
I have been shopping for hosting for my project too (in my case a hobby project
that I will monetize ). I don't know anything about Fat Cow but many hosts
will give you shell access and let you host django powered sites. What most
won't do is let you run long running background processes such
Thanks for the recommendation! I just bought it and spent five minutes
browsing and already I learned a lot. Here's a few chapters that I'll read
right away:
Security best practices
Django app design
When to use function based views or class based views
Deploying
The book is currently in alph
On Tuesday, April 9, 2013 8:52:41 AM UTC+2, larsvegas wrote:
>
> Can somebody advice me on a provider where I can run my own executable?
> The program I need to run is written is c++ and can be installed on windows
> server or linux. A rough estimation of costs?
>
> Thanks!
>
Digital Ocean has
code (I assume) before you run it on their servers. I don't see why c++
code would be potentially more dangerous.
>
> On Tue, Apr 9, 2013 at 9:23 AM, Mike >wrote:
>
>>
>>
>> On Tuesday, April 9, 2013 8:52:41 AM UTC+2, larsvegas wrote:
>>>
>>&g
On Tuesday, April 9, 2013 6:33:08 PM UTC+2, Mike wrote:
>
>
>
> On Tuesday, April 9, 2013 4:48:43 PM UTC+2, ke1g wrote:
>>
>> A linux VPS, such as from linode.com would certainly allow this (we pay
>> abotu $20/mo for ours).
>>
>> As to shared hosts, it
I'm trying to get logging to work from within my celery process. I have
set:
CELERY_SEND_TASK_ERROR_EMAILS = True
in settings.py
within the process I am logging to level INFO:
logger.info('some info')
I launch the process using supervisor:
python manage.py celery worker --loglevel=ERROR
The
I'm starting to write tests for my Django project but I'm not sure how to
test a function that calls out to a web API. I read somewhere that I
should not test against the live web api and that I should develop some
sort of replacement for the actual web api server which sounds like a lot
of wo
Have you tried supervisord? I installed supervisord from my linux distro
on my server and put a config file in the conf.d directory. Its working
fine.
On Tuesday, June 4, 2013 12:17:16 PM UTC+2, Manu wrote:
>
> Hi all,
>
> I have had no success so far with daemonizing celery on my server. I
rd start' to start it up again.
Is your worker running fine when you execute:
python manage.py celery worker
?
Are you using a virtualenv?
On Wednesday, June 5, 2013 3:53:48 PM UTC+2, Manu wrote:
>
> Thanks for the reply Mike. I've been trying to setup supervisord for 4
> ho
On Wednesday, June 5, 2013 5:42:39 PM UTC+2, Manu wrote:
>
> Mike,
>
> Please find my replies below.
>
> On 5 June 2013 20:27, Mike > wrote:
>
>> Thats why I installed it using the package provided in my Ubuntu linux
>> server. Then I used the template
I just updated django-registration to 1.0 (from 0.8) and now I get an
ImportError:
ImportError: cannot import name activate
/Users/mike/sieve-django/SIEVEENV/lib/python2.7/site-packages/registration_email/backends/default/urls.py
in
1.
from registration.views import activate
On Sunday, July 21, 2013 5:20:36 PM UTC+2, donarb wrote:
>
>
>
> On Saturday, July 20, 2013 9:23:37 PM UTC-7, Mike wrote:
>>
>> I just updated django-registration to 1.0 (from 0.8) and now I get an
>> ImportError:
>>
>> ImportError: cannot import name
I used:
sudo apt-get install python-pip
sudo pip install django
On Apr 29, 7:29 pm, Korobase wrote:
> Does django 1.3 has a ubuntu deb package released !
> I have googled but get none,Any one have done this?
> Thanks.
>
> --
--
You received this message because you are subscribed to the Googl
Hi all,
I need to make a scheduling app and have found django-schedule:
https://github.com/bartekgorny/django-schedule
Not sure if it is the best choice, as the author seems to have
disappeared, but the others I'd found looked too simplistic.
I've installed the demo, and got it working. However
What is everyone using to combine CSS/JS?
Has anyone tried mod_pagespeed? Perhaps Django-Compressor?
All the discussions I found were quite dated.
Thanks
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dja
My take is that you can have record-centric logic that can either be
put in one place (tucked away in the appropriate model) ... or spread
out across the codebase. Sounds analogous to standard OOP concepts.
--
You received this message because you are subscribed to the Google Groups
"Django use
So am am ready to deploy using apache/modwsgi. However I noticed that
I am not getting emailed 500 errors.
In my settings file I have:
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'handlers': {
'mail_admins': {
'level': 'ERROR',
'class'
equest':
logger = logging.getLogger('django.request')
logger.error('test')
finally, my problem, after i found the proper mail log file was simply
a bad server email "root@localhost". Setting SERVER_EMAIL did the
trick, although I though DEFAULT_FROM_EMAIL would.
Hopefull
that page link to
an editable view? I'm thinking that having an extra step will help to
prevent accidental updates.
Thanks
Mike
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
Hi,
I have created modelFormset using SchoolHistory model and SchoolForm form.
"SchoolFormSet = modelformset_factory(SchoolHistory, form=SchoolForm)"
I get other content from Form, but should save current user to
SchoolHistory model too.
user=models.ForeignKey(User)
school_name = mode
File ... ... site-packages\django\views}generic\base.py line 60
"attributes of the class." % <(cld.__nsmr__,key)
TypeError: ApplyWizard() received an invalid keyword 'url_name'.
as_view only accepts arguments that are already attributes of the class.
If somebody got NamedUrlWizardView working, l
Hi,
Is there risk of getting too big PK value while adding and deleting rows
for long time in same table?
-Mike
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, sen
I have a model that looks something like this:
Job(models.Model):
status = models.CharField(max_length=8, choices = statuses)
jobid = models.CharField(max_length=20, db_index=True)
...
I submit tasks to celery. The task fetches the Job object, changes its
status to RUNNING, does the
results. The interpreter does not load this way anymore, it just dumps me
back at the propmt without feedback.
Since .py files are associated to python, I tried running a couple scripts by
name alone. That works fine. What happened to my interpreter?
Thank you,
Mike
--
You received thi
>
> pip install django
> Downloading/unpacking django
> Downloading Django-1.9-py2.py3-none-any.whl (6.6MB): 6.6MB downloaded
> Installing collected packages: django
> Compiling
> /Users/mike/sieve2/SIEVEENV/build/django/django/conf/app_template/apps.py
> ...
>
Hey all, I am the CEO of Artigrafx LLC and we are trying to create a
few Django apps. We would appreciate any help with any of these
projects, due to Django being new to us.
Current Projects:
A Django CMS
A Django eCommerce system
Links:
http://www.agfxsite.com/
http://www.agfxsite.com/board
Th
if you want.
Be sure to have 2.5 on yours as well as wxPython and the PyWin32
package (if you use Windows). We will have them on USB flash drives
should you forget.
Free pop and bottled water will be provided. Questions and comments
can be directed to mike [at] pythonlibrary [dot] org. Updates can b
Eldon, maybe we could get together and set up some basic structures
for what we want to accomplish. Let me know.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email
d.rel.to._meta.object_name))
265.
266. # Set the value of the related field
I'm running on SVN trunk as of changeset #9506, BTW.
It seems to me that the generic inline is not correctly handling the
_ptr foreign-key connecting the Image instance to it's parent File
instan
Has anyone tried or been successful implementing authentication with
clien certificates i.e. PKI x.509 user certs ?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send ema
ething basic. Thanks
in advance for the help!
-Mike
--~--~-~--~~~---~--~~
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 unsubscrib
Paul,
Thanks for the help. I switched to the get method, and the data
prints correctly now. Thanks!
-Mike
On Dec 22, 5:44 pm, "Wayper, Paul"
wrote:
> > .filter returns a list of the items that match the query. So
> > you're trying to stringify a list. That'
ogslug = models.SlugField(prepopulate_from=["title"])
> content = models.TextField(maxlength=5000)
>
> def get_absolute_url(self):
> return "/app/feeds/latest/%i/" % self.id
>
I ran into this recently, what's going on is the feed class is trying
experience and new programmers. All experience
levels are welcome. We hope to see you there! If you have any
questions, just let me know.
Mike Driscoll
www.pyowa.org
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"
rather void argument. I'm pretty sure the people who use
django-users mainly do it through the web interface - so to them it
would only mean the changing of a web address. Everybodies
subscriptions would stay in tact, they would just have to send to a
slightly different web address.
There are goin
I apologize if this already showed up on the list. I originally posted this
from google groups, and I think it ate it.
I'm new to Django. As a small Django project, I'm making a internal purchase
request form. One section has user information and another section has a
selection of items to req
one of two errors
(if I keep refreshing, the errors change between the two randomly.
Either
---
TypeError at /admin/
dict objects are unhashable
--
or
AlreadyRegistered at /admin/
The model URL is already registered
The full errors are included below. Anyone have any idea
27;)}),
("Contributors", {'fields':('authors', 'contributors',
'translators', )}),
("Overview", {'fields':('summary',)}),
("Publish Information", {'fields':(
t format we want our meetings to take.
Plone and Zope users are welcome. In fact, anyone who is interested in
Python (regardless of their experience with it) is welcome to come.
Let your Iowan Python friends know.
Questions or ideas? Send them to me. Thanks!
---
Mike Driscoll
any facility in django-registration/django-profiles to do
> > this?
> >
> > Thanks
>
I don't know about django-profiles, but django-registration provides a couple
signals, user_registered and user_activated. By connecting a handler to
either one of these singals you
On Wednesday 11 February 2009 02:13:53 pm Alex Rades wrote:
> On Wed, Feb 11, 2009 at 10:43 PM, Mike Ramirez wrote:
> > I don't know about django-profiles, but django-registration provides a
> > couple signals, user_registered and user_activated. By connecting a
> > hand
On Wednesday 11 February 2009 02:13:53 pm Alex Rades wrote:
> On Wed, Feb 11, 2009 at 10:43 PM, Mike Ramirez wrote:
> > I don't know about django-profiles, but django-registration provides a
> > couple signals, user_registered and user_activated. By connecting a
> > hand
and simply installing via setup.py install
> works just fine. Thanks for any help.
>
Django is available via rpm for fedora, you might want to consult the SRPM for
the spec file to see what's they are doing.
http://mirrors.kernel.org/fedora/releases/10/Everything/source/SRPMS/Django-1.0-1.fc
iterable. Looping through other
querysets in the site, works fine, but the other querysets don't use order_by
or use chained filters.
I'm using django-trunk rev 9832
If you need more info, let me know.
Mike
--
To be great is to be misunderstood.
-- Ralph Waldo Emerson
sig
On Friday 13 February 2009 11:17:05 am Alex Gaynor wrote:
> You shouldn't have commas between the arguments to the cycle tag.
>
> Alexx
Thank you for helping this blind bat.
Mike
--
I'm going to raise an issue and stick it in your ear.
-- John Fore
w if you can make it!
Mike
--~--~-~--~~~---~--~~
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 e
the django settings, in addition
to serving static files and handling file uploads).
The idea of it having to be a 3 tier system is really not that important. The
two tier system can work the same way, and be just as secure with the correct
server configurations.
Mike
--
Magically turning p
We hope that django is able to access LDAP Server as models,but we
have not found a good method. We wrote our ldap modules based on
python-ldap. If you have some examples about how to integrate into
django.db.models, please told me.
MikeDong
2009/2/24 Eric Chamberlain :
>
> Hi,
>
> We have var
ail to
> django-users@googlegroups.com To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com For more options, visit this
> group at http://groups.google.com/group/django-users?hl=en
> -~--~~~~--~~--~--~---
Mike
--
Didn't I buy a 1951 Packard from you last March in Cairo?
signature.asc
Description: This is a digitally signed message part.
101 - 200 of 2343 matches
Mail list logo