> On 02 Jun 2015, at 04:57, Abhijit Chatterjee wrote:
>
> Hello everyone. I am new in django but I have been using web2py for sometime.
> Do we have anything like SQLFORM that automatically renders the ORM or we
> have redundantly call each tables and fields?
Tou have not explained what sqlfo
Hello,
I am trying to save post data and I get a error. I am trying to use enum
field.
prefs' is an invalid keyword argument for this function
Request Method:POSTRequest URL:http://127.0.0.1:8000/setPrefs/Django
Version:1.8.2Exception Type:TypeError
Here is my model
class UserPrefs(models.Mo
I guess I am missing something.
Is there no way to load jquery only once per page?
Use case: I have two widgets which need jquery. I want to use
these widgets inside the admin interface and on custom pages.
The admin interface has its own jquery and in jquery.init.js this gets done:
var django
I'm using Sqlite for my project database.
I need date and time in my model so i'm using this field.
date = models.DateTimeField()
On the result template (results.html), the time is correct (localtime
or TIME_ZONE in my settings.py)
The problem is, when i check the database on Django admin pag
Hi Hyunseo Yang,
SQLite does not save the timezone in the database. If you pass it a
datetime with timezone encoding then it calculates the UTC time that that
time represents and stores that.
It is explained here:
https://www.sqlite.org/lang_datefunc.html
As far as I understand whatever database
Hello everyone,
I think to do an app where i would save a directed graph.
The vertex and edges there must be dinamics.
The vertex can represent some Tag or Category... or something.
The edge who links the vertex can be N between two vertex and represent
some event or action... and let me explain h
Hi Rafael,
Assuming you have a static and limited set of actions, and they can only be
defined programmatically, I would do something like this:
class Vertex(models.Model):
some_field = models.CharField()
class Edge(models.Model):
from = models.ForeignKey(Vertex, related_name='outgoi
Which are Django packages for full stack development of an e-banking web
app based on P2P model. Any resources / frameworks would be of help.
Best
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
Thanks Erik, Defining custom actions its what i try to do!! because, the
user can add some custom type of Action and he need to specify what to do
with.
With this, the user can perform his own graph and rules to control the
vertex.
For example, a Contact of the business can be a Provider or a Cus
Any news? Hello?
On Sat, May 30, 2015 at 4:28 PM, George Silva
wrote:
> Context:
>
> Django 1.7.1
> PostgreSQL 9.4
>
> I have the following database entry in settings:
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.contrib.gis.db.backends.postgis',
> 'NAME': 'xpto',
>
Dears,
First I thx for ur attentions... and I novete in Django... but a have a
question...
Second:
I have this in my model:
class Actionplan(models.Model):
date_start_preview = models.DateField('Data Prevista Inicial',
blank=True, null=True)
date_end_preview = models.DateField('Data P
Can you post the entire traceback for the error, and the view code as well?
-James
On Jun 2, 2015 12:47 AM, "Shekar Tippur" wrote:
> Hello,
>
> I am trying to save post data and I get a error. I am trying to use enum
> field.
>
> prefs' is an invalid keyword argument for this function
>
> Reques
Are you saying that you can't access it as django.jQuery ?
On Tue, Jun 2, 2015 at 4:22 AM, guettli wrote:
> I guess I am missing something.
>
> Is there no way to load jquery only once per page?
>
> Use case: I have two widgets which need jquery. I want to use
> these widgets inside the admin in
Here is the trace:
Traceback:
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/site-packages/django/core/handlers/base.py"
in get_response
132. response = wrapped_callback(request,
*callback_args, **callback_kwargs)
File
"/Library/Frameworks/Pytho
Hi,
we had a very strange problem with the ordering of the JS files.
the jquery.init.js from django removed the jquery from us which had
jquery-ui loaded.
The problem is solved.
Thomas Güttler
Am Dienstag, 2. Juni 2015 17:24:56 UTC+2 schrieb ke1g:
>
> Are you saying that you can't access it
Hi,
I am new to Django and I am performing some iteration on a queryset. When I
use django_debug_toolbar to look at the SQL usage, I realised that Django
is actually calling the database once in each iteration. Is there a way to
make it call the database only once and somehow store it locally s
Hi,
I am new to Django and I am trying to reduce the number of calls to
database as it's slowing down the app. I am performing iteration over the
queryset and I used django_debug_toolbar to check the number of queries
made, and the number is huge. It looks like django is making a query call
to
Hi Cherie,
A `id__in` queryset lookup should issue a single query.
levels = Level.objects.filter(id__in=level_ids)
Cheers,
Simon
Le mardi 2 juin 2015 11:42:19 UTC-4, Cherie Pun a écrit :
>
> Hi,
>
> I am new to Django and I am performing some iteration on a queryset. When
> I use django_debug_
On Tue, Jun 2, 2015 at 11:48 AM, Cherie Pun wrote:
> Hi,
>
> I am new to Django and I am trying to reduce the number of calls to database
> as it's slowing down the app. I am performing iteration over the queryset
> and I used django_debug_toolbar to check the number of queries made, and the
> num
Hi guys,
I am planning on a bigger django project with a lot of functionality.
The thing is that I have NO experience with existing django-apps that might
fit and definetly need your help.
Can you give me a hint which existing (and stable) django-apps I could use
as a foundation for my project
*I hasve repeatedly tried now to set up the Django Virtual Environment
without any success! Just what am I doing wrong anyway?? I am at my "wit's
end" trying to figure out what the specific problem is.*
*c:\Users\SteveB\Desktop>virtualenv steve1*
*Using base prefix 'C:\\Python 3.5'*
*New pyth
i try to solve forbidden error bt its not working .
i m new in django so plz help me to solv this error
i attach
my templet
views.py
and url.py
if u need more thing then reply me i send it to u..
--
You received this message because you are subscribed to the Google Groups
"Django users" g
Hi am plugging away at learning Django and have done well so far (thanks to
great documentation and Stackoverflow) but I have run into a problem that i
cant seem to figure out.
I have a model that refers to another model that refers to another model.
example :
Class ServiceOrder
id -in
For some reason every time I try to go to my admin page it takes me back to
my home.html which is just :
Hi There
anyone know why this could be happening?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and st
Hi Jariel,
What URI are you accessing to get to your admin page?
Can you show us your urls.py?
Best,
Thomas
On Tue, Jun 2, 2015 at 1:46 PM, Jariel Arias wrote:
> For some reason every time I try to go to my admin page it takes me back
> to my home.html which is just :
>
> Hi There
>
> anyon
Can you post the error and traceback? It sounds like you may have an
encoding issue.
-James
On Jun 2, 2015 11:00 AM, "Chris Strasser" wrote:
> Hi am plugging away at learning Django and have done well so far (thanks
> to great documentation and Stackoverflow) but I have run into a problem
> that
hi Reiner I think what you want to do is controlled in the view not the
model.
in your view do something like this:
context = {'form':form, 'infotext': "some informational text"}
return render(request,'form.html', context)
then in your template you can refer to it as follows:
Just to add, if I use a curl request
curl -H "Authorization: Bearer $usertoken" -H "Content-Type:
application/json" -X POST -d
'{"user":"foo1","stock":"XYZ","prefs":"Likes"}' http://${endpoint}/addPrefs
I get a error: {"prefs":["\"Likes\" is not a valid choice."]}
If I use
curl -H "Authori
Hi James thanks for the response...
this line: {{item.customer_location.customer}}
. worked this morning and all last week now gives this error:
RuntimeError at /sto/
maximum recursion depth exceeded while calling a Python object
Request Method: GET Request URL: http://10.0.0.102:80
I just looked over your model again. Your save() override has a
super(Screens,...) reference, which doesn't match the model class.
That may explain why you are getting the invalid parameters error, since
you are probably calling the wrong save function from a different class.
I'd remove that save
James,
I have commented save in model code. I have also changed the prefs field to
be char(20) for now.
I still get
'prefs' is an invalid keyword argument for this function
- Shekar
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsu
Hi,
not sure what I've done but I don't get the error anymore, instead I got
nothing. No error, no image in the preview and no image after the saving
and displaying the article.
To your questions, yes and yes. I can find the image in the server (under
static/media/django-summernote/), and I can
IOError: [Errno 22] invalid mode ('wb')
detailed error message is as follows:
http://pastie.org/10219723#1,21
--
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
This doesn’t seem to be a Django issue to me… Can you install any other
packages with pip?
2015-06-02 20:12 GMT+02:00 mnz hz :
>
>
> IOError: [Errno 22] invalid mode ('wb')
>
>
> detailed error message is as follows:
>
>
> http://pastie.org/10219723#1,21
>
> --
> You received this message becaus
Hello Carl,
I really appreciate your comments and I agree with you. I'll put here soon
the code I'm writing, maybe this can be helpful for others too.
Thanks!
Em sexta-feira, 29 de maio de 2015 18:53:25 UTC-3, Carl Meyer escreveu:
>
> Hello Carlos,
>
> On 05/29/2015 03:19 PM, Carlos Ribas wro
Wait, what does your serializer look like? I found this in the traceback:
ile "/Users//PycharmProjects///modelserializer.py" in create
48. return Screens.objects.create(**validated_data)
Are you sure that you are referencing the right serializer and/or is the
serializer referencing the
Have you validated that the URL being generated in the final HTML (the
source HTML in the browser) is pointing to the right location? If not, I
would tend to agree with your assertion that the media settings need
tweaking.
-James
On Jun 2, 2015 1:17 PM, "hemulin" wrote:
> Hi,
> not sure what I'v
Posting the actual model code will probably help.
Your template has this:
item.customer_location.name
But you specified the issue later as this:
item.customer_location.customer
The former won't work per your summarized model definitions. The Location
model has no attribute called 'name'.
The
I'm not sure I understood your question.
If by "final HTML" you mean the rendered template which displays the
article, then there's nothing interesting here. I'm just passing the
article in the context to the template and in the template assigning in
various tags the relevant content ({% article
how do I get get-pip.py?
--
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 group, send email to djang
Here is my serializer
class UserPrefSerializer(serializers.ModelSerializer):
#user = serializers.ReadOnlyField(source='owner.username')
def create(self, validated_data):
print ("Validated data")
print (validated_data)
#return Screens.objects.create(**validated_data)
Steve
If you have uninstalled and reinstalled virtualenv exactly the way the
virtualenv docs require for Windows and you still get the same problem I
think your environment must be blocking things.
Maybe there is a virtualenv mailing list you could join and get some
help from virtualenv expe
James,
You are right. I am able to get past that issue.
The next stumbling block is with
null value in column "address_id" violates not-null constraint
DETAIL: Failing row contains (10, Likes, null, null).
Here is my curl
curl -H "Authorization: Bearer $usertoken" -H "Content-Type:
applicati
Sorry about that. What I meant was what do the URL's look like after the
template rendering completes (ie what does the browser see as the value for
your tags). Since it is breaking while editing the
document, that question is now moot.
Your media settings are probably OK (however I'm smashing to
Over ride the save() method on teh Actions:
class Actions(models.Model):
date_start_preview = models.DateField('Data Prevista Inicial',
blank=True)
date_end_preview = models.DateField('Data Prevista Final', blank=True)
date_start = models.DateField('Data Real Inicial', blank=True)
DHaval,
Attachments wont cut it.
Please paste the code into your email or into http://dpaste.com/
Also, a pyc file isn't a file that is readable by humans - you will need to
send the code from the py file.
You will need to also send the exact error.
Cheers
L.
--
let's build quiet armies f
https://pip.pypa.io/en/latest/installing.html
On Tue, Jun 2, 2015 at 7:37 PM, Steve Burrus
wrote:
> how do I get get-pip.py?
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails f
Here is my view.
request.data has the 2 fields I am passing however serializer.validated_data
has only prefs.
class AddToUserProfile(generics.CreateAPIView):
permission_classes =
(permissions.IsAuthenticatedOrReadOnly,IsOwnerOrReadOnly)
serializer_class = UserPrefSerializer
querys
The 'address' field is an FK to the Address model (hence the reference to
'address_id'), and you'll either need to 1) add null=True to the address
field definition in UserPrefs and update your migrations and allow a
UserPref model to not be connected to an Address model, 2) find the right
Address m
James.
address table already has a record of name xyz. Request object has a address
value of address: xyz.
As I am initializing serialize with request.data, why is it that I don't see it
in validated_data?
Do I need to add address_id to validated_data in my view?
--
You received this message
I've noticed a number of apparent session collisions (i.e., two or more
users getting the same session key and therefore each others session data)
on a site I manage. The site is on django 1.3.7, which shouldn't have any
issues with session key collisions (there were some in earlier django
vers
No, it looks like you need to set a model in the Meta class as part of your
ModelSerializer class.
http://www.django-rest-framework.org/api-guide/serializers/#modelserializer
Is "XYZ" a valid slug to retrieve that Address object? You probably need to
provide the PK value for the 'address' rather
James,
I was able to get thro with the save operation. It was quite a bit of
learning.
Meta section on the model existed but I was not populating validated_data
properly. I was under the assumption that
when I did
serializer=UserPrefSerializer(data=request.data)
seriazer object will be popu
53 matches
Mail list logo