Re: login()/logout() with valid user and request not attaching user to session

2022-10-22 Thread Jordan Edmunds
I figured out the issue. The django_sessions database *does* get updated
with entries when a login is successfully attempted. I'm not entirely sure
why I initially observed that it wasn't. I may have been checking the wrong
database. This is not an issue with django. I have tracked down the
underlying issue to be that the cookies and CSRF tokens were not being
transmitted on request/responses - this was an issue in my frontend. Now
(almost) fixed.

On Sat, Oct 22, 2022 at 11:05 AM Jordan  wrote:

> So I have some rather bizarre behavior on my hands - I am trying to use
> session authentication to login a user. I am able to login/logout through
> the django admin console just fine. However, when I explicitly call
> django.contrib.auth.login(), nothing happens. No errors are thrown, the
> login method executes to completion, but I am not logged in. I can tell
> because (1) When re-loading the user admin console it asks me to
> authenticate and (2) no changes are made to the Session object database. It
> looks exactly the same before the login call as after the login call.
>
> The same is true of logging out - neither method appears to be
> attaching/detaching users to sessions. I have replicated this behavior with
> non-superusers. No errors are ever thrown, but no sessions are ever added
> or deleted. This is utterly bizarre to me - and I don't know what to do.
> Any suggestions for debugging would be immensely helpful - obviously
> authentication is a critical part of our application, and I can't move on
> until I fix this.
>
> I have uploaded my settings.py in a repo below. Some notes on my
> configuration - I am using the email field as my username, and am using
> dj-rest-auth <https://dj-rest-auth.readthedocs.io/en/latest/index.html>
> for authentication. There seems to be nothing wrong with dj-rest-auth: when
> I pass in a valid email/password combination, it successfully calls
> django's authenticate() method, which creates a valid user object, and then
> passes it to django.contrib.auth.login() along with the request. No
> exceptions are thrown inside the login() function - which I verified by
> stepping through it line-by-line with breakpoints. I am using the default
> runserver command as my django server.
>
> Where is the actual code in the login() function that makes changes to the
> database? The only thing I can think of is that somehow the
> user_logged_in.send() signal is responsible, but this doesn't appear to be
> directly attached to any code I can find that could plausibly make database
> modifications.
>
> https://github.com/edmundsj/django_auth_debug
>
> --
> 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 view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/1a73c0d9-da20-4d7e-8d65-50c279ccd5f2n%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1a73c0d9-da20-4d7e-8d65-50c279ccd5f2n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAJkO6Yz%2BhSVo%2B0TH74AW%3DdyQhpPfBsoYW4Gxcv8cKf%3DEZmEqrA%40mail.gmail.com.


login()/logout() with valid user and request not attaching user to session

2022-10-22 Thread Jordan
So I have some rather bizarre behavior on my hands - I am trying to use 
session authentication to login a user. I am able to login/logout through 
the django admin console just fine. However, when I explicitly call 
django.contrib.auth.login(), nothing happens. No errors are thrown, the 
login method executes to completion, but I am not logged in. I can tell 
because (1) When re-loading the user admin console it asks me to 
authenticate and (2) no changes are made to the Session object database. It 
looks exactly the same before the login call as after the login call. 

The same is true of logging out - neither method appears to be 
attaching/detaching users to sessions. I have replicated this behavior with 
non-superusers. No errors are ever thrown, but no sessions are ever added 
or deleted. This is utterly bizarre to me - and I don't know what to do. 
Any suggestions for debugging would be immensely helpful - obviously 
authentication is a critical part of our application, and I can't move on 
until I fix this.

I have uploaded my settings.py in a repo below. Some notes on my 
configuration - I am using the email field as my username, and am using 
dj-rest-auth  for 
authentication. There seems to be nothing wrong with dj-rest-auth: when I 
pass in a valid email/password combination, it successfully calls django's 
authenticate() method, which creates a valid user object, and then passes 
it to django.contrib.auth.login() along with the request. No exceptions are 
thrown inside the login() function - which I verified by stepping through 
it line-by-line with breakpoints. I am using the default runserver command 
as my django server. 

Where is the actual code in the login() function that makes changes to the 
database? The only thing I can think of is that somehow the 
user_logged_in.send() signal is responsible, but this doesn't appear to be 
directly attached to any code I can find that could plausibly make database 
modifications.

https://github.com/edmundsj/django_auth_debug

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1a73c0d9-da20-4d7e-8d65-50c279ccd5f2n%40googlegroups.com.


Re:

2019-11-20 Thread Jordan Micle

>
> def detail(request,user):
> print('hobbies : ', user.hobbies)
> return render(request, 'company/detail.html',{'details':user})
>

change detail function like this 
def detail(request):
print('hobbies : ', user.hobbies)
return render(request, 'company/detail.html',{'details':request.user})

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/3f6f3d82-63cf-45ff-99da-e008d2cd3841%40googlegroups.com.


where I should send file?

2019-11-12 Thread Jordan Micle
I am going to send to storage from my server.
That storage url is like this
ftp://***.***.com
how can I send file to here?
I tried to use ftplib but says 
 "socket.gaierror: [Errno 11001] getaddrinfo failed"
like this.
I think this storage is located on s3,  I set this storage on washabi s3.
and Host is s3://***.***.com
and Bucket is *
So where I should send file?
ftp://***.***.com or s3://***.***.com
Thanks for reading.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/cf39b10f-c087-40ce-8071-0b4c3cde6c6b%40googlegroups.com.


Re: I have two models which are associated to each other through a ForeignKey how to delete the child model object without affecting parent model object

2019-11-09 Thread Jordan Micle

>
> when you use foreingkey you will set these options
>
here, change like this
on_delete=models.SET_NULL 
user = models.ForeignKey(User, null=True, on_delete=models.SET_NULL)

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2ea6ad8b-022e-4db1-adf0-9642565eb608%40googlegroups.com.


Making Django Form dynamically

2019-11-05 Thread Jordan Micle
in general when we define django form we set the model of django in class 
Meta, like below

class Form(forms.ModelForm):

class Meta:
model = ModelName
fields = '__all__'



But I am going to set this ModelName dynamically
like this.
class Form(forms.ModelForm, modelparameter Model):

class Meta:
model = Model
fields = '__all__'

Is that possible?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7c466d3c-d9da-4f42-8c7b-e2a6428aa235%40googlegroups.com.


Set the model of Form automatically?

2019-11-05 Thread Jordan Micle
In general we create form and set the model in class Meta


class Meta:
   model = SampleModel

but I am going to set the model automatically.
so I am going to make form dynamically.
Is it possible?

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/f67d17ba-53ac-4707-891a-23f02589a876%40googlegroups.com.


Re: beginner's question

2019-11-05 Thread Jordan Micle

>
> cd mysite
>
input this command 

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/74b9e2cf-ed15-4636-ad91-d22839cb84f3%40googlegroups.com.


Re: beginner's question

2019-11-05 Thread Jordan Micle


if you are going to check the version of installed django

django-admin --version

>
>

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/31f8f64b-19b0-48cb-9471-08c0cf2a1f28%40googlegroups.com.


Re: Help with manage.py help

2019-11-02 Thread Jordan Micle
That error occur because you didn't install django.
Or you didn't activate the environment

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5cf44c4a-f26a-4839-b72e-292e8a9d3695%40googlegroups.com.


Re: How does django pass data through post?

2016-12-01 Thread Jordan W
Daniel, you nailed it! I didn't have the name specified. Adding that makes 
it propagate through!

On Monday, November 28, 2016 at 6:34:19 PM UTC-6, Jordan W wrote:
>
> Hi,
>
> I have been working on a small project for myself and some friends, and I 
> seem to have hit a hitch in getting it to work as expected.
>
> In my detail view, I have a small simple form:
> 
> {% csrf_token %}
>Prepare
> 
>
>
> My main list view and detail view are class based views, with me 
> attempting to use a FBV for prepare because it seems simpler to understand. 
> I've put a breakpoint in the "action" view, and tried to inspect the 
> request and see data from clicking the button come through, but I don't see 
> it. I am clearly missing something about how django sends POST data. I have 
> tried adding the following in bold to see how to get the data through, as 
> well as adding *args, **kwargs, as well as positional and named keyword 
> arguments to my "action" FBV:
>
> http://obj.id> }}" objid="{{ obj.id <http://obj.id> }}"*>
> {% csrf_token %}
> *{{obj.id <http://obj.id>}}*
> *http://obj.id>}}" />*
>Prepare
> 
>
> If anyone can explain what I'm missing, it'd be greatly appreciated!
>

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d75827d7-99b8-4f1e-bd4e-dff5dc000b52%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How does django pass data through post?

2016-11-28 Thread Jordan W
Hi,

I have been working on a small project for myself and some friends, and I 
seem to have hit a hitch in getting it to work as expected.

In my detail view, I have a small simple form:

{% csrf_token %}
   Prepare



My main list view and detail view are class based views, with me attempting 
to use a FBV for prepare because it seems simpler to understand. I've put a 
breakpoint in the "action" view, and tried to inspect the request and see 
data from clicking the button come through, but I don't see it. I am 
clearly missing something about how django sends POST data. I have tried 
adding the following in bold to see how to get the data through, as well as 
adding *args, **kwargs, as well as positional and named keyword arguments 
to my "action" FBV:


{% csrf_token %}
*{{obj.id}}*
**
   Prepare


If anyone can explain what I'm missing, it'd be greatly appreciated!

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4beeade8-d1da-4d56-8cf5-9855d13eeb8a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Mobile eCommerce with Django

2016-03-23 Thread Jordan Koncz
I'm working on a Django back-end that provides an API (using Django REST 
Framework) for a mobile app. I'm looking to add eCommerce functionality to 
this back-end, with all of this functionality being used by the mobile app 
via the API.

The eCommerce functionality needed is the usual standard stuff (products, 
cart, checkout, orders, payment gateway integration etc.), but it will need 
to be flexible enough so that I can create some relations between my 
existing models and the eCommerce models (particularly with products).

*Has anyone successfully implemented something like this before? If so, 
what did you use?*

I've tried using Django Oscar and Django Oscar API, but ended up ditching 
this approach as it seemed like it was really only suited to being used for 
an eCommerce website so it felt like I was wrestling with Django Oscar to 
get things working completely via a REST API. There was also a lack of 
documentation for using Django Oscar to provide eCommerce functionality via 
a REST API.

I've also looked at external options like Moltin which provides eCommerce 
functionality via an API, but I don't like the thought of needing to 
implement functionality at some point in the future which isn't available 
in Moltin and having to completely scrap Moltin or do some tedious 
workarounds to implement the functionality.

I'm now looking at the option of Django Shop, which [according to the 
documentation](http://django-shop.readthedocs.org/en/latest/reference/serializers.html)
 
seems like it would support using all of its functionality via a REST API. 
Does anyone have experience with using Django Shop like this?

*TL;DR: Looking for options for providing eCommerce functionality that is 
used entirely by a mobile app via a REST API.*

-- 
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 django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/57585783-7dc0-4033-85b7-712c5b41fcff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


How do I make my form process data and output in another page?

2014-07-21 Thread Jordan S
Hi, I'm trying to make a molecular mass calculator webpage, where a user 
inputs a chemical formula and gets the mass as a result. I've made this 
work in python using raw_input(), but now I'd need to use a form with 
django. 

I have the html form set up, but when I click "submit", the page just shows 
itself again.

What I want to happen is:

1. User inputs formula in form on index.html(ex. H2)
2. Form data is processed using the code that I put in the result view
3. Result is outputted in result.html

However, I'm not sure how to do this, as I've looked through the tutorial 
and form docs.

Here is my views.py:

   1. from django.shortcuts import render
   2. from django.db import connection
   3. from django.http import HttpResponseRedirect
   4. from django.core.urlresolvers import reverse
   5. import sys, re
   6.  
   7. # Create your views here.
   8. def index(request):
   9. if request.method == "POST":
   10. return HttpResponseRedirect(reverse(
   'MolecularMass:result'))
   11. else:
   12. return render(request, 'MolecularMass/index.html')
   13. def result(request):
   14. c = connections['default'].cursor()
   15.  
   16. def FindEndParentheses(separated):
   17. count = 0
   18. for index, val in enumerate(separated):
   19. if val == ')':
   20. count -= 1
   21. if count == 0:
   22. return index
   23. elif val == '(':
   24. count += 1
   25. raise NameError('Please close the parentheses')
   26. def GetAtomicMass(val):
   27. c.execute("SELECT Atomic_Weight FROM Elements WHERE 
   Atomic_Numer=%s" % val)
   28. return c.fetchone[0]
   29. def Parser(separated, total):
   30. if len(separated) == 0:
   31. return sum(total)
   32. val = separated[0]
   33. if val == '(':
   34. end = FindEndParentheses(separated)
   35. total.append(Parser(separated[1:end], []))
   36. return Parser(separated[end + 1:], total)
   37. elif val.isdigit():
   38. total[-1] *= int(val)
   39. else:
   40. total.append(GetAtomicMass(val))
   41. return Parser(separated[1:], total)
   42. def CalcMolecularMass(formula):
   43. separated = re.findall(r'[A-Z][a-z]*|\d+|\(|\)',
formula)
   44. return('The molecular mass of {} is {:.3f}\n'.format(
   formula, Parser(separated, [])))
   45. content = CalcMolecularMass(formula)
   46. return render(request, 'MolecularMass/result.html', content)
   
My index.html:


Enter a chemical formula to get its molecular mass

{% csrf_token %}





My result.html:


{{ content }}


-- 
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 django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2feffc32-36f1-49c0-9561-ce9945ffe12d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Field available via Django shell but not via web application (crossposted from StackOverFlow)

2011-11-02 Thread Jordan
Yes, it does work in runserver, as might be expected since runserver
uses exact same environment as the shell.

So that established, how can I fix it?

On Nov 1, 9:04 pm, Andy McKay  wrote:
> Is this using the Django built in runserver or some other way of serving
> pages? If not try using runserver.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Field available via Django shell but not via web application (crossposted from StackOverFlow)

2011-11-01 Thread Jordan
On the web page, I get the following error:

FieldError at /foo/bar/
Cannot resolve keyword 'foos' into field. Choices are: __unused__,
[snip]

The problem code is

User.objects.filter(foos__name='bar')

When I run this in the shell, it works and I get a recordset:

>>> User.objects.filter(foos__name='bar')
[]

But on the webpage I get the exception above.

Already checked:
 - INSTALLED_APPS are identical for both settings
 - runserver version also works (as would be expected)
 - User used is identical in both cases and is
`django.contrib.auth.models.User`
 - related names for the shell's User and the web app's User are
*definitely* different. User._meta.get_all_related_objects() in the
shell displays around 7 more related fields than the if I dump that
from the web app.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Stability of django.utils.crypto?

2011-09-01 Thread Jordan
According to the stability page (https://docs.djangoproject.com/en/dev/
misc/api-stability/):

"Most of the modules in django.utils are designed for internal use.
Only the following parts of django.utils can be considered stable..."

django.utils.crypto is not listed as one of the stable modules.

However, the module is used in a number of places in the Django code.
It looks as though their use across both the 1.3 and development
version is pretty stable.

So I guess I'm wondering whether it's okay to use the main functions,
constant_time_compare and salted_hmac, in my own Django code.

Thanks

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django rosetta: a way to automatically create po files for the missing languages

2010-06-19 Thread Jordan
Hello,

What is the best way to make Django Rosetta automatically create po
files for the missing languages? I want to minimize the process of
adding new language.  My idea is to make Django Rosetta read the
languages from the settings.py file, and after that execute the
makemessages command somehow. The question is: what is the best place
to execute that command and how? I will be very thankful if you give
me some directions. Thanks.

Jordan Jambazov

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Django-CMS: Project name prefix in the URL

2010-02-13 Thread Jordan
The problem is that the project name is beeing appended in the URL
when using the URL filter. For example, when I use the filter to get
the URL of the news page, the filter returns "/project_name/news/",
but it should return just "/news/". I have no idea what should I fix
that and hope someone will give me a direction to work at. :)

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Wanted: someone to customize shipping module in Satchmo

2010-02-02 Thread Jordan
We need someone to customize the shipping module in Satchmo.  If this
is something you have done or think you have the skills to do please
send information about how much time it will take, per hour cost and
when it can be ready.

-- 
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.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



help with a small project

2009-06-30 Thread jordan

I have an idea for a project but I don't have enough time to do it
myself. I'm hoping to find a django hacker looking for a small side
project for some extra cash.

-
Ideally you are someone interested in startups who is shopping around
for a co-founder. It doesn't have to be this particular project, but
this might be a good test to see if we can work well together. I know
that's a long shot, but I thought I'd throw it out there.
-

I'm looking for someone who is:

within 3 timezones of CST (I'm in the Midwest)
good at django with a couple of sites under their belt -or- looking
for a project to get better at django
relentlessly resourceful
ok with a client who is a programmer and will code along side of you.
ok with just a few hours here and there. I don't think I can afford a
large chunk of someone's time.

If you're a full-time freelancer, this probably isn't the gig for you.

The project is a generic data tracking app.  My plan is to use it as
the back end for a ton of sites in a "throw it at the wall till
something sticks and makes some money" kind of way.  I have a data
model and a lot of experience with this sort of data entry site. I
think it could be effing awesome.
--~--~-~--~~~---~--~~
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...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Django doesn't translate the "timesince" filter.

2009-06-24 Thread Jordan

Hi. :)

The problem is that the timesince doesn't get translated in my Django
application. All other parts of the site are translated without a
problem, but this certain filter cannot be translated. But when I
request the page via AJAX this messages get translated without a
problem (in Bulgarian). Maybe the cause of this problem is connected
with the request and the way it's done. Help! :)

Jordan

--~--~-~--~~~---~--~~
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...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Scientific Data Frontend with Django

2009-06-18 Thread jordan

I've been wanting to do a similar kind of project for a long time.
Just haven't found anyone else who was interested.

So, if anyone wants to try to build something like this, send me a
note.

Jordan

On Jun 18, 2:11 pm, Vincent  wrote:
> Good question. Don't know. My guess is that if you just want to show
> the data in a view using data structures Django knows might be
> quicker. However, if you are going to process the data (graphs,
> summary stats, etc.) you might prefer to have numpy arrays to work
> with.
>
> Vincent
>
> On Jun 18, 2:02 pm, Blaine Booher  wrote:
>
> > Thanks for the link, Vincent.  Is it easy to have the django view system
> > (generic views) use a PyTables data structure, or would that be a pretty
> > large feat by itself?
>
> > Definitely worth considering, pyTables boasts great performance.
>
> > Blaine
>
> > On Thu, Jun 18, 2009 at 2:32 PM, Vincent  wrote:
>
> > > If you have a lot of data pytables may be an option (see link below).
> > > It can store data as numpy arrays directly rather than having to
> > > convert to such an array after reading from an sql database.
>
> > >http://www.pytables.org
>
> > > Vincent
>
> > > On Jun 18, 1:15 pm, Blaine Booher  wrote:
> > > > Thank you Rajesh, Vincent, Nick, and Hernan for the helpful suggestions.
> > > > This is definitely a route I am going to explore.  I'll post some 
> > > > updates
> > > to
> > > > the list if anything comes out of it.
>
> > > > Would you recommend importing the data into django models and tables, or
> > > > keeping the db separate and independent?
>
> > > > Blaine
>
> > > > On Thu, Jun 18, 2009 at 3:01 AM, Hernan Olivera 
> > > wrote:
> > > > > I think it would be really great if you can interface with R too.
> > > There`s a
> > > > > library to acces to R power from Python, and then from Django.
>
> > > > > 2009/6/18 Nick Fishman 
>
> > > > > A friend of mine is using Django with matplotlib to create graphs from
> > > CSV
> > > > >> files, and it's turning out pretty well. I haven't yet tried
> > > googlecharts,
> > > > >> but it looks promising.
>
> > > > >> The main difficulty he had with Matplotlib was transitioning to
> > > > >> Apache/mod_python after working with the Django development server.
> > > The
> > > > >> Matplotlib commands he was calling worked fine on his desktop, but
> > > then
> > > > >> complained of a non-existent X11 connection once he tried the code on
> > > > >> Apache. The solution is one additional line of code, and is detailed
> > > at
>
> > >http://matplotlib.sourceforge.net/faq/howto_faq.html#matplotlib-in-a-...have
> > > similar problems.
>
> > > > >> Nick
>
> > > > >> On Wed, Jun 17, 2009 at 11:08 PM, Vincent 
> > > wrote:
>
> > > > >>> That sounds like a great idea. Something i have been meaning to try
> > > > >>> for a while but haven't gotten around to.
>
> > > > >>> For a class website i did try to use matplotlib to create graphs 
> > > > >>> from
> > > > >>> user provided data within django but couldn't figure out how to get
> > > it
> > > > >>> to work smoothly. Ended up using Jacobs googlecharts templates
> > > instead
> > > > >>> (see link below).
>
> > > > >>>http://github.com/jacobian/django-googlecharts/tree/master
>
> > > > >>> The following also looks nice.
>
> > > > >>>http://code.google.com/p/google-chartwrapper/
>
> > > > >>> Hope you share code examples.
>
> > > > >>> Vincent
>
> > > > >>> On Jun 17, 4:21 pm, Rajesh D  wrote:
> > > > >>> > On Jun 17, 2:06 pm, blaine  wrote:
>
> > > > >>> > > Hey guys,
> > > > >>> > >   I have a lot of data from various testing samples (simple 2D
> > > > >>> > > plotting points) in .csv format.  I am looking to design a 
> > > > >>> > > system
> > > to
> > > > >>> > > manage things like plotting, calculations, selecting individual
> > > > >>> > > samples and tests, etc. by creating a data manager with an
> &

Re: Django vs. Liferay

2008-09-28 Thread Nic Jordan

Dear List,

thank you Malcolm for your reply. I don't have anything really
specific, but I *think* I know so much now:
We have some static sites, those are already ported to the dcms
(language support) pluggable, so the cms part is pretty much solved.
That is true for Liferay as well, since it has a cms built in.
We have to deal very much with surveys, and there is nothing out of
the box for Django nor Liferay, so writing something like that is (as
far as I know) easier with Django. Database models, automatic admin
interface etc. But there is also the goal to have an "internal",
meaning intranet, file-system, unlike a normal file-system with "just"
directories, but something like a "general" and a user directory. As
far as my knowledge goes (and it isn't very far), neither Liferay nor
Django provide such means.

On all the other points a completely agree with you, but maybe that's
the reason why I have so much trouble finding a solution, because
there's lacking the "specificity" for this new project. So I really
have to digg into Django (*JOY*) and Liferay (*not so much joy*).

I'll try to resume what I've got so far (thanks to Malcolm's answers):
-neither Django nor Liferay are "better", they both focus on different
things
-There is a need for more specificity to be able to decide, best way
is to digg into both systems end evaluating
-API are possible in Django, also authentication is "simpel" to write
-Any other points need further investigation and to be more specific
or less "abstract"

If I'm wrong on this, please correct me.

Thank a lot for the support,
Nicola Jordan


On Sep 28, 4:15 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Sat, 2008-09-27 at 10:16 -0700, Nic Jordan wrote:
> > Dear List,
>
> > I'm currently involved in a project for building en entirely new site.
> > The choice of our informatics-advisor is Liferay. I now volunteered to
> > try to convince him, that "Django" is the better choice.
> > Unfortunately, I don't know anything about Liferay, and I'm still
> > fairly new to Django as well. I know that these are two completely
> > different "systems".
>
> Yeah, no kidding. :-)
>
>
>
> > To be a bit more specific about what is wanted (what we really need is
> > another topic):
> > -JSR-168 (or similar specification) and SOA;
>
> Oeople from the Java side of town always seem to assume that everybody
> else knows what each particular JSR is (you're not the first to do
> this). I got as far as getting to the Sun Java site to read JSR-168, but
> the license says I can only use it for internal evaluation and since
> there's a greater than zero chance I might one day want to implement
> something "portlet" related in Django and it might even have a large
> overlap with something Sun have previously done, I can't agree to that
> license, so I can't read the document. What does the "portlet API" do?
>
> Similarly, SOA is an architecture style. It's not the one Django is
> normally used for (since REST-style architecture is more useful for the
> types of things Django was built for), but it wouldn't be impossible to
> do things in that style. After all, you're still sending data to a URL
> that is then processed by a view and in your (Python) view functions you
> can do whatever you like, including running that data through SOAPy or
> ZSI or any other library that can be used
>
> > -Capable to handle more than one programming language in data
> > activities as well as in application activities;
>
> What does this mean? Can you give an example, please, since "data and
> application activities" just means "code" when I use the normal meanings
> of the words. Django requires writing code in Python. You could just
> Django on Jython and then call to Java code (modulo running a
> non-released version of Jython at the moment, but that will change early
> next year).
>
> > -Independent of Hardware, Software, programming language, operating
> > system (as much as possible)
>
> Django is a Python framework. Liferay doesn't meet this requires,
> either, since it's totally Java based. That being said, you can run
> Python on more platforms than you can run Java on, so it's more
> independent of hardware and OS in that respect.
>
> > Has some sort of a software library which is expandable and has
> > already enough basic business logics in a framework to quickly develop
> > a new application on top of it;
>
> You can see from djangosites.org, random browsing of this mailing and a
> few quick Google searches that Django is designed

Django vs. Liferay

2008-09-27 Thread Nic Jordan

Dear List,

I'm currently involved in a project for building en entirely new site.
The choice of our informatics-advisor is Liferay. I now volunteered to
try to convince him, that "Django" is the better choice.
Unfortunately, I don't know anything about Liferay, and I'm still
fairly new to Django as well. I know that these are two completely
different "systems".

To be a bit more specific about what is wanted (what we really need is
another topic):
-JSR-168 (or similar specification) and SOA;
-Capable to handle more than one programming language in data
activities as well as in application activities;
-Independent of Hardware, Software, programming language, operating
system (as much as possible)
Has some sort of a software library which is expandable and has
already enough basic business logics in a framework to quickly develop
a new application on top of it;
-Has a web services kind of API to the external components, so the
independency to any environment is as low as possible;
-Easy authority structures preferable via an external LDAP/X.500
system;
-Editorial capabilities (separation for writing, checking, publishing
and maintaining);
-Capable to automatically deal with the differences between the web
browsers (IE, Firefox, Safari, etc.);
-Able to (automatically) synchronize (and converting) data if these
data’s are used and/or distributed over more than one database;
-Relatively easily to backup;
-Relatively easily to maintain.

I'm well aware that there are many things mixed up, not belonging to
the question of "using Django or not", but I do not know how to put it
simpler, because the mentioned points above are the "cracking ponts"
to choose "something".

Does anyone have experience which she/he is willing to share with me?
If there is something other than Django that fits these "needs", I'm
very open for a hint, too.

Thank you in advance for taking the time to answer to my somewhat off-
topic post,

Nicola Jordan

--~--~-~--~~~---~--~~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---