thanks
V
On dec. 3, 07:49, "David Zhou" <[EMAIL PROTECTED]> wrote:
> On Wed, Dec 3, 2008 at 1:17 AM, Alex Koshelev <[EMAIL PROTECTED]> wrote:
>
> > To trim last colon wrap it with if statement:
>
> > {% if forloop.revcounter0 %},{% endif %}
>
> You can also do:
>
> {% if not forloop.last %},{% e
Hi,
I have three simple models Project and Member, where Project.member is
a ManyToManyField to User through Member
then I would like to add some post save action when a new member is
added to a project. Should I connect this signal to Project or to
Member? Of course, new members can be added on
Hi,
did you got any response or did you managed to solve your problem?
I've just started to search for a UUIDField, and it would be great to
have proper uuid columns for postgres.
If so do you plan to commit it to django_extensions?
Thanks, Viktor
On 2008 dec. 16, 22:53, gordyt
discussant = models.Discussant.objects.create(
user=User.objects.get(pk=2),
accepted=True,
submission=submission)
what gives my an "IntegrityError: PRIMARY KEY must be unique"
could someone enlighten me please how to as
my view calls
survey = get_object_or_404(models.Survey, {'pk': int(survey_id)})
and gives a ValueError: need more than 1 value to unpack, the full
traceback is at http://python.pastebin.com/m3f715909
I have no clue what the problem might be, especially as I've seen that
in the debug views I've
Hi,
I would like to run something like
["User",].expand(MyObject.objects.all().values_list('myfield',
flat=True)
but expand seemingly can't handle this operation.
I was trying MyValuesListQuerySet.insert, but it fails as well (This
is I can understand though. :))
could someone help me on the b
dFormSet.save, or is there a
better way?
If so, how can I assure that the ProjectForm won't get written to the
database until the Files are saved?
I know these are quite a few question, and I would be happy to get
answers even to a subset of them.
Thank you, Viktor
--~--~-~--~~---
#x27;Abstract',
>>> document='no/doc', topic=topic)
>>> submit2.attendee = attendee
>>> submit2.save()
Traceback (most recent call last):
File "", line 1, in
File "/home/nagyv/workspace/MKKE/conference/models.py", line 212, in
Hi,
I have the following abstract model, but it's child models fail saving
with RuntimeError: maximum recursion depth exceeded
class AcceptedRoleAbstract(models.Model):
'''
Represents a User that should accept a role
E.g.: Discutant, Reviewer
'''
user = models.OneToOneField(
Hi,
as I couldn't find an already existing application to provide a simple
PayPal donate button, and store and present some donor info, I wrote
one. I hope it will be useful for others as well:
available at
https://launchpad.net/django-donation
have a nice day!
V
--~--~-~--~~---
tion rules (that are
likely to be preprogrammed for every available field type)
do you know of such an existing project?
thanks, Viktor
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
T
the Attachment as a
GenericTabularInline.
Is there an already available solution for this?
Thanks, Viktor
[1]:
http://docs.djangoproject.com/en/dev/ref/contrib/admin/#using-generic-relations-as-an-inline
--~--~-~--~~~---~--~~
You received this message because you are subscribed
Since yesterday, I've put together a small testapp to better present
my problem.
I have the following models.py file:
from django.db import models
class AbstractTaskOrProject(models.Model):
parent = models.ForeignKey('AbstractProject', null=True)
class Meta:
abstract = True
class Abstra
On nov. 14, 02:13, Preston Holmes wrote:
> I'm setting up a conference website where a submission will have one
> or more "reviews"
>
> I've got the reviews set as inlines for submissions in the admin
>
> The submission model has a "status" field that needs to go through
> steps like "submitted" a
hi,
I would like to write a signal handler that logs the user in when its
account gets activated.
My signal handler is registered with user_activated from django-
registration, and my initial guess was this:
def log_user_in(sender, **kwargs):
login(kwargs['request'], kwargs['user'])
user_act
ne give me an idea how to solve this problem?
thx, Viktor
--
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+unsubsc
hi,
I have the following project structure
/apps
/externals
/static
/templates
settings.py
manage.py
under the externals I have already translated applications that are
developed outside my system (e.g. django-registration), under apps, I
have some custom built applications (e.g. a custom backen
is this really a bug?
thanks for your help,
Viktor
--
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
meone share his/her thoughts on this issue, please?
thanks, Viktor
--
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
definitely, the best way would be to use a form factory with the type
() function. There are many articles about this around the web, for me
the best introduction was
http://www.b-list.org/weblog/2008/nov/09/dynamic-forms/
moreover, you might find useful the code of django-questions[1]
have a nic
n the messaging app
thanks,
Viktor
--
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...@googlegroup
I have a problem with an update_object generic view and ImageField. The
create_object view works great, but update_object doesn't upload the
image?! I set the mimetype ;)
here is the snippet from my object_form.html template (both
create_object and update_object use the same template):
I have two applications in my project:
project
app1
models.py
app2
models.py
project/app1/models.py:
class Cls1(models.Model):
...
project/app2/models.py:
from
This can be a bug, or I'm doing something terrible wrong...
This is how my model looks like:
class Score(models.Model):
. . .
class Round(models.Model):
. . .
class Game(models.Model):
round = models.ForeignKey(Round)
. . .
def save(self):
spacedman wrote:
> So I'd say you weren't doing something terribly wrong, but it might
> not be a bug either. If this behaviour is desirable (and I cant see why
> it isn't) then it needs a bit of rewriting...
Reading the documentation and this mailing list, I came to a silly idea
that django'
Probably I'm doing something wrong... But I can't figure out what to put
in my model_form.html template, so the create_object and update_object
generic views work well.
For now, I figured out that I have to put {{ form.field }} and {{
form.field_file }} but it works just for createing, this do
Just a suggestion.
Why not integrate this ecommerce system with TinyErp
http://tinyerp.org/. i.e. use django as a web interface for TinyErp.
TinyErp is written in python, well tested and for a long time used in
production.
It has his own ORM, not as sophisticated as Django's, but has very
sim
or you can just define in Your settings file:
BASE = os.path.dirname(__file__)
and do:
TEMPLATE_DIRS = (
os.path.join(BASE, 'templates')
)
and your settings will be location indipendent.
jrs wrote:
> I have solved this by using a settings_env.py file. At the top of my
> settings.py file
When I define a model:
>>> class Test(models.Model):
>>> ... some other fields ...
>>>bool_field = models.BooleanField(default=True)
Django generate next sql:
CREATE TABLE `test_test` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
... some other fields ...
`bool_f
Adrian Holovaty wrote:
> Default values aren't created at the SQL level -- they're enforced at
> the Django DB-API level.
OK, I figured that out the meantime, but it doesn't work for the
BooleanField.
When I define the default value for my BooleanField to True and then
create an object this fi
OK, I found the problem...
The problem is that manipulators don't look for the default value of the
field if the field isn't set as editable=False, which is bad because I
may (I have) objects that can be created by different users, and not all
users can set all attributes. When some group of u
It seems that we made similar projects :-/. Dubbled the work...
http://sourceforge.net/projects/pybrowser (it's still in svn - no
releases - and it works just on posix sistems.
va:patrick.kranzlmueller wrote:
> i�m working on a file-browser for/with the django-admin.
> screenshots are here:
> h
? Or how to
use json syntax in the template in general?
thanks, V
[1]: http://toastdriven.com/fresh/more-multiresponse
--
Viktor Nagy - http://viktornagy.com
PhD student
Toulouse School of Economics
--~--~-~--~~~---~--~~
You received this message because you ar
Hello,
I've set up apache to validate my users using PythonAuthenHandler as
described in the documentation
(http://www.djangoproject.com/documentation/apache_auth/). This part
works like charm :), but I would like to get a more fine grained
control over the accessed url (not served by django).
A
I just noticed that
yourqueryset[0].save()
is not the same as
yourqueryset0 = yourqueryset[0]
yourqueryset0.save()
at least the first didn't gave the expected outcome for me
see the attached test (it is enough to look at app/tests.py)
is this true or both my test and real code are
Hi!
I need a url in a blocktrans message, but I have no clue how to do it.
it would be intuitive to use
{% blocktrans url app.views.add as createurl %}
and then {{ createurl }}
but it didn't work for me.
could someone help me, please!
V
Hi!
I would like to write a simple test to see that the files uploaded
through a form are properly saved. Could someone tell me what data
should I post in the testclient?
thanks, Viktor
--~--~-~--~~~---~--~~
You received this message because you are subscribed
27;headers'] dictionary, and add all of its elements to the
HttpResponse object.
How would you achieve this?
V
--
Viktor Nagy - http://viktornagy.com
PhD student
Toulouse School of Economics
--~--~-~--~~~---~--~~
You received this message because you are su
Hi,
I just can't figure out how to use django-profiles. I've an
application called ``membership``, and there I have a models.py file
containing:
class UserProfile(models.Model):
user = models.ForeignKey(User, unique=True)
affiliation = models.TextField(blank=False,
uch a simple model a good idea?
Thanks for you help!
Viktor
--
Viktor Nagy - http://viktornagy.com
PhD student
Toulouse School of Economics
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" gr
Hi everyone.
I'm trying to create comment overview page. I want to select all
content entries that were recently commented. The problem is that I
don't know how to do that. In SQL I would run something like
select distinct object_pk from (select * from django_comments order by
submit_date desc)
Tim Chase wrote:
> but Django lets you drop to raw SQL pretty easily,
> so it shouldn't be a big deal.
Thanks. I think I will stop on raw SQL.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Hi everyone.
I'm trying to generate slugs automatically and disallow user to
interfere with this. I think way to go is something like:
class Entry(Model):
title=CharField(max_length=100)
slug=SlugField(default=slugify(...title...))
but I have no idea how to pass title field (or at lea
Why not to add dots to your regexp? For example, [\w\d\-\.]+ ?
On Jul 9, 3:36 pm, Dids wrote:
> Hi,
>
> I'm struggling to get the regex right in my urls.py file to match a
> url with a dot inside it. (think ip address).
>
> for exmaple :
> http://servername/Url.With.Dot
>
> I'm not even
It did the job. Thanks!
On Jul 9, 3:51 pm, Jonathan Buchanan
wrote:
> 2009/7/9 Viktor Semykin :
>
>
>
> > Hi everyone.
>
> > I'm trying to generate slugs automatically and disallow user to
> > interfere with this. I think way to go is something like:
&
Hi everyone.
I use django.views.generic.create_update.create_object to allow users
to post new entries on my site.
How can I make model automatically save the user currently logged in?
Model like
class MyModel(Model):
user = ForeignKey(User)
--~--~-~--~~~---~--~---
Hi,
I've created a small application django-paypal, you can check it out from
https://launchpad.net/django-donation
the first site using it is my Karin Dom sponsorship page, feel free to have
a look at it, and support us/them if you like:
http://viktornagy.com/karin-dom/
V
Hi,
I've put together a nifty export to csv application. You can check it out at
https://launchpad.net/django-export-csv
To get the code immediately just run: bzr branch lp:django-export-csv
an overview file and tests are included as well
If there is interest, I might add date_based "subviews".
10
(production server) upon python server (python ... runserver) - all
work very well.
The issue was reproduced when the project Apach + WSGI is hosting.
I will be grateful for any suggestions.
Thanks,
Viktor Burdeinyi
--
You received this message because you are subscribed to the Google Groups
Thank you, Karen
The issue was solved by setting export LANG="ru_RU.UTF-8" in /etc/
apache2/envvars
Viktor Burdeinyi
On 16 мар, 13:50, Karen Tracey wrote:
> On Tue, Mar 16, 2010 at 6:09 AM, Viktor Burdeinyi wrote:
>
> The default Apache setup on Ubuntu seems to include a LA
following visit:
1. save the event
2. use the stored token to create the event at gcalendar as well
I have problems with points First visit/2 and First visit/4 (don't
really know how should I store the token as I can't store it as a
python object, what would be the best).
Do
Hello,
I am kind of new to django, and trying to build a small app just to
learn it (it is an app to interact with Google Calendar and Docs).
My problem is, that django seemingly always caches "something". I
tried to get rid of this behavior by adding either
CACHE_BACKEND = 'dummy:///'
or
CACHE
Hello,
I've a very simple views file, that I would like to test with doctests.
For example a partial code is this:
@require_POST
def save(request, type):
'''
This adds a new element to the queue
>>> response = c.post('/queue/new/email', {'title': 'MyTitle'})
>>> response.status_c
Error as well, but it fails with the same error
try:
q = models.Queue.objects.filter(type=type, status=0)[0]
except models.Queue.DoesNotExist, IndexError:
return WebAPIResponseError(request, DOES_NOT_EXIST)
Any ideas how to catch the error?
Viktor
--~--~-~--~~--
Hi 5!
I have the following files
myproject/urls.py with a line
(r'^$', include('coosci.webapp.urls')),
then I have
myproject/coosci/urls.py with a line
(r'^projects/join/(?P\d+)/$', 'join_project'),
and finally in my template
{% url webapp.views.join_project project_id=project.project.id %}
a
http://code.google.com/p/zmaj/
is an application for Linux system administration. It's intended to be
replacement for Webmin (Yes, a big bite, I know... But I concluded
that it's easyer to write the whole application from scratch then to
learn Perl and write modules for Webmin ;)
Currently 4 mod
On 8/24/06, Sean Schertell <[EMAIL PROTECTED]> wrote:
> Hey this sounds like a great project! Any plans to integrate mail
> user and ftp user management?
Yes, there is a plan to integrate mail and ftp user management. It
will be the part of the SMTP and FTP server configuration. But there
is a lo
On 8/24/06, didier Belot <[EMAIL PROTECTED]> wrote:
> What is the libuser that's imported in zmaj.users.views.py ?
It's a python library that implements a standardized interface for
manipulating and administering user and group accounts. It's developed
by RedHat, but can be found for every linux
On 8/24/06, didier Belot <[EMAIL PROTECTED]> wrote:
> About the service app: it is very distribution specific!
Yes, I know :-/ I'm one of http://www.atomixlinux.org developers, and
because of that I don't have time to test it on other Linux
distributions (Atomix is derived from Fedora)... The pla
On 8/24/06, Rasjid <[EMAIL PROTECTED]> wrote:
> Your project is now bookmarked, and time allowing I hope to be able to
> contribute.
I would be very glad to incorprate into Zmaj any changes and modules
You provide me with. :) Every contribution is welcome. :)
--~--~-~--~~
t QuerySet
info_dict = {'queryset' : QuerySet(model=MyModel)}
2. Why does the object_list return 404 when my table is empty, instead
of rendering the template with object_list variable beeing an empty
list.
Thanks, Viktor
--~--~-~--~~~---~--~~
You r
Hi everyone,
Before starting I want to give one Hip Hip Hooray for the m-r branch :)
Now to start ;).
There is one thing that bugs me with the naming convention in Django.
All classes in the django/forms have the same *Field* ending, which is
100% OK because they really are fields.
But also
Ok, I still think that its conceptually wrong to have two completely
different sorts of objects shareing the same name... But You're the
bosses ;)
Thanks for the time.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
Glenn Tenney wrote:
> As a friend of mine reminded me, part of your perception feeding that
> conception is that you're still thinking of these as being columns in
> a table... when in fact they are classes derived from FormField (and
> you can derive your own classes from FormField or even from o
Hello,
I have a model that uses a stored procedure + a column outside of django's
control for specialized selects. My problem is that I don't see a good way
of testing my related python code for that model.
Since I need to execute some SQL code at the beginning of each test, right
after the f
Hi,
With django 1.3 alpha 1, I was using the following piece of code in my
urls.py without a problem:
cache_page(views.IndexView.as_view(), timeout)
When upgrading to 1.3 beta 1, I got this error:
Environment:
Request Method: GET
Request URL: http://localhost:8000/bg/
Django Version: 1.3 be
Hello,
I have a stored procedure which creates a cursor for a query, and also
returns the total count for the (unlimited) query. The query itself can be
mapped to my model if ran through the raw method of the manager. However,
I'm interested in using the procedure, rather than 2 separate querie
Hi,
Consider the following models:
class Foo(models.Model):
name = models.CharField(max_length=100)
class Bar(models.Model):
name = models.CharField(max_length=100)
city = models.ForeignKey(Foo)
How can I inline the admin model form for Foo into Bar, so that I can add
new Foo items if
Hello,
I'm having a bit of a problem providing a custom readonly field, which is
defined in the form.
The field is defined in the form, as such:
class Form(forms.modelForm):
field = myCustomField()
The field is also associated with a custom widget, which is set in the
form's __init__.
it is
Hello,
I have a database function that returns the necessary data for constructing
a bunch of related objects in one go. One of the objects has a OneToOne
relationship with my main model instance, and it doesn't exists for every
object of the main model. Since the main model has a reverse relat
Hi Tobias,
Did check the pipeline logic at
python-social-oauth?
http://python-social-auth.readthedocs.org/en/latest/pipeline.html#authentication-pipeline
There is an ability to inject your custom logic into authenticating process.
And why did you decide to take B way? Or why did you reject A?
Hi,
the problem was with defining the managers on the Proxy model. As more
recent docs say, managers should be defined separately:
https://docs.djangoproject.com/en/dev/topics/db/models/#proxy-model-managers
this is already fixed in zinnia 0.14.
On Wednesday, December 18, 2013 7:30:53 PM UTC+1
Which Django book do you recomend to by from PACKT ?
--
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, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this g
Jan 2019, 16:58 Lehner Viktor, > wrote:
>
>> Which Django book do you recomend to by from PACKT ?
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Django users" group.
>> To unsubscribe from this grou
.2 and postgresql. Attach archive with
sources. Project contains small test, after running him, you will get
exception like this: ValueError: Related model 'testapp2.App2' cannot be
resolved.
So is it problem in django or maybe i dont understand something ?
Regards, Viktor Lomakin
-
This is confusing me.
In the topic guide on Aggregation
(https://docs.djangoproject.com/en/1.10/topics/db/aggregation/#cheat-sheet),
there is an example in the cheat sheet as follows:
# Cost per page>>> from django.db.models import F, FloatField, Sum>>>
Book.objects.all().aggregate(...pri
-)
Thanks
On Monday, 6 February 2017 13:24:49 UTC+1, Viktor Bale wrote:
>
> This is confusing me.
>
> In the topic guide on Aggregation (
> https://docs.djangoproject.com/en/1.10/topics/db/aggregation/#cheat-sheet),
> there is an example in the cheat sheet as fol
tion and you should be able to figure it out
> yourself.
>
> On Wednesday, February 8, 2017 at 12:41:24 PM UTC-5, Viktor Bale wrote:
>>
>> Hi all
>> No takers, eh? Does this means it also confuses other more experienced
>> people, or that it's a silly questio
Can i try to make a patch and assign ticket to me?
пт, 9 авг. 2019 г. в 12:17, Carlton Gibson :
> Hi Viktor,
>
> Yes, AlterField should add the dependency. Manually edit the migration for
> now. In your example, making it:
>
> ```
> dependencies = [
ploaded file
to a models.FileField field?
thanks for your help
Viktor
--~--~-~--~~~---~--~~
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
Hi guys, someone here has programmed a cryptocurrency arbitrage bot???
--
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, send an email
to django-users+unsubscr...@googlegroups.com.
81 matches
Mail list logo