Me too, I'm interested in the collaboration but i'm not from the U.S
Le mercredi 25 décembre 2024 à 09:51:09 UTC+3, Benjamini Athanas a écrit :
> Yes am here
>
> On Wed, 25 Dec 2024, 09:48 Adisa Habeebulah, wrote:
>
>> I'm interested in the collaboration just that I'm not from the U.S
>>
>>
>>
Thanks so much everyone. I looked over those files many times and I
couldn't see it.
On Tuesday, October 18, 2016 at 5:17:55 PM UTC-4, James Schneider wrote:
>
>
>
> On Tue, Oct 18, 2016 at 11:00 AM, Johnny McClung > wrote:
>
>> I have gotten down to the part w
I have gotten down to the part where the tutorial reads "Load the page by
pointing your browser at “/polls/”, and you should see a bulleted-list
containing the “What’s up” question from Tutorial 2. The link points to the
question’s detail page."
I do not see a bulleted-list. All I see is "No po
Thank you. I've added the comma as you mentioned. Can't believe I missed
that. But now I am getting a new error.
E:\Dropbox\Python Scripts\mysite>python manage.py runserver
Performing system checks...
Unhandled exception in thread started by .wrapper at 0x044B16A8>
Traceback (most recent call
I am getting an error when I try to run the Django server.
>> mysite >> polls >> urls.py
from django.conf.urls import url
from . import views
urlpatters = [
url(r'^$', views.index, name='index'),
]
>> mysite >> mysite >> urls.py
from django.conf.urls import include, url
from django
Thanks for the idea. I followed up on this found that the
django-registration backend is really only ment for anonymous account
creation - it will log an athenticated user out upon reaching the page. The
deal seems to be that in order the create an account, the user must not
already have an acc
Try add RequestContext in render_to_response()
from django.template import RequestContext
return render_to_response('account/login.html',
> locals(), context_instance=RequestContext(request))
On Tue, May 10, 2011 at 10:10 AM, 阮明辉 wrote:
> return render_to_response('account/login.html')
>
--
It seems like no one has suggested New Orleans yet, so I'm just going
to toss that out there.
-Johnny
On Tue, Sep 28, 2010 at 7:31 AM, Franklin Einspruch
wrote:
> You might also have a look at Providence, RI. There's an airport, it's
> an hour from Boston by car, and the
Ahh, clever.
Thanks,
Johnny
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.com
and
several parts of Django (including dumpdata) will use that Manager
exclusively for that model."
I may be missing something here, but this jumps out at me as being
impossible. The ModelBase metaclass receive the attributes as a dict,
so isn't the original order lost?
-Rev. Johnny Healey
; button I can navigate on "newly" mySQL added
record .
So they exist but I can see the form record info corectly.
Is there a table that control this kind of updating ? What can be the
solution for that problem ?
Is it possible to understand wich is the program used there ?
Many thanks for eac
7, 2008 at 2:34 PM, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> > Johnny Utah wrote:
> >> Thanks for the input.
>
> >> When you say Django.admin would be useful, do you mean users would
> >> access the admin interface?
>
> > Please respond to the list
ated!
The site:
An inventory system for reptile owners. A user creates an account.
Once the user is able to login, they can add a reptile. Once they
have added a reptile, they can add dated entries for feedings,
sheddings, cage cleanings, etc.
Thoughts?
Hi everyone,
I'm writting a Web App using Django and I got problems to make appear or
deasappear some content.
Here is the code I was using to write a part of the windows:
Episode
Name
Ok, for example, I can pass in
Modelname.objects.select_related().all() for the queryset, obj's_Id
for the object_id. And the 'object' in the generic view will actually
be calling a .get(id=obj's_Id) on that lazy, select_related queryset?
thanks for the reply,
Johnny
On Oct
Hi,
I'm wondering if select_related() is used for the object_detail
generic view. If not, shouldn't it be since it's more efficient?
Also, is select_related only useful on a .get() method?
thanks.
Johnny
--~--~-~--~~~---~--~~
You received this
I found the same problem as ticket #5737. It was closed due to unable
to reproduce it, but I am seeing the same problem.
I have:
class QueryForm(f.Form):
status = f.ChoiceField(choices=STATUS_TYPES,
widget=f.CheckboxSelectMultiple(), required=False)
and the form validation errored:
statu
correct code (assuming modelform is used):
>
> class OrderForm(ModelForm):
> class Meta:
> model = Order
> exclude = ['number', 'state', 'state_since']
>
> nb: The excluded fields have no null/blank/editable options set in the mo
I have a question about the exclude property in ModelForm. When I
have a Model and the ModelForm for it excludes a field from that
Model, shouldn't the ModelForm validation excludes that field as well?
It seems the only way to exclude the field from validation is to make
it blank=True in the Mod
ues()
the objective is to serialize it (if it makes a difference), but the
key idea is to have the output fields represented as if B were never a
separate model.
thank you so much,
Johnny
--~--~-~--~~~---~--~~
You received this message because you are subscribe
)
the objective is to serialize it (if it makes a difference), but the
key idea is to have the output fields represented as if B were never a
separate model.
thank you so much,
Johnny
--~--~-~--~~~---~--~~
You received this message because you are subscribe
I have seen forms without the "self" in front of the fields, eg. more
like this date_from = forms.DateField() and never self.date_form
=forms.DateField(). If you include self.date_form, then date_form
becomes an attribute of an instance rather than a attribute of a
class.
What confusing me is th
Thank you, Karen and Marty for the help. It made lot of difference.
john
--~--~-~--~~~---~--~~
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
What I need to do is, get the records from the database and split
fields contents. One of the field, has commas separated contents and
another field has - separated fields. In my view, I just do fetchall
of database records and send to view. From the view, I do a for loop
to go through each rec
I am looking at this documentation:
http://www.djangoproject.com/documentation/templates_python/#parsing-until-another-block-tag-and-saving-contents
It has the following code:
output = self.nodelist.render(context)
return output.upper()
upper() in output.upper(), I am assuming is the nam
There is a problem with default django for loop tag {% for %} {%
endfor%} . Django template doesn't seem to like nested block tag
inside for loop tag.
{% for a_object in object_list %}
{% load custom_format %}
{% custom_format_string1 a_object.3 %}
{{split_string_data1}}
{% end_custom_format_st
Can someone help me, plz?
I have two block tags that take an argument and then sets a variable
in the template. The two block tags are inside the template "for
loop" tags, one after another.
On Oct 18, 3:00 pm, johnny <[EMAIL PROTECTED]> wrote:
> I have templatetags/custo
I have templatetags/custom_format.py, and in it I have
do_custom_format_string1, do_custom_format_string2. I placed the
template tags
one after another, insdie my html page like this:
{% for a_object in object_list %}
{% load custom_format %}
{% custom_format_string1 a_object.3 %}
{{split_strin
{% for a_tup in rs %}
{{ a_tup[0] }}/
{{ a_tup[1]
{% endfor %}
Exception Type: TemplateSyntaxError
Exception Value:Could not parse the remainder: '[0]' from 'a_tup[0]'
Only way to do this is to have nested for loop inside template?
--
Below is my form class. Inside myForm, I tried doing this:
choice = forms.ChoiceField(label="My choice",
choices=myChoice(self.q_prime).choices())
I get an error right here "choices=myChoice(self.q_prime).choices()":
name 'self' is not defined
My Form Class:
class myCh
Is there a way to run python code in the template? In view, I just
fetchall from database and pass it to the template But I found out I
need to break up the content in one of the field. As each records are
looped inside the template, I need to break up a field and display it.
--~--~-~
> Preferences...
Pydev > Interpreter - Python
System PYTHONPATH > New Folder
Folder : c:\django\mysite
using eclipse with watch variable would make life easier ;)
On Oct 12, 11:04 am, johnny <[EMAIL PROTECTED]> wrote:
> I am trying to watch a variable in my app. Setup i
I am trying to watch a variable in my app. Setup is fine. I can run
manage.py runserver inside eclipse and view debug window and place
break points. But can't seem to watch the variable values.
I am getting following error:
could not resolve variable
Here is the pic:
http://farm3.static.flic
I was going over documentation on pagination and it mentions you can
do it in two ways as follows:
URL... ?page=x
or
(r'^objects/page(?P[0-9]+)/$', 'object_list', dict(info_dict))
My question is, you would use
"URL... ?page=x" for regular views?
"(r'^objects/page(?P[0-9]+)/$', 'object_list', d
In django template, can you have (% block somename %} above root html
element of a document, like here?
my base.html
http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd";>
{% block html %}
http://www.w3.org/1999/xhtml";>
{% endblock %}
--~--~-~--~~~---~--~~
You re
Does this command dump the whole app models or can you specify a
specific model?
./manage.py dumpdata --format=yaml yourAppNameHere, command seems to
print on the screen. How do you specify to dump it to a file?
--~--~-~--~~~---~--~~
You received this message b
FIX: "model": "category.Category",
NOT this: "model": "apps.category.models.Category",
--~--~-~--~~~---~--~~
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@goog
this error is due to auto incremented primary key. you can't have
empty fixture file.
--~--~-~--~~~---~--~~
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@googlegr
from django.db import models
from django.contrib.auth.models import User
class Category(models.Model):
id = models.AutoField(primary_key=True)
parent_id = models.IntegerField()
name = models.CharField(maxlength=200)
Problem installing fixture 'c:\mysite\apps\category\fixtures
\initi
class Category(models.Model):
id = models.AutoField(primary_key=True)
parent_id = models.IntegerField()
name = models.CharField(maxlength=200)
Problem installing fixture 'c:\mysite\apps\category\fixtures
\initial_data.yaml': 'NoneType' object has no attribute 'anchor'
What is the iss
What I want to do is display "online/offline status" on user profile?
anybody have an idea how to get information about user is logged
in(active session) or not?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Dja
I can someone tell me how the database connection is handled for
threads. Do I have to pass conneciton object to each threads?
All I am doing is this:
@threadpool(pool)
def process(i):
print 'threadpool %i enter' % i
p = Profile.objects.get(id=i)
p.status ="sent"
p.save()
I am implementing a backend python script that updates the database.
It uses threadpool(http://snippets.dzone.com/posts/show/4425#related).
Threadpool size is 3. When records are returned, eg. 10 records, 3
threads are created, then the threads update the database, but doesn't
seem to do
task_don
Only works when I put my actual project folder (/home/bobby/dev/
workspace/mysite) into to the $PYTHONPATH and $PATH. All my django
code, I never do:
from mysite.apps.whatever import
just:
from apps.whatever import
So in this case, I guess you have to put in the project folder into
the $PYTHO
Trying to run standalone python script that uses django orm.
Something wrong with path setup to execute this python script.
Also, what is the purpose of setting
$DJANGO_SETTINGS_MODULE=mysite.settings? I think this is where the
problem is.
/home/bobby/dev/workspace has folder: mysite, django_sr
you create class called PersonManager(models.Manager) and define
my_custom_sql inside there. Do you place this class in the same
models.py or in a separate file called apps/people/manager.py and then
import it where ever you need it? What is the best practice?
--~--~-~--~~-
I need to define custom sql for a model, so it is only accessible by
model class but not by model instances.
Where do I define is my_custom_sql, like below, inside the Person
class (my guess is not, if need to access my_custom_sql, then I need
to instantiate Person.):
class Person(models.Model):
If I use a filter, how do retrieve pub_date falls between certain
minutes (0 <= pub_date_minutes < 20 minutes, 20minutes <=
pub_date_minutes < 40 minutes, so on)
I looked at an example on django site:
Entry.objects.filter(
headline__startswith='What').exclude(
pub_date__gte=datetime
import re
from BeautifulSoup import BeautifulSoup
import urllib2
from os import environ
#from settings import *
def myfunction() :
environ['DJANGO_SETTINGS_MODULE'] = "mysite.settings"
from settings import *
I get an error:
myscript.py:22: SyntaxWarning: import * only allowed at module
What I want to do is get post between 9:00AM-5:00PM on any day. I
just want to compare Hour part of "created_at" field. If the hour is
between 9-5, can be any day, get the matching records.
Pseudo Django Python Code:
Post.objects.get( Q(created_at = (9:00AM - 5:00PM)))
Is this possible?
--~
Is it even possible to run Django and MySQL Cluster or I have to write
some patch to django for it to work (I am not a python or Django
guru.)?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
My model named: Post
It has a field created_at as:
created_at = models.DateTimeField(auto_now_add = True)
Would Post.created_at be of string or datetime ?
I want to add 2 weeks to it, like Post.created_at + 14 days. Can I do
this?
Post.created_at =Post.created_at + datetime.timedelta(weeks=2)
When I use render_to_response, can I have routing url in it like '/
posts/all/' or
I have to have '/posts/all.html''?
My small code:
# I am passing list of objects called 'posts' to template
return render_to_response('/posts/all/', {'posts': posts})
In my browser, I want to have pretty url like
Can you do this?
citylist = CityList.objects.get(
Q(city="%s" % (line[3])),
Q(state=slist.id)
)
I am getting the following error:
citylist = CityList.objects.g
Doing the following:
from os import environ
environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from settings import *
Only works at the parent folder level. What if you have script in sub
folder level? I tried it at sub folder level and got error:
from os import environ
environ['DJANGO_SETTINGS_M
Since I have my code in threaded manner, do I have to put the
following code inside threaded function or outside?
from os import environ
environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from settings import *
--~--~-~--~~~---~--~~
You received this message because
I have a python script that runs in a multi threaded manner for
backend to update certain flags in the table. I want to use django
models to do this. I was wondering if I import the django models just
like any other python, would that work?
Also, what about the database connection, can I just c
I want to throw captcha, when the user failed to login, after 2nd
try. How do I keep track of how many times login fails? Set a cookie
with login attempt?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Following dose it.
pickle.dumps(someObject)
pickle.loads(someObject)
--~--~-~--~~~---~--~~
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 unsub
To do pickling, do you always have to create a file and send it over
the network to the other machine? Rather than creating a pickled
file, can you create string?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
Anyone know, how I can pass Model object from one machine that runs
Django, to another machine that doesn't have Django, but uses
python?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
I fixed it. Symbolic link wasn't pointing to the right directory.
--~--~-~--~~~---~--~~
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 unsubscr
I created a link in python/site-packages/django that actually points
to the /home/me/django_src/django. I copied my project from windows
into linux. I will delete *.pyc files and try it.
--~--~-~--~~~---~--~~
You received this message because you are subscribed
I am not sure how to fix this. I reinstalled linux and now manage.py
has an import problem. Does this mean I have to add django to $PATH?
My ERROR:
[EMAIL PROTECTED] mysite]$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 2, in ?
from django.core.man
urllib2 module is the one I need. Thank you.
--~--~-~--~~~---~--~~
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,
What I want to do is set HTTP Error manually in my view, when a
request is made to certain url, without post data.
At a particular url, my view is looking for XML document to be sent
over http, by post. If a request come in without post, I want to
raise an error "405 Method Not Allowed". How do
> why don't you just use a browser?
I need to construct and load xml data from python shell and send it to
the dev server. I don't think you can do this in the browser.
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the
How do you send a request to localhost djanog dev server from Python
Terminal?
I have started mysql and python dev server locally on my machine.
Now, I want to open
python terminal send a request, to 127.0.0.1:8000/putProduct.
Thank you.
--~--~-~--~~~---~--~~
You
I just need to know how to get the xml document coming in over http.
Is it just regular request.Post?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django
This is what I need to do:
Site will be recieving, orders from retailers ( which comes in as a
xml with list of products), what products are required, quantity and
such by them, and I need to process the xml and update the main
company database.
Thank you.
--~--~-~--~~~
I am python newb. But I came across this thread. It sound like
someone has attempted it and it's in google source.
http://groups.google.com/group/django-users/browse_thread/thread/2f2840572fc99fc3/e045e3ef43b2a607?lnk=gst&q=raw_post_data&rnum=2#
--~--~-~--~~~---~--~
I am doing REST, xml over http (sending and receiving xml documents),
which is simpler for me than XML-RPC. I am having problem with
receiving xml documents.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
This may be stupid question for an expert. But stupidity is in not
asking.
How do I access the XML Documents sent over to my server in Django
View? Is it like regular request.POST?
How large POST data can be sent before connection timing out?
Thank you.
--~--~-~--~~~-
This is simple question. When you send xml over http, do you just
pass string varible containing the xml document, as a variable to the
template?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
I am trying to do this inside Django view. I am new to python, I
thought someone might have used lxml to process and create xml
documents in Django. I looked at the documentation, but for newb, I
need to see an examle like this.
Thank you.
--~--~-~--~~~---~--~~
Breakfast at Tiffany's
Movie
Classic
Borat
Movie
Comedy
How do you represent DVD id=1 and it's elements, and DVD id=2 and it's
elements as child of root "Library"?
Like this:?
from lxml import etree
from lxml import objectify
root = objectify.Element("Library")
child[1] = objectify.Eleme
I have tried:
http://api.localhost:8000/
http://api.127.0.0.1:8000/
This is not working on my windows machine (using development server,
not apache+mod_python).
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google
How do you test the subdomin url style in Django development server?
Developer server is at:
http://127.0.0.1:8000/
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this
How do I route subdomains style url: http://api.mysite.com/ ?
Thank you.
--~--~-~--~~~---~--~~
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 u
I am not sure if I want to take XML-RPC approach. In the future, I
may consider REST for Web Services API, like Flickr.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, s
I need to create a simple web api for my project. Basically they make
a request, I send response back in XML. Or they send me XML docs to
upload to my site. Any good python XML out there for this kind of
service? I am looking at ElemenTtree. Any other ideas welcome.
Thank you
--~--~--
At least, can someone tell me, what date time format, newforms
DateTimeField takes? Right now it's not taking 03/17/2007 05:11 PM in
the input field, validation is failing.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google G
You are calling this as a method from SalesForm?
Yes, I am calling self.data.get('p_id') inside SalesForm.
As [EMAIL PROTECTED] mentioned above, I popped the primary key before
passing to the base form class, I got it to work so far. But if I add
def clean, some reason, it doesn't validate prope
In the input field user enters date and time, together like this
format: 03/17/2007 05:11 PM
If I do enter it like this, I get a validation error as follows:
03/17/2007 05:11 PM *** Enter a valid date/time.
I have following code in my forms.py and tempalte add.html:
forms.py
start_at = for
>self.data.get('p_id')
I tried it, getting error:
Exception Type: AttributeError
Exception Value: 'str' object has no attribute 'get'
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" grou
I need to validate the data user enters, based on the product they
have viewed.
--~--~-~--~~~---~--~~
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
I did this: forms.SalesForm(request.POST, p_id). Inside class
SalesForm(forms.Form) which init was overwrote, as you mentioned like
below. Now within SalesForm, how do I get p_id?
> class SalesForm(forms.Form):
> def __init__(self, *args, **kwargs):
> super(SalesForm, self).__init__(
I have a forms.py that uses newforms. It has a class
SalesForm(forms.Form). I need to pass an argument, p_id to SalesForm,
which is used to retrieve related product from product model. When I
run it, I get an error:
Exception Type: TypeError
Exception Value:__init__() takes exac
In newform, how do I allow a single regexField to accept either a
whole number, or number with decimal places?
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
I need to retrieve latest record (each record has a time stamp,
created_at), only one record, from sale table where product_id=1. How
do I do this in Django ORM? I have looked at .objects.extra{}, but I
am getting ProgrammingError 1064.
I need to get this sql into Django ORM:
select created_at
I have an app that is for online test taking. Most online test are 30
mins to 2hrs. I need to create count down clock from when the test is
stared. If 30 mins test, then count down will start from 30 mins : 00
Secs, 29 min: 59 secs and so on. How do I do this?
--~--~-~--~~---
I have an online seminar booking application. What I want to know is,
if 100 people are currently
viewing a room that holds max 200 people, and one person out of 100
books the seat in the room, how do
I refresh all the 100 pages so that they all have an updated version?
Thank you.
--~--~--
I am new to python and javaScript, I have created a funtion that
return the tags via ajax. I tried to replicate the php example. But
it's not working. I doesn't return any tags back to my html page via
ajax. I need some help. I am using jQuery autocomplete plugin from
here:
http://just-tech.
class City(models.Model):
# ...
class Person(models.Model):
# ...
hometown = models.ForeignKey(City)
class Book(models.Model):
# ...
author = models.ForeignKey(Person)
edited = models.ForeignKey(Person)
If do this: Book.objects.select_related().get(id=4), Would it get on
There seem to be an error I am getting in Dev Version of Django, I
just updated 1/2 hr ago. It's
related to model back tracking, retrieving foreign key related
objects, line 31: p.question_set.all, in template.
ProgrammingError at /post/1/
(1064, "You have an error in your SQL syntax; check the
I have to update two models at the same time, if one model update
fails, I need to rollback the transactions. How do you do this in
Django ORM.
Thank you.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django us
I am using jQuery to do the autocomplete. Autocomplete request
backend script like this: script_url?q=foo. But there is a problem
with django routing?
(r'^tag/autocomplete/?q=(?P\w+)/$',
'apps.tag.views.tag_autocomplete'),
Here is my error:
[05/Mar/2007 15:11:51] "GET /tag/autocomplete/?q=a
Has anyone got Django and jsCalendar to work? Problem I am having is,
Django has separate input field for DATE and TIME. jsCalendar combine
both together. Even if I separate it manually, validation is
failing. I have spent some days on this. Didn't get anywhere. I
like jsCalendar for one re
I did place form.errors in the template. If I type the invalid data,
then it displays the errors. Problem is when I type in valid data, it
doesn't display anything and brings me back to the form with the data
I have entered. Every frustrating problem.
--~--~-~--~~~
When I submit the information with the form, for some reason, I keep
coming back to the form, with data I entered. I am not sure why this
is the case. It should take the data, and save to the file.
def add_post(request):
if request.method == 'POST':
form = forms.postForm(request.POS
1 - 100 of 142 matches
Mail list logo