Re: cannot import path in urls

2019-10-03 Thread Taylor Hughes-Scott
Hi,

You will need to make the change in both urls.py files that you have
created.

Regards,

On Thu., 3 Oct. 2019, 3:36 pm MEGA NATHAN, 
wrote:

> Hi.
> In which  file i rewrite app/urls are main file url i write...
>
>
>
>
>
> *Regards*
> Meganathan G
>
>
>
> On Thu, Oct 3, 2019 at 10:21 AM Suraj Thapa FC 
> wrote:
>
>> In urls.py
>> Write
>> from django.urls import path
>>
>> On Thu, 3 Oct, 2019, 10:02 AM MEGA NATHAN, 
>> wrote:
>>
>>> Hi.
>>>
>>>
>>> i'm meganathan beginer for django 
>>>
>>> urls cannot import for path . how to reslove 
>>>
>>> --
>>> 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/a0c82af4-da14-49e4-a0af-eff26f47afbd%40googlegroups.com
>>> 
>>> .
>>>
>> --
>> 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/CAPjsHcEv9-av30MrCetr0FxAHHEpjHM_0jiava_PP6XdKQWLwg%40mail.gmail.com
>> 
>> .
>>
> --
> 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/CAEvDBLdYvK%2BQBYCfX_g3mchvJ91NT5xEXA8ZDjFqjru-SLPU3A%40mail.gmail.com
> 
> .
>

-- 
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/CAAOisOJncWU_21xnx%3DmZPA1Rd3KOdFUYeCxdfP8DsTx70OoDSA%40mail.gmail.com.


Re: cannot import path in urls

2019-10-02 Thread Taylor Hughes-Scott
Hi,

It looks like you aren't importing path from the right location in your
urls.py file, try the following import to see if that resolves your issue.

from django.urls import path

Regards,

On Thu., 3 Oct. 2019, 2:33 pm MEGA NATHAN, 
wrote:

> Hi.
>
>
> i'm meganathan beginer for django 
>
> urls cannot import for path . how to reslove 
>
> --
> 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/a0c82af4-da14-49e4-a0af-eff26f47afbd%40googlegroups.com
> 
> .
>

-- 
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/CAAOisOKHPMMh5Aq%2B-D5m3%2BYC6yf6XAfvoSq%2BzjJp%3DYbPyEDzpg%40mail.gmail.com.


Re: why-do-i-get-an-error-about-importing-django-settings-module

2019-06-25 Thread Taylor Hughes-Scott
Based on the screenshots, that is not an error. That is just the standard
django code that your seeing. It trying to import settings and if they
don't exist then it will show that error.

I recommend going through the django tutorial
https://docs.djangoproject.com/en/2.2/intro/tutorial01/

On Tue., 25 Jun. 2019, 12:48 pm MATTHEW GODSTIME, 
wrote:

> --
> 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/CADxAG5G%3DbEt0ymxq%3DSB9dERPoZSr5rX_p00C2D2ZBxim57GUHQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAAOisO%2BRrv4oygaULLMOD82_UrYHppQgVke_GWdiL0VHb0c%2B6Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: How can I send an outlook mail from angular using django

2019-06-12 Thread Taylor Hughes-Scott
I'm not so sure about sending outlook email through django. However i do
know django has a basic email sending built in have you had a look at that?
https://docs.djangoproject.com/en/2.2/topics/email/

On Thu., 13 Jun. 2019, 10:41 am Sai Aravind,  wrote:

> How can I send an outlook mail from angular using django can u please
> provide a y document for this
>
> --
> 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/711f3310-0b89-400e-adff-4aaf61e51cff%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAAOisOJQGg05hZw98PQTHnbWVSfQQ9NERFccSm8ERJOqn5YirQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: parse xml from url to database

2019-06-12 Thread Taylor Hughes-Scott
Are you able to provide an example url or xml file. That would help to
figure out why no listings are created.


On Thu., 13 Jun. 2019, 9:04 am Ewen Le Bihan, 
wrote:

> Hi, where does prof.xml_ky comes from ?
>
> Le mercredi 12 juin 2019 18:22:01 UTC+2, Nuno Vieira a écrit :
>>
>> Hi there.
>>
>> I´m having some problems on parsing a real estate xml to database.
>> The user profile have url field to import properties automatically from
>> xml feed (url). The user can insert mannually or automatically, if the user
>> insert the url feed then it should be able to get the objects and save them
>> to mysql database automatically.
>> The function is not working and i do not know why, gives no error but
>> don´t populate the database.
>>
>> Models.py:
>> class Listing(models.Model):
>> '''Create table listing in db '''
>> realtor = models.ForeignKey(User, on_delete=models.CASCADE)
>> title = models.CharField(max_length=200)
>> address = models.CharField(max_length=200)
>> city = models.CharField(max_length=100)
>> state = models.CharField(max_length=100)
>> zipcode = models.CharField(max_length=20)
>> longitude = models.DecimalField(max_digits=9, decimal_places=6,default=0)
>> latitude = models.DecimalField(max_digits=9, decimal_places=6, default=0)
>> description = models.TextField(blank=True)
>> price = models.IntegerField()
>> bedrooms = models.IntegerField()
>> bathrooms = models.DecimalField(max_digits=2, decimal_places=1)
>> garage = models.IntegerField(default=0)
>> sqmt = models.IntegerField(blank=True)
>> lot_size = models.DecimalField(max_digits=5, decimal_places=1,blank=True)
>> On_Processing = 'On Processing'
>> AMais = 'A+'
>> A = 'A'
>> B = 'B'
>> BMenos = 'B-'
>> C = 'C'
>> D = 'D'
>> E = 'E'
>> F = 'F'
>> ENERGY_RATE_CHOICES = [
>> (On_Processing, 'On Processing'),
>> (AMais, 'A+'),
>> (A, 'A'),
>> (B, 'B'),
>> (BMenos, 'B-'),
>> (C, 'C'),
>> (D, 'D'),
>> (E, 'E'),
>> (F, 'F'),
>> ]
>> energy_rate = models.CharField(
>> max_length=12,
>> choices=ENERGY_RATE_CHOICES,
>> default=On_Processing,
>> )
>> photo_main = models.ImageField(upload_to='photos/%Y/%m/%d/', default=
>> 'default.jpg')
>> photo_main_url = models.URLField(blank = True)
>> is_published = models.BooleanField(default=True)
>> list_date = models.DateTimeField(default=datetime.now, blank=True)
>> video_url = models.CharField(max_length=100, blank=True)
>> virtual_tour = models.URLField(blank=True)
>> visit_num = models.PositiveIntegerField(default=0)
>>
>> def __str__(self):
>> return self.title
>>
>> def get_absolute_url(self):
>> return reverse('listing-detail', kwargs={'pk': self.pk})
>>
>> Function on xml_parse.py:
>> ...
>> import xml.etree.ElementTree as ET
>> import requests
>> from users.models import Profile
>>
>>
>> def xml_parse(self):
>> prof_list = Profile.objects.all()
>> for prof in prof_list:
>> if prof.xml_ky is not None:
>> url = xml_ky
>> response = request.get(url)
>> with open('xml/%s' % self.id + '/feed.xml', 'wb') as file:
>> file.write(response.content)
>>
>> tree = ET.parse('xml/%s' % self.id + '/feed.xml')
>> root = tree.getroot()
>> for props in root.iter('property'):
>> listing, created = Listing.object.create(
>> title = props.find('type').text + ' ' + props.find('town').text,
>> address = props.find('location_detail').text,
>> city = props.find('town').text,
>> state = props.find('province').text,
>> zipcode = props.find('zipcode').text,
>> loc = props.find('location'),
>> longitude = loc.find('longitude').text,
>> latitude = loc.find('latitude').text,
>> desc = props.find('desc'),
>> description = desc.find('en').text,
>> price = props.find('price').text,
>> bedrooms = props.find('beds').text,
>> bathrooms = props.find('baths').text,
>> garage = props.find('garage').text,
>> area = props.find('surface_area'),
>> sqmt = area.find('built').text,
>> energy_rate = props.find('energy_rate').text,
>> realtor = self.request.user,
>> img = props.find('images'),
>> image = img.get('id=1'),
>> image_url = image.find('url').text,
>> photo_main_url = image_url,
>> video_url = props.find('video_url').text,
>> virtual_tour = props.find('virtual_tour').text,
>> )
>> if created:
>> return listing.save()
>>
>>
>>
>> If you could help me and point me in the right direction it would be
>> great.
>>
>> Thanks and sorry for the black background!
>>
> --
> 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/20aa727c-d1e8-4d5f-a17d-ac17947ba5f3%40googlegroups.com
> 
> .
> For more options, visit 

Re: Django model form is not getting saved in Postgresql database

2019-06-03 Thread Taylor Hughes-Scott
No problem. Glad you got it sorted.

On Tue., 4 Jun. 2019, 8:16 am Ankhi Roy,  wrote:

> Hey,
>
> Nevermind I have solved the problem.
> I was in an impression that I need to create a seperate database
> equivalent to django model form. Then realised that Django automatically
> creates a database table like databasename_modelclassname and have all the
> columns as per Django model form.
>
> Anyway thanks for your time.
>
> Thanks
>
>
>
> On Mon, Jun 3, 2019, 4:38 PM Ankhi Roy  wrote:
>
>> Hi,
>>
>> I am using Django admin - 2.2.1 and Postgresql as my database. So my
>> problem is I have saved the user entered data in form.py on "POST" Request
>> but it isn't saving in the postgresql database.
>>
>> Model.py -
>>
>> class modelForm(models.Model):
>> CHOICES = [('Y', 'Yes'),
>>('N', 'No')]
>> allow = models.CharField( max_length = 4 , choices = CHOICES)
>>
>> description = models.CharField( max_length=1000)
>>
>> usingtheproduct = models.CharField( max_length = 4 , choices =
>> CHOICES)
>>
>>
>>  Forms.py file -
>>
>>
>>
>> class productForm(forms.ModelForm):
>> class Meta:
>> model = modelForm
>>
>> fields = ["allow", "description", "usingtheproduct"]
>>
>> labels = {
>> "allow": "Allow",
>> "description": "Description",
>> "usingtheproduct": "Using The Product"
>> }
>>
>>
>> first.html file -
>>
>>  {% csrf_token %}
>> {{form}}
>>  
>> 
>>
>>
>> Views.py -
>>
>>
>>
>> def first(request):
>> template = loader.get_template('xyz/first.html')
>> form = productForm(request.POST or None) #
>> https://stackoverflow.com/questions/35748734/django-local-variable-form-referenced-before-assignment
>>
>> if request.method == 'POST':
>>
>> form = productForm(data = request.POST)
>>
>> if form.is_valid():
>>
>> allow = request.POST.get('Allow', '')
>> decription = request.POST.get('Decription', '')
>>  usingtheproduct= request.POST.get('Using The Product', '')
>> form.save() # This did not work as did not store user
>> enetered data in postgresql database.
>> return HttpResponse("It is getting saved") # I can see
>> this message in browser after submitting the html form,
>> else:
>> print(form.errors)
>>
>> return HttpResponse(template.render({'form': form}, request))
>>
>>
>>
>>
>> setting.py file -
>>
>> DATABASES = {
>> 'default': {
>> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
>> 'NAME': 'abc',
>> 'USER' : 'xyz',
>> 'PASSWORD' : '*',
>> 'HOST': 'localhost',
>> 'PORT':'',
>>
>> } # I have also created a database and a table with model name and
>> have the exact columns as that of form input variables that is I have 3
>> column as allow, description, usingtheproduct in the postgresql database.
>> }
>>
>>
>> So not sure why the data is not getting saved in the postgresdatabase, am
>> i missing something? Thanks for your time.
>>
>> Thanks
>>
>> --
>> 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/9334a917-1539-4bfc-96f2-c2f617f2ff9d%40googlegroups.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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/CABUQWg9uqmNJTs3ckALfJoxuokH3Fe7_3XkY-J%2BccqKyDrQYrw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 

Re: Django model form is not getting saved in Postgresql database

2019-06-03 Thread Taylor Hughes-Scott
With your form.save() call try passing commit=True so it looks like
form.save(commit=True)

On Tue., 4 Jun. 2019, 1:39 am Ankhi Roy,  wrote:

> Hi,
>
> I am using Django admin - 2.2.1 and Postgresql as my database. So my
> problem is I have saved the user entered data in form.py on "POST" Request
> but it isn't saving in the postgresql database.
>
> Model.py -
>
> class modelForm(models.Model):
> CHOICES = [('Y', 'Yes'),
>('N', 'No')]
> allow = models.CharField( max_length = 4 , choices = CHOICES)
>
> description = models.CharField( max_length=1000)
>
> usingtheproduct = models.CharField( max_length = 4 , choices = CHOICES)
>
>
>  Forms.py file -
>
>
>
> class productForm(forms.ModelForm):
> class Meta:
> model = modelForm
>
> fields = ["allow", "description", "usingtheproduct"]
>
> labels = {
> "allow": "Allow",
> "description": "Description",
> "usingtheproduct": "Using The Product"
> }
>
>
> first.html file -
>
>  {% csrf_token %}
> {{form}}
>  
> 
>
>
> Views.py -
>
>
>
> def first(request):
> template = loader.get_template('xyz/first.html')
> form = productForm(request.POST or None) #
> https://stackoverflow.com/questions/35748734/django-local-variable-form-referenced-before-assignment
>
> if request.method == 'POST':
>
> form = productForm(data = request.POST)
>
> if form.is_valid():
>
> allow = request.POST.get('Allow', '')
> decription = request.POST.get('Decription', '')
>  usingtheproduct= request.POST.get('Using The Product', '')
> form.save() # This did not work as did not store user enetered
> data in postgresql database.
> return HttpResponse("It is getting saved") # I can see
> this message in browser after submitting the html form,
> else:
> print(form.errors)
>
> return HttpResponse(template.render({'form': form}, request))
>
>
>
>
> setting.py file -
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.postgresql_psycopg2',
> 'NAME': 'abc',
> 'USER' : 'xyz',
> 'PASSWORD' : '*',
> 'HOST': 'localhost',
> 'PORT':'',
>
> } # I have also created a database and a table with model name and
> have the exact columns as that of form input variables that is I have 3
> column as allow, description, usingtheproduct in the postgresql database.
> }
>
>
> So not sure why the data is not getting saved in the postgresdatabase, am
> i missing something? Thanks for your time.
>
> Thanks
>
> --
> 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/9334a917-1539-4bfc-96f2-c2f617f2ff9d%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAAOisOJqMXB8B1h2P2xhDPnzD43AkVwT617dA_zybSpimZfL2A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deprecating model field (Deleting model field, but keeping DB column)

2017-07-05 Thread taylor
nen <red...@gmail.com> wrote:
>>
>>> Hi,
>>>
>>> Sounds like your all developers do use same database if you have such a 
>>> problems.
>>>
>>> It's usually good practice to have per developer development database. 
>>> That will allow individual developers to do changes to database and migrate 
>>> others as they please. Also it doesn't "matter" if one developer breaks 
>>> their database for example by accidentally running migrations that are not 
>>> in the repo yet.
>>>
>>> Of course, it requires that you have either database creation script, or 
>>> like we do, we clone our staging database for development basis.
>>>
>>> On 05.07.2017 15:09, tay...@cedar.com wrote:
>>>
>>> Thanks for responding Avraham. 
>>>
>>> That would be a good option if I was developing by myself, but I am 
>>> working with a team of 20 developers. The process needs to be the same 
>>> whether there are deprecated fields or not. I can't realistically expect 20 
>>> people to not apply one migration (or a few specific ones). There may be 
>>> other migrations after the deprecation that need to be applied, so it's 
>>> very difficult to apply certain ones and ignore others. It would be 
>>> similarly difficult to get everyone to apply one of the migrations with 
>>> --fake, but do a different process with every other migration. Also, --fake 
>>> applies to the entire migration (not just specific operations), so people 
>>> would be forced to make separate migrations for other model changes and 
>>> hopefully remember not to run --fake on those.
>>>
>>> My current best attempt was to create a custom DB migration operation 
>>> https://docs.djangoproject.com/en/1.11/ref/migration-operations/#writing-your-own
>>>  
>>> , that removes the field in state_forwards, but doesn't do anything to the 
>>> db in database_forwards. That works, but the person that deprecates the 
>>> field need to remember to change the RemoveField operation into the custom 
>>> DeprecateField operation. It would be great if makemigrations created the 
>>> correct operations automatically. Is there a way to do that?
>>>
>>> On Wednesday, July 5, 2017 at 7:27:22 AM UTC-4, Avraham Serour wrote: 
>>>>
>>>> you can remove the field and don't run migrations until you are ready 
>>>> to actually remove the column, or you may run migrations fake and leave 
>>>> the 
>>>> column there forever 
>>>>
>>>>
>>>> https://docs.djangoproject.com/en/1.11/ref/django-admin/#cmdoption-migrate-fake
>>>>
>>>> On Wed, Jul 5, 2017 at 6:39 AM, <tay...@cedar.com> wrote:
>>>>
>>>>> I am having some trouble figuring out the best way to remove model 
>>>>> fields in Django. If I remove a field from a model and then run 
>>>>> makemigrations, it creates a RemoveField operation in a migration. That 
>>>>> is 
>>>>> great, but if I decide to run the migration before releasing the new 
>>>>> code, 
>>>>> the existing code will break (for a short time between running the 
>>>>> migration and releasing the new code) because the old code is still 
>>>>> querying for the removed column (Django queries for all columns by 
>>>>> default). I could run the migration after the release, but that won't 
>>>>> work 
>>>>> if I also have an AddField operation because the new code needs the new 
>>>>> column, so it needs to be run before. I am wondering if anyone has solved 
>>>>> this issue? 
>>>>>
>>>>> My best solution (I don't think Django supports this) would be to have 
>>>>> a special type of field called a DeprecatedField. It would delete the 
>>>>> field 
>>>>> from Django's perspective, but keep the column in the DB. Django would no 
>>>>> longer query for the column, but the column would still be in the DB. On 
>>>>> the next release, I could remove the column completely (with a 
>>>>> RemoveField 
>>>>> operation) and the existing code would not error because it has no 
>>>>> knowledge of the column.
>>>>>
>>>>> I noticed Django has an idea of a private field, which is on a model 
>>>>> but not in the DB. Is there a way to create a field that is in the DB, 
>>>>> but 
>&g

Re: Deprecating model field (Deleting model field, but keeping DB column)

2017-07-05 Thread taylor
ve the column, or you may run migrations fake and leave the 
>>> column there forever 
>>>
>>>
>>> https://docs.djangoproject.com/en/1.11/ref/django-admin/#cmdoption-migrate-fake
>>>
>>> On Wed, Jul 5, 2017 at 6:39 AM, <tay...@cedar.com> wrote:
>>>
>>>> I am having some trouble figuring out the best way to remove model 
>>>> fields in Django. If I remove a field from a model and then run 
>>>> makemigrations, it creates a RemoveField operation in a migration. That is 
>>>> great, but if I decide to run the migration before releasing the new code, 
>>>> the existing code will break (for a short time between running the 
>>>> migration and releasing the new code) because the old code is still 
>>>> querying for the removed column (Django queries for all columns by 
>>>> default). I could run the migration after the release, but that won't work 
>>>> if I also have an AddField operation because the new code needs the new 
>>>> column, so it needs to be run before. I am wondering if anyone has solved 
>>>> this issue? 
>>>>
>>>> My best solution (I don't think Django supports this) would be to have 
>>>> a special type of field called a DeprecatedField. It would delete the 
>>>> field 
>>>> from Django's perspective, but keep the column in the DB. Django would no 
>>>> longer query for the column, but the column would still be in the DB. On 
>>>> the next release, I could remove the column completely (with a RemoveField 
>>>> operation) and the existing code would not error because it has no 
>>>> knowledge of the column.
>>>>
>>>> I noticed Django has an idea of a private field, which is on a model 
>>>> but not in the DB. Is there a way to create a field that is in the DB, but 
>>>> Django model doesn't query for it or allow it to be used in creates and 
>>>> updates? Very similar to the managed=False on the Model, but on the Field 
>>>> level. If anyone has other approaches to the problem, I would be very 
>>>> excited to find alternative methods.
>>>>
>>>> Thanks,
>>>> Taylor
>>>> -- 
>>>> 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...@googlegroups.com.
>>>> To post to this group, send email to django...@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/a52ae01a-1a7d-43ce-a94f-fb00c4e1b7d1%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/django-users/a52ae01a-1a7d-43ce-a94f-fb00c4e1b7d1%40googlegroups.com?utm_medium=email_source=footer>
>>>> .
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/e1f61e62-a6cc-44a4-ba35-7fa8b28c5549%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/e1f61e62-a6cc-44a4-ba35-7fa8b28c5549%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
>> Jani Tiainen
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/d4ba64c5-0dac-bcb4-520f-78835d049ad4%40gmail.com
>>  
>> <https://groups.google.com/d/msgid/django-users/d4ba64c5-0dac-bcb4-520f-78835d049ad4%40gmail.com?utm_medium=email_source=footer>
>> .
>>
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/f8891294-3be5-41d0-a6a7-9740d7b8b3bb%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deprecating model field (Deleting model field, but keeping DB column)

2017-07-05 Thread taylor
Thanks for responding Avraham.

That would be a good option if I was developing by myself, but I am working 
with a team of 20 developers. The process needs to be the same whether 
there are deprecated fields or not. I can't realistically expect 20 people 
to not apply one migration (or a few specific ones). There may be other 
migrations after the deprecation that need to be applied, so it's very 
difficult to apply certain ones and ignore others. It would be similarly 
difficult to get everyone to apply one of the migrations with --fake, but 
do a different process with every other migration. Also, --fake applies to 
the entire migration (not just specific operations), so people would be 
forced to make separate migrations for other model changes and hopefully 
remember not to run --fake on those.

My current best attempt was to create a custom DB migration 
operation 
https://docs.djangoproject.com/en/1.11/ref/migration-operations/#writing-your-own
 
, that removes the field in state_forwards, but doesn't do anything to the 
db in database_forwards. That works, but the person that deprecates the 
field need to remember to change the RemoveField operation into the custom 
DeprecateField operation. It would be great if makemigrations created the 
correct operations automatically. Is there a way to do that?

On Wednesday, July 5, 2017 at 7:27:22 AM UTC-4, Avraham Serour wrote:
>
> you can remove the field and don't run migrations until you are ready to 
> actually remove the column, or you may run migrations fake and leave the 
> column there forever
>
>
> https://docs.djangoproject.com/en/1.11/ref/django-admin/#cmdoption-migrate-fake
>
> On Wed, Jul 5, 2017 at 6:39 AM, <tay...@cedar.com > wrote:
>
>> I am having some trouble figuring out the best way to remove model fields 
>> in Django. If I remove a field from a model and then run makemigrations, it 
>> creates a RemoveField operation in a migration. That is great, but if I 
>> decide to run the migration before releasing the new code, the existing 
>> code will break (for a short time between running the migration and 
>> releasing the new code) because the old code is still querying for the 
>> removed column (Django queries for all columns by default). I could run the 
>> migration after the release, but that won't work if I also have an AddField 
>> operation because the new code needs the new column, so it needs to be run 
>> before. I am wondering if anyone has solved this issue?
>>
>> My best solution (I don't think Django supports this) would be to have a 
>> special type of field called a DeprecatedField. It would delete the field 
>> from Django's perspective, but keep the column in the DB. Django would no 
>> longer query for the column, but the column would still be in the DB. On 
>> the next release, I could remove the column completely (with a RemoveField 
>> operation) and the existing code would not error because it has no 
>> knowledge of the column.
>>
>> I noticed Django has an idea of a private field, which is on a model but 
>> not in the DB. Is there a way to create a field that is in the DB, but 
>> Django model doesn't query for it or allow it to be used in creates and 
>> updates? Very similar to the managed=False on the Model, but on the Field 
>> level. If anyone has other approaches to the problem, I would be very 
>> excited to find alternative methods.
>>
>> Thanks,
>> Taylor
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@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/a52ae01a-1a7d-43ce-a94f-fb00c4e1b7d1%40googlegroups.com
>>  
>> <https://groups.google.com/d/msgid/django-users/a52ae01a-1a7d-43ce-a94f-fb00c4e1b7d1%40googlegroups.com?utm_medium=email_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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/e1f61e62-a6cc-44a4-ba35-7fa8b28c5549%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Deprecating model field (Deleting model field, but keeping DB column)

2017-07-05 Thread taylor
I am having some trouble figuring out the best way to remove model fields 
in Django. If I remove a field from a model and then run makemigrations, it 
creates a RemoveField operation in a migration. That is great, but if I 
decide to run the migration before releasing the new code, the existing 
code will break (for a short time between running the migration and 
releasing the new code) because the old code is still querying for the 
removed column (Django queries for all columns by default). I could run the 
migration after the release, but that won't work if I also have an AddField 
operation because the new code needs the new column, so it needs to be run 
before. I am wondering if anyone has solved this issue?

My best solution (I don't think Django supports this) would be to have a 
special type of field called a DeprecatedField. It would delete the field 
from Django's perspective, but keep the column in the DB. Django would no 
longer query for the column, but the column would still be in the DB. On 
the next release, I could remove the column completely (with a RemoveField 
operation) and the existing code would not error because it has no 
knowledge of the column.

I noticed Django has an idea of a private field, which is on a model but 
not in the DB. Is there a way to create a field that is in the DB, but 
Django model doesn't query for it or allow it to be used in creates and 
updates? Very similar to the managed=False on the Model, but on the Field 
level. If anyone has other approaches to the problem, I would be very 
excited to find alternative methods.

Thanks,
Taylor

-- 
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/a52ae01a-1a7d-43ce-a94f-fb00c4e1b7d1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Is Django suitable for this purpose?

2015-01-20 Thread Mike Taylor
I want to have an appointment booking option built into a website for a 
clinic.

The feature needs to integrate with the software that runs their office 
( http://www.atlaschirosys.com/)

In order to be fully useful, it would need to be virtually instantaneous in 
filling the requested appointment spot.  A time lag of more than a couple 
minutes would not be acceptable.

So, is this even possible and is Django the best tool for building it?

Thank you for ANY input.

-- 
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/15b83a17-8329-4fe0-afde-6f7b40345528%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Random auth_permission + content_type errors during test runs

2014-04-02 Thread Greg Taylor
I've got a project running Django 1.4, Postgres 3, Python 2.7. Our tests 
get about halfway through, then we get a sudden flood of errors showing 
that the django_content_type table may be empty:

..EE

Once the errors stop, they continue to the end of the test run. Here's the 
traceback for all of the errors:

Traceback (most recent call last): 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/test/testcases.py",
 
line 502, in __call__ 

self._pre_setup() 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/test/testcases.py",
 
line 463, in _pre_setup 

self._fixture_setup() 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/test/testcases.py",
 
line 475, in _fixture_setup 

call_command('flush', verbosity=0, interactive=False, database=db) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 150, in call_command 

return klass.execute(*args, **defaults) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/raven/contrib/django/management/__init__.py",
 
line 37, in new_execute 

return original_func(self, *args, **kwargs) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 232, in execute 

output = self.handle(*args, **options) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 371, in handle 

return self.handle_noargs(**options) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/core/management/commands/flush.py",
 
line 77, in handle_noargs 

emit_post_sync_signal(set(all_models), verbosity, interactive, db) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/core/management/sql.py",
 
line 189, in emit_post_sync_signal 

interactive=interactive, db=db) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
 
line 172, in send 

response = receiver(signal=self, sender=sender, **named) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
 
line 54, in create_permissions 

auth_app.Permission.objects.bulk_create(objs) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/db/models/manager.py",
 
line 140, in bulk_create 

return self.get_query_set().bulk_create(*args, **kwargs) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/db/models/query.py",
 
line 421, in bulk_create 

transaction.commit(using=self.db) 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/db/transaction.py",
 
line 153, in commit 

connection.commit() 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/db/backends/__init__.py",
 
line 234, in commit 

self._commit() 

File 
"/home/cbweb/.virtualenvs/coursebook/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py",
 
line 235, in _commit 

return self.connection.commit() 

IntegrityError: insert or update on table "auth_permission" violates 
foreign key constraint "content_type_id_refs_id_728de91f" 

DETAIL: Key (content_type_id)=(1) is not present in table 
"django_content_type".


This is pretty bizarre, but it's probably something we're doing. Has anyone 
ran into something like this before? I can't find anywhere that we're 
deleting content types (which the error seems to suggest is happening).

-- 
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/644c6d98-fa52-4a52-8b36-366aa7cdc2d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


is this (online tutorial) code calling a view from a view?

2014-02-15 Thread Andrew Taylor
Hi,

I've been following an online tutorial but been debugging. I've traced my 
issue to this line in the view function below:

return category(request, category_name_url)


Is this view effectively calling another view directly without going via 
the urls file (in the exception case)? If so can you advise me if this is 
good or bad practice?

Thanks,


Andy



from rango.forms import PageForm
def add_page(request, category_name_url):
context = RequestContext(request)

category_name = decode_url(category_name_url)
if request.method == 'POST':
form = PageForm(request.POST)

if form.is_valid():
# This time we cannot commit straight away.
# Not all fields are automatically populated!
page = form.save(commit=False)

# Retrieve the associated Category object so we can add it.
# Wrap the code in a try block - check if the category actually 
exists!
try:
cat = Category.objects.get(name=category_name)
page.category = cat
except Category.DoesNotExist:
# If we get here, the category does not exist.
# We render the add_page.html template without a context 
dictionary.
# This will trigger the red text to appear in the template!
return render_to_response('rango/add_page.html', {}, context)

# Also, create a default value for the number of views.
page.views = 0

# With this, we can then save our new model instance.
page.save()

# Now that the page is saved, display the category instead.
return category(request, category_name_url)
else:
print form.errors
else:
form = PageForm()

return render_to_response( 'rango/add_page.html',
{'category_name_url': category_name_url,
 'category_name': category_name, 'form': form},
 context)

-- 
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/eb10a86f-80fd-415e-8a72-8ba189faeba8%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Not pure Django. Chrome versus Safari discrepancy

2014-02-15 Thread Andrew Taylor
Thanks will experiment.

On Friday, 14 February 2014 16:18:53 UTC, C. Kirby wrote:
>
> You can try using the @never_cache decorator on the view that captures the 
> page view
>
> from django.views.decorators.cache import never_cache
>
> That should instruct safari not to cache the page.
> Sometimes that won't work due to how browsers respect the headers. You can 
> also try the decorator:
>
>
> from django.views.decorators.cache import cache_control
>
> @cache_control(no_cache=True, must_revalidate=True, no_store=True)
>
>  
>
> On Friday, February 14, 2014 5:55:03 AM UTC-6, Andrew Taylor wrote:
>>
>> Hi,
>>
>> I have been working my way through the tango with django tutorial, which 
>> I have to say I have found to be excellent. 
>> http://www.tangowithdjango.com/book/chapters/tango_too.html
>>
>> There is one section (above link) whereby you track the number of times a 
>> url has been clicked. This is done by publishing links to an internal url, 
>> and routing that through a track/redirect view which converts and redirects 
>> to the real url and increments the page views at the same time.
>>
>> However, safari was doing this on an inconsistent basis but seemed to 
>> work when the browser was first opened. After debugging this for a while I 
>> concluded the problem was not the code but my safari browser. It occurred 
>> to me that safari does this weird caching thing where you can go 
>> back/forward through pages immediately. On switching to Chrome the page 
>> counts increment as expected. I have tried setting 'disable caches' in the 
>> Develop menu in safari to no effect
>>
>> Can someone with more experience than me explain why I am seeing these 
>> effects, and what a real world cross-browser solution to tracking page 
>> views would be?
>>
>> The relevant code is below:
>>
>> 1. Track/redirect view:
>>
>> *def* track_url(request):
>>
>> context = RequestContext(request)
>>
>> page_id = None
>>
>> url = '/rango/'
>>
>> *if* request.method == 'GET':
>>
>> *if* 'page_id' *in* request.GET:
>>
>> page_id = request.GET['page_id']
>>
>> *try*:
>>
>> page = Page.objects.get(id=page_id)
>>
>> page.views = page.views + 1
>>
>> page.save()
>>
>> url = page.url
>>
>> *except*:
>>
>> *pass*
>>
>>
>> *return* redirect(url)
>>
>>
>> 2. The internal url published in template:
>>
>>
>> {% if pages %}
>>
>> **
>>
>> {% for page in pages %}
>>
>> **
>>
>> *<a* href="/rango/goto/?page_id={{page.id}}"*>*{{page.title}}
>> **
>>
>> {% if page.views > 1 %}
>>
>> - ({{ page.views }} views)
>>
>> {% elif page.views == 1 %}
>>
>> - ({{ page.views }} view)
>>
>> {% endif %}
>>
>> **
>>
>> {% endfor %}
>>
>> **
>>
>> {% else %}
>>
>> **No pages currently in category.**
>>
>> {% endif %}
>>
>>
>>
>> Thanks,
>>
>>
>> Andy
>>
>

-- 
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/684db6f2-d03e-455d-8a17-198786f334c7%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Not pure Django. Chrome versus Safari discrepancy

2014-02-14 Thread Andrew Taylor
Hi,

I have been working my way through the tango with django tutorial, which I 
have to say I have found to be excellent. 
http://www.tangowithdjango.com/book/chapters/tango_too.html

There is one section (above link) whereby you track the number of times a 
url has been clicked. This is done by publishing links to an internal url, 
and routing that through a track/redirect view which converts and redirects 
to the real url and increments the page views at the same time.

However, safari was doing this on an inconsistent basis but seemed to work 
when the browser was first opened. After debugging this for a while I 
concluded the problem was not the code but my safari browser. It occurred 
to me that safari does this weird caching thing where you can go 
back/forward through pages immediately. On switching to Chrome the page 
counts increment as expected. I have tried setting 'disable caches' in the 
Develop menu in safari to no effect

Can someone with more experience than me explain why I am seeing these 
effects, and what a real world cross-browser solution to tracking page 
views would be?

The relevant code is below:

1. Track/redirect view:

*def* track_url(request):

context = RequestContext(request)

page_id = None

url = '/rango/'

*if* request.method == 'GET':

*if* 'page_id' *in* request.GET:

page_id = request.GET['page_id']

*try*:

page = Page.objects.get(id=page_id)

page.views = page.views + 1

page.save()

url = page.url

*except*:

*pass*


*return* redirect(url)


2. The internal url published in template:


{% if pages %}

**

{% for page in pages %}

**

**{{page.title}}**

{% if page.views > 1 %}

- ({{ page.views }} views)

{% elif page.views == 1 %}

- ({{ page.views }} view)

{% endif %}

**

{% endfor %}

**

{% else %}

**No pages currently in category.**

{% endif %}



Thanks,


Andy

-- 
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/98ed0f4a-d93f-404b-8957-aaaedb06109f%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: GET and POST in forms. Please help me understand the logic!

2013-11-28 Thread Andrew Taylor
Awesome I feel much better about this now. Thanks for your help!

On Thursday, 28 November 2013 09:29:05 UTC, Daniel Roseman wrote:
>
> On Thursday, 28 November 2013 03:24:11 UTC, Andrew Taylor wrote:
>>
>> Hi,
>>
>> I'm struggling with the concepts of get and post and where these status 
>> come from in the workflow. I have worked my way through the official pages 
>> on forms but I have not quite understood this to my satisfaction.
>>
>> I get the gist that:
>>
>>- get is for requesting data and 
>>- the query string parameters are visible 
>>- Running multiple get operations with say a bookmarked link has no 
>>negative effect
>>
>> whereas with post
>>
>>- post is for making database changes
>>
>> Beyond this I am a little clueless.
>>
>>- When does a request method get assigned? 
>>- In other words, with this code below, what would have made the 
>>request method become post (or get)? Is this related to a preceding view?
>>- Does a request object have to have a get or a post dictionary in 
>>it? Could it have neither?
>>- Does a request object going to a form have to have a get or a post 
>>dictionary in it?
>>- Is it the case that with "add_category.html" the page could open 
>>with neither a get or post in the request, and while the "add_category" 
>>view is running the request method POST could be assigned?
>>- Does a POST method invoke form validation?
>>
>>
>> Example:
>>
>> def add_category(request, category_name_url=""):
>> context = RequestContext(request)
>>
>> if request.method == 'POST':
>> form = CategoryForm(request.POST)
>>
>> if form.is_valid():
>> form.save(commit=True)
>> return index(request)
>> else:
>> print form.errors
>>
>> else:
>> form = CategoryForm
>>
>>
>> return render_to_response('rango/add_category.html', {'form': form}, 
>> context)
>>
>>
>> Thanks,
>>
>>
>> Andy
>>
>>
>>
> This isn't really anything to do with Django, but the general semantics of 
> the web.
>
> *All* requests have a verb associated with them, and most of the time that 
> verb is GET: basically, your browser is requesting that the server give 
> them a page from the given address. That address might include a 
> querystring, which servers parse into GET parameters, or it might not. 
> Again, the generally accepted use of the querystring is that it in some way 
> affects the document that is returned - for example, requesting a specific 
> page in a paginated set - rather than modifying something on the server 
> itself.
>
> When you want to send information from your browser to the server, you 
> would mostly use POST. Most of the time, that is done by sending a form. 
> But note that it is the HTML that determines this: your form tag has an 
> `method` parameter, which is either GET or POST,  and when you click submit 
> the information is sent with the specified method to the URL given in the 
> `action` parameter:
> 
> Again, note that it is perfectly valid to use GET here, for example in a 
> form that specifies values to be used in a search - because you're 
> affecting what is returned to you, but not changing anything on the server. 
> But a registration form, or a form where you enter your CMS content for 
> posting, would always be POST.
>
> Now in Django, we have settled on a particular pattern, which works like 
> this:
> * Browser requests the page, ie GET.
> * Server returns the form to be filled in (possibly pre-populated with 
> data).
> * Form is sent back via POST to the *same URL*.
> * In the view, execution enters the `if request.method=="POST"` block and 
> therefore invokes form validation.
> * Server either returns invalid form (with errors) or saves the content 
> and redirects (via GET) to another URL.
>
> (Not to confuse you, but HTTP supports other verbs too, including PUT and 
> DELETE, but these are used mainly in REST and can't usually be generated by 
> browsers.)
>
> Hope this helps.
> --
> DR.
>

-- 
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/9d5106e5-83c5-4e2d-958a-6bdfe6ed5da0%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


GET and POST in forms. Please help me understand the logic!

2013-11-27 Thread Andrew Taylor
Hi,

I'm struggling with the concepts of get and post and where these status 
come from in the workflow. I have worked my way through the official pages 
on forms but I have not quite understood this to my satisfaction.

I get the gist that:

   - get is for requesting data and 
   - the query string parameters are visible 
   - Running multiple get operations with say a bookmarked link has no 
   negative effect

whereas with post

   - post is for making database changes

Beyond this I am a little clueless.

   - When does a request method get assigned? 
   - In other words, with this code below, what would have made the request 
   method become post (or get)? Is this related to a preceding view?
   - Does a request object have to have a get or a post dictionary in it? 
   Could it have neither?
   - Does a request object going to a form have to have a get or a post 
   dictionary in it?
   - Is it the case that with "add_category.html" the page could open with 
   neither a get or post in the request, and while the "add_category" view is 
   running the request method POST could be assigned?
   - Does a POST method invoke form validation?


Example:

def add_category(request, category_name_url=""):
context = RequestContext(request)

if request.method == 'POST':
form = CategoryForm(request.POST)

if form.is_valid():
form.save(commit=True)
return index(request)
else:
print form.errors

else:
form = CategoryForm


return render_to_response('rango/add_category.html', {'form': form}, 
context)


Thanks,


Andy





-- 
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/6367ae1d-fc71-4137-9140-3573a8a5dedc%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Why is RequestContext used in this way?

2013-11-27 Thread Andrew Taylor
Thanks guys this was very helpful


On Friday, 15 November 2013 14:12:50 UTC, Tom Evans wrote:
>
> On Fri, Nov 15, 2013 at 12:59 PM, Andrew Taylor 
> <andyd...@gmail.com> 
> wrote: 
> > 
> > 
> > Hi, 
> > 
> > I've followed some example code which is is follows: 
> > 
> > def index(request): 
> > context = RequestContext(request) 
> > context_dict =  {'boldmessage': "I am from the context"} 
> > return render_to_response('rango/index.html',context_dict, context) 
> > 
> > Here RequestContext only has the first argument filled i.e. request. 
> > 
> > My questions are: 
> > 
> > 1. Is RequestContext(request) being used in a kind of dummy way to suck 
> up the context processors for render_to_response? 
> > 2. What would render_to_response be doing if has both context_dict AND 
> RequestContext had a second argument? 
> > 
> > Sorry if these are stupid questions. I'm new to everything python and 
> Dango, and the kind of person who forgets everything they have ever known 
> when trying to decide which pack of toilet paper to buy in the supermarket. 
> > 
>
> This is explained in the docs: 
>
> If you do not pass in a context, a Context will be created from the 
> dictionary passed in. 
> If you do pass in a context, the contents of the dictionary passed in 
> will be merged in to the context. 
>
>
> https://docs.djangoproject.com/en/1.6/topics/http/shortcuts/#django.shortcuts.render_to_response
>  
>
> Cheers 
>
> Tom 
>

-- 
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/ffe2be8c-310a-4d9d-80d2-61a56930f159%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Why is RequestContext used in this way?

2013-11-15 Thread Andrew Taylor

Hi,

I've followed some example code which is is follows:

def index(request):
context = RequestContext(request)
context_dict =  {'boldmessage': "I am from the context"}
return render_to_response('rango/index.html',context_dict, context)

Here RequestContext only has the first argument filled i.e. request.

My questions are:

1. Is RequestContext(request) being used in a kind of dummy way to suck up 
the context processors for render_to_response?
2. What would render_to_response be doing if has both context_dict AND 
RequestContext had a second argument?

Sorry if these are stupid questions. I'm new to everything python and 
Dango, and the kind of person who forgets everything they have ever known 
when trying to decide which pack of toilet paper to buy in the supermarket.

Andy

-- 
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/9f62f09d-cf92-46e2-893c-17d0a39fe4a5%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [ver. 1.5] Specifying custom User model (extends AbstractUser) doesn't work

2013-03-21 Thread Lewis Taylor
And this is why I learnt the names of many of those major in the Django 
community! Now if I post after them, it's mostly to say. Yes I agree.

Like I'm doing now :-)

On Wednesday, 24 October 2012 05:02:02 UTC+1, Surya Mukherjee wrote:
>
> Django's standard User class isn't sufficient for my needs so I am making 
> my own User class. As per the User Authentication doc page, I am 
> subclassing AbstractUser (not AbstractBaseUser) to add some new stuff.
>
> 
> from django.contrib.auth.models import AbstractUser
>
> class MyUser(AbstractUser):
> test = 'Hello world'
> 
>
> Pretty simple so far. In settings.py:
> 
> # Specifies SDBUser as the custom User class for Django to use
> AUTH_USER_MODEL = 'app.MyUser'
> 
>
> But when i try to syncdb, everything breaks:
>
> [root@Surya project]# manage syncdb
> CommandError: One or more models did not validate:
> app.userprofile: 'user' defines a relation with the model 'auth.User', 
> which has been swapped out. Update the relation to point at 
> settings.AUTH_USER_MODEL.
> auth.user: Model has been swapped out for 'app.SDBUser' which has not been 
> installed or is abstract.
> django_openid_auth.useropenid: 'user' defines a relation with the model 
> 'auth.User', which has been swapped out. Update the relation to point at 
> settings.AUTH_USER_MODEL.
>
> django_openid_auth is a third party OpenID library, but the first two are 
> pure Django and they're still breaking. Wat do?
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




DATABASES is improperly configured. Please supply the ENGINE value - 2 databases

2013-03-18 Thread Andrew Taylor
Hi,

I'm trying to get django to play with a pre-existing database 
"dbtransitcross". It was working until I attempted to add this second 
database. Any suggestions what to look at would be appreciated. Thanks,

Andy

PS project structure is:

-Stringer/
   manage.py
   Stringer/
settings.py
urls.py
   transitcross/
models.py
routers.py
views.py

Here is the top part of my settings file:

# Django settings for Stringer project.
import os,sys
from django.db import connections
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))


DEBUG = True
TEMPLATE_DEBUG = DEBUG

ADMINS = (
# ('Your Name', 'your_em...@example.com'),
)

MANAGERS = ADMINS

DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 
'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'django_db',  # Or path to database 
file if using sqlite3.
'USER': 'django_dev',  # Not used with sqlite3.
'PASSWORD': 'L1ncoln0ut@',  # Not used with sqlite3.
'HOST': '',  # Set to empty string for 
localhost. Not used with sqlite3.
'PORT': '',  # Set to empty string for default. 
Not used with sqlite3.
},
'dbtransitcross': {
'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 
'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'postgres',  # Or path to database file 
if using sqlite3.
'USER': 'postgres',  # Not used with sqlite3.
'PASSWORD': 'L1ncoln0ut@',  # Not used with sqlite3.
'HOST': '',  # Set to empty string for 
localhost. Not used with sqlite3.
'PORT': '',  # Set to empty string for default. 
Not used with sqlite3.
}
}

DATABASE_ROUTERS = ['transitcross.models.DBtransitcrossRouter',]


Here is the pycharm console output:

bash -cl "/home/andyt/.virtualenvs/django-stringer/bin/python 
/usr/share/pycharm-2.6.3/helpers/pycharm/django_manage.py inspectdb 
/home/andyt/projects/django-stringer/Stringer"
Traceback (most recent call last):
  File "/usr/share/pycharm-2.6.3/helpers/pycharm/django_manage.py", line 
21, in 
run_module(manage_file, None, '__main__', True)
  File "/usr/lib/python2.7/runpy.py", line 176, in run_module
fname, loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 82, in _run_module_code
mod_name, mod_fname, mod_loader, pkg_name)
  File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
  File "/home/andyt/projects/django-stringer/Stringer/manage.py", line 10, 
in 
execute_from_command_line(sys.argv)
  File 
"/home/andyt/.virtualenvs/django-stringer/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 443, in execute_from_command_line
utility.execute()
  File 
"/home/andyt/.virtualenvs/django-stringer/local/lib/python2.7/site-packages/django/core/management/__init__.py",
 
line 382, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/home/andyt/.virtualenvs/django-stringer/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 196, in run_from_argv
self.execute(*args, **options.__dict__)
  File 
"/home/andyt/.virtualenvs/django-stringer/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 232, in execute
output = self.handle(*args, **options)
  File 
"/home/andyt/.virtualenvs/django-stringer/local/lib/python2.7/site-packages/django/core/management/base.py",
 
line 371, in handle
return self.handle_noargs(**options)
  File 
"/home/andyt/.virtualenvs/django-stringer/local/lib/python2.7/site-packages/django/core/management/commands/inspectdb.py",
 
line 22, in handle_noargs
for line in self.handle_inspection(options):
  File 
"/home/andyt/.virtualenvs/django-stringer/local/lib/python2.7/site-packages/django/core/management/commands/inspectdb.py",
 
line 32, in handle_inspection
cursor = connection.cursor()
  File 
"/home/andyt/.virtualenvs/django-stringer/local/lib/python2.7/site-packages/django/db/backends/dummy/base.py",
 
line 15, in complain
raise ImproperlyConfigured("settings.DATABASES is improperly 
configured. "
django.core.exceptions.ImproperlyConfigured: settings.DATABASES is 
improperly configured. Please supply the ENGINE value. Check settings 
documentation for more details.

Process finished with exit code 1


This is what's in router.py:

__author__ = 'andyt'

class DBtransitcrossRouter(object):
"""A router to control all database operations on models in
the transitcross application"""

def db_for_read(self, model, **hints):
if model._meta.app_label == 'transitcross':
return 'dbtransitcross'
return None

def db_for_write(self, model, 

Re: Restful User Authentication for Ember/Backbone client with Tastypie

2013-03-13 Thread Alec Taylor
NO! - THERE IS RESTFUL METHOD OF AUTHENTICATION!

Use OAuth2.

RFC6749. There are a bunch of server implementations for Django. Use
one of them.

On Wed, Mar 13, 2013 at 8:06 PM, Pratik Mandrekar
 wrote:
> Thank you for the response!
>
> As Nick & Jani have pointed out, I figured out that there is no RESTFul way
> for authentication. Neither is there one good way all clients could access
> the api i.e Browsers can use Session Based Authentication while Mobile
> clients are better of using API based/digest authentication and passing user
> information.
>
> If authentication is handled separately, tastypie (and Django Rest
> Framework) provide a very good RESTful api for doing most things. For APIs
> consumed by web client, SessionAuthentication works great. If the same APIs
> are to be used by non-web clients, the authentication can be extended to
> include multiple ways of authenticating. This ensures that multiple clients
> can use the same API with only different ways of authentication.
>
> My work is still in progress and I'll update as I get to complete the
> project in the next few week.
>
> Thanks,
>
> Pratik
>
>
> On Wed, Mar 13, 2013 at 12:17 AM, Nick Apostolakis 
> wrote:
>>
>> On 12/03/2013 01:06 μμ, Jani Tiainen wrote:
>>>
>>>
>>> There is not exactly "RESTful way to authenticate", since after all REST
>>> is just an architecture to represent different resources and thus it's
>>> totally agnostic what comes to authentications and such.
>>>
>>> Simplest one (if you're use HTTP(S)) is to use basic/digest auth. Though
>>> true REST is protocol agnostic (for example it could use unix sockets)
>>>
>>> Query authencation, a.k.a. API key, only one that you can do protocol
>>> agnostic way.
>>>
>>> Cookie-based, for example posting credential query as POST (to create new
>>> cookie) to /sessions/ url. Binds REST to HTTP(S) protocol again and DELETE
>>> to /sessions// to logout
>>>
>>> Personally, if working with Django and HTTP I would go for cookie based
>>> auth since it would be natural.
>>>
>>> Otherwise API key isn't that bad option.
>>>
>>
>> In my case I use Django and Tastypie. The whole thing works fine for non
>> authenticated users and I would like to provide content for my registered
>> users too.
>>
>> Would the best practice be to use Django login form to authenticate the
>> user and then use Django authentication type (instead of api/key )with
>> tastypie to access the content for registered users I am after?
>>
>> Thank you
>>
>>
>> --
>>  --
>>Nick Apostolakis
>>   e-mail: nicka...@oncrete.gr
>>  Web Site: http://nick.oncrete.gr
>>  --
>>
>> --
>> You received this message because you are subscribed to a topic in the
>> Google Groups "Django users" group.
>> To unsubscribe from this topic, visit
>> https://groups.google.com/d/topic/django-users/nexi3WtCICI/unsubscribe?hl=en.
>> To unsubscribe from this group and all its topics, 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?hl=en.
>> For more options, visit https://groups.google.com/groups/opt_out.
>>
>>
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Restful User Authentication for Ember/Backbone client with Tastypie

2013-03-12 Thread Alec Taylor
You'll want to setup an OAuth2 server for this.
On 11/03/2013 7:54 AM, "Pratik Mandrekar"  wrote:

> Hello,
>
> I'm trying to figure out what would be the best way to integrate django
> with ember.js/backbone from the user authentication point of view. I'm
> using Tastypie for creating RESTful resources.
>
> I have no problem creating APIs once a user has been authenticated using
> the Session based authentication but I am wondering what is the best
> RESTful way to create  a user authentication API that can confirm to
> Session based authentication.
>
> Also if I'm not mistaken the right way to authenticate the client is via
> the API key authentication right?
>
> Thanks,
> Pratik
>
> --
> 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?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
>

-- 
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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Star Rating System In Django

2013-01-02 Thread Alec Taylor
=)

On Mon, Dec 31, 2012 at 11:12 AM, coded kid <duffleboi...@gmail.com> wrote:

> Thanks! Agon works perfectly!
>
>
> On Sunday, 30 December 2012 14:46:24 UTC+1, coded kid wrote:
>>
>> The developer for agon rating is no more working on it and I guess it
>> won't work nice .
>>
>> Simple ratings is not working out for me. Don't know if there's a
>> JavaScript plugin for rating?
>>
>> On Sunday, 30 December 2012 14:08:10 UTC+1, Alec Taylor wrote:
>>>
>>> Agon (probably easiest):
>>> http://agon-ratings.**readthedocs.org/en/latest/**usage.html<http://agon-ratings.readthedocs.org/en/latest/usage.html>
>>>
>>> -or-
>>>
>>> https://github.com/dcramer/**django-ratings<https://github.com/dcramer/django-ratings>
>>>
>>> -or-
>>>
>>> https://github.com/coleifer/**django-simple-ratings<https://github.com/coleifer/django-simple-ratings>
>>>
>>> On Mon, Dec 31, 2012 at 12:03 AM, coded kid <duffle...@gmail.com>
>>> wrote:
>>> > Anyone know about any good package or tutorial or plugin for building
>>> > a star rating system in django? I tried using dcramer/django rating
>>> > but It's not working perfectly.
>>> >
>>> > If you know of any plugin, package on how to build a star rating
>>> > system, kindly post it below.
>>> >
>>> > 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...@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> django-users...@googlegroups.**com.
>>> > For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>.
>>>
>>> >
>>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/fTgXj2iqSf0J.
>
> 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.
>

-- 
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: Star Rating System In Django

2012-12-30 Thread Alec Taylor
Agon (probably easiest):
http://agon-ratings.readthedocs.org/en/latest/usage.html

-or-

https://github.com/dcramer/django-ratings

-or-

https://github.com/coleifer/django-simple-ratings

On Mon, Dec 31, 2012 at 12:03 AM, coded kid  wrote:
> Anyone know about any good package or tutorial or plugin for building
> a star rating system in django? I tried using dcramer/django rating
> but It's not working perfectly.
>
> If you know of any plugin, package on how to build a star rating
> system, kindly post it below.
>
> 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.
>

-- 
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.



Postgres pgadmin3 & pgpass permissioning question

2012-11-25 Thread Andrew Taylor
Hi all,

Tenuous Django link but thought no one would mind if I asked the following:

Can I bypass the need for password entry in pgadmin3 by changing/locating a 
.pgpass files instead of modifying pg_hba.conf to 'trust'? pg_hba.conf 
currently set at md5 for everything.

1. I can merrily connect to the postgres server on my local ubuntu machine 
as user postgres in bash by "su postgres" then "psql". 
2. But if I want to be able to use pgadmin 3 GUI without entering a 
password I need to do this as my user, andyt and this doesn't work (I did 
chmod 600 this file to give rw access to one owner only). This feels like a 
permissioning issue but with that chmod 600 restriction on pgpass I'm not 
sure how to progress.

I have been messing around with strace trying to figure out the location of 
pgpass which is being sought out when I run psql/pgadmin3 but the results 
are inconclusive. They both (now)seem to be looking in the andyt home 
directory. Not sure if this was the case earlier, sorry! I was earlier 
placing .pgpass here there and everythwhere, but in particular 
/var/lib/postresql.

Grateful for any guidance,

Regards,

Andy

*Key file contents:*

*1 pg_hba.conf:*

local   all postgresmd5
# local   all postgrestrust

# TYPE  DATABASEUSERADDRESS METHOD

# "local" is for Unix domain socket connections only
local   all all md5
# local   all all trust
local django_db django_dev md5
# local   django_db   django_dev  trust
# IPv4 local connections:
hostall all 127.0.0.1/32md5
# hostall all 127.0.0.1/32trust
# IPv6 local connections:
hostall all ::1/128 md5
# hostall all ::1/128 trust

*2 ,pgpass*
127.0.0.1:5432:*:postgres:Passowrd@
:5432:*:django_dev:Password@




-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/WrCXCoEpc7kJ.
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: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-20 Thread Cj Taylor
Correct, Sergiy.  As I fiddle with this nightly, the core of my issue seems 
to be that mysqldb is not yet python3 ready and django 1.5 is calling for 
it.  I changed my database settings in settings.py to '
django.db.backends.mysql' which in return calls for mysqldb when I do:

python manage.py syncdb


I suppose at this point I'm just seeking anyone who has tried to run django 
1.5 and has MySQL actually working.  If so, how?

On Tuesday, November 20, 2012 2:08:37 AM UTC-5, Sergiy Khohlov wrote:
>
> Which version of django ? 
>  Is this one version has python 3.x support ? 
>
> 2012/11/20 Cj Taylor <c...@cjcode.com >: 
> > ok, so what needs to happen here?  Do I need to recode 
> > /usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py 
> to 
> > use this new module? 
> > 
> > 
> > On Sunday, November 18, 2012 4:57:02 PM UTC-5, iñigo medina wrote: 
> >> 
> >> 
> >> On Sat, 17 Nov 2012, Cj Taylor wrote: 
> >> 
> >> > That package installs into my python directory but not python3.  I'm 
> >> > currently trying to get Django 1.5 to work with python3.  Are there 
> >> > other 
> >> > ways currently to get mysql to work with django and the python3 
> >> > environment? 
> >> 
> >> Check out pymysql: 
> >> https://github.com/petehunt/PyMySQL/ 
> >> 
> >> i� 
> >> 
> >> > 
> >> > Try this : 
> >> > 
> >> >> sudo apt-get install python-mysqldb 
> >> >> 
> >> >> -- 
> >> >> Sandeep Kaur 
> >> >> E-Mail: mkaur...@gmail.com  
> >> >> Blog: sandymadaan.wordpress.com 
> >> >> 
> >> > 
> >> > -- 
> >> > You received this message because you are subscribed to the Google 
> >> > Groups "Django users" group. 
> >> > To view this discussion on the web visit 
> >> > https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ. 
> >> > To post to this group, send email to django...@googlegroups.com. 
> >> > To unsubscribe from this group, send email to 
> >> > django-users...@googlegroups.com. 
> >> > For more options, visit this group at 
> >> > http://groups.google.com/group/django-users?hl=en. 
> >> > 
> >> > 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Django users" group. 
> > To view this discussion on the web visit 
> > https://groups.google.com/d/msg/django-users/-/25S322O0_YkJ. 
> > 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> > django-users...@googlegroups.com . 
> > For more options, visit this group at 
> > http://groups.google.com/group/django-users?hl=en. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/rwaVmDBLz_8J.
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: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-19 Thread Cj Taylor
ok, so what needs to happen here?  Do I need to recode 
/usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py 
to use this new module?

On Sunday, November 18, 2012 4:57:02 PM UTC-5, iñigo medina wrote:
>
>
> On Sat, 17 Nov 2012, Cj Taylor wrote: 
>
> > That package installs into my python directory but not python3.  I'm 
> > currently trying to get Django 1.5 to work with python3.  Are there 
> other 
> > ways currently to get mysql to work with django and the python3 
> environment? 
>
> Check out pymysql: 
> https://github.com/petehunt/PyMySQL/ 
>
> i� 
>
> > 
> > Try this : 
> > 
> >> sudo apt-get install python-mysqldb 
> >> 
> >> -- 
> >> Sandeep Kaur 
> >> E-Mail: mkaur...@gmail.com  
> >> Blog: sandymadaan.wordpress.com 
> >> 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups "Django users" group. 
> > To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ. 
> > To post to this group, send email to 
> > django...@googlegroups.com. 
>
> > To unsubscribe from this group, send email to 
> django-users...@googlegroups.com . 
> > For more options, visit this group at 
> http://groups.google.com/group/django-users?hl=en. 
> > 
> >

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/25S322O0_YkJ.
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: django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-17 Thread Cj Taylor
That package installs into my python directory but not python3.  I'm 
currently trying to get Django 1.5 to work with python3.  Are there other 
ways currently to get mysql to work with django and the python3 environment?

Try this : 

> sudo apt-get install python-mysqldb 
>
> -- 
> Sandeep Kaur 
> E-Mail: mkaur...@gmail.com  
> Blog: sandymadaan.wordpress.com 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/VfrRmTUUQrgJ.
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.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb

2012-11-15 Thread Cj Taylor
Hello all,
  I'm new to Django and somewhat Python (a PHP refugee).  I have been 
learning Python 3.0 so decided to give 1.5 a run.  I tried to run the 
command below and mysqldb is missing.  I noticed on 
http://mysql-python.blogspot.com/ that mysqldb won't be ready for 3.0 until 
the 1.3 release.  So I guess the question is if there's any kind of 
workaround at the moment? 

Thanks,
  CJ

~/www$ python3 manage.py syncdb
Traceback (most recent call last):
  File 
"/usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py", 
line 14, in 
import MySQLdb as Database
ImportError: No module named MySQLdb

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "manage.py", line 10, in 
execute_from_command_line(sys.argv)
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/__init__.py", 
line 451, in execute_from_command_line
utility.execute()
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/__init__.py", 
line 390, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/__init__.py", 
line 270, in fetch_command
klass = load_command_class(app_name, subcommand)
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/__init__.py", 
line 76, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/usr/local/lib/python3.2/dist-packages/django/utils/importlib.py", 
line 35, in import_module
__import__(name)
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/commands/syncdb.py",
 
line 8, in 
from django.core.management.sql import custom_sql_for_model, 
emit_post_sync_signal
  File 
"/usr/local/lib/python3.2/dist-packages/django/core/management/sql.py", 
line 9, in 
from django.db import models
  File "/usr/local/lib/python3.2/dist-packages/django/db/__init__.py", line 
40, in 
backend = load_backend(connection.settings_dict['ENGINE'])
  File "/usr/local/lib/python3.2/dist-packages/django/db/__init__.py", line 
34, in __getattr__
return getattr(connections[DEFAULT_DB_ALIAS], item)
  File "/usr/local/lib/python3.2/dist-packages/django/db/utils.py", line 
85, in __getitem__
backend = load_backend(db['ENGINE'])
  File "/usr/local/lib/python3.2/dist-packages/django/db/utils.py", line 
26, in load_backend
return import_module('.base', backend_name)
  File "/usr/local/lib/python3.2/dist-packages/django/utils/importlib.py", 
line 35, in import_module
__import__(name)
  File 
"/usr/local/lib/python3.2/dist-packages/django/db/backends/mysql/base.py", 
line 17, in 
raise ImproperlyConfigured("Error loading MySQLdb module: %s" % e)
django.core.exceptions.ImproperlyConfigured: Error loading MySQLdb module: 
No module named MySQLdb

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/TAWAb2UBHzsJ.
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: app for kickstarter-like goals

2012-10-01 Thread Alec Taylor
What you are talking about are: "game mechanics"

With those keywords you should be able to find something. But it
doesn't look too difficult to build yourself.

On Mon, Oct 1, 2012 at 5:10 AM, Matteo Suppo  wrote:
> I'm developing a website for a non-profit organization.
>
> They want something similar to kickstarter, only based on people instead of
> money.
>
> Let's say there's an event. A birthday.
>
> If 5 people preorder the ticket there will be a clown*
> If 10 people preorder the ticket there will be a clown orchestra (in a small
> car)
> il 100 people preorder the ticket there will be a golden statue of a clown.
>
> I have no problem with the "buying tickets thing", but I couldn't find in
> django-packages anything related to milestones or goals.
>
> Do you know if there is already something I can use? Or should I create it?
>
> Thanks!
>
> * if you hate clowns you can replace them with cookies
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/2y9biFnbiIUJ.
> 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.

-- 
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: Django on Bluehost

2012-09-24 Thread Alec Taylor
You will probably crap-out with Bitbucket. Go to a cloud provider instead.

For example, Red Hat OpenShift offers their IaaS platform for free (ATM
anyway).

On Mon, Sep 24, 2012 at 2:21 PM, Zach  wrote:

> Hey everyone,
> I have recently been setting up a Django 1.4.1 project with python 2.7.2
> and MySQL. I am using fcgi to deploy my project in this environment because
> mod_wsgi is not available through bluehost. After much frustration I have
> gotten my site up to display the "it works" page. Now for some strange
> reason I can not get it away from this page. I have set up the urls.py file
> for the main project along with adding my app into the Installed_Apps
> section of the settings.py file.
> My .htaccess file is the following
> *AddHandler fcgid-script .fcgi*
> *Options +SymLinksIfOwnerMatch*
> *RewriteEngine On*
> *RewriteBase /*
> *RewriteRule ^(media/.*)$ - [L]*
> *RewriteRule ^(adminmedia/.*)$ - [L]*
> *RewriteCond %{REQUEST_URI} !(mysite.fcgi)*
> *RewriteRule ^(.*)$ mysite.fcgi/$1 [L]*
>
> My mysite.fcgi is the following
> *#!/home1/propesn4/python27/bin/python*
> *import sys, os*
> *sys.path.insert(0, "/home1/propesn4/python27")*
> *os.environ['DJANGO_SETTINGS_MODULE'] = "project.settings"
> *
> *sys.path.append("/home1/propesn4/project/")*
> *from django.core.servers.fastcgi import runfastcgi*
> *runfastcgi(method="threaded", daemonize="false")*
> *
> *
> When I make changes to my django project I preform a *touch mysite.fcgi* so
> that the fcgi agent knows there has been changes.
> If anyone could lead me in the right direction I would really appreciate
> it!
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/Aqyku-yyimsJ.
> 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.
>

-- 
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: How often does Django need updates/patches?

2012-09-21 Thread Taylor Smith
thanks very much, that's exactly what we needed to know!
 

On Friday, September 21, 2012 6:39:43 AM UTC-6, Russell Keith-Magee wrote:

> On Fri, Sep 21, 2012 at 10:56 AM, Taylor Smith 
> <cy198...@gmail.com> 
> wrote: 
> > Our new website is being built on Django and we are trying to figure out 
> the 
> > easiest way to host and maintain the site. 
> > It seems there are a few managed hosting options like webfaction and 
> heroku, 
> > but they will only handle the linux and database patches and updates. 
> > 
> > I am hoping to find out how often Django need to be updated. -- like 
> every 
> > month? or more like one or twice a year? 
> > can a non-developer handle these updates or would we be better off 
> hiring 
> > someone? 
>
> At any given time, Django has three supported versions: 
>
>  * The current development trunk, updated on a daily basis. This isn't 
> a packaged version; it's just the current 'tip' of the code 
> repository. 
>
>  * The current Stable release (currently 1.4) 
>
>  * The current Security release (currently 1.3) 
>
> We publish a new stable release roughly every 12 months, at which 
> point the current stable moves to security, and the security release 
> becomes unsupported. So - somewhere around the end of this year, you 
> can expect to see a 1.5 stable release announced, which will make 1.4 
> the security release, and 1.3 will become unsupported. This means that 
> if you write code against the current stable Django release, you've 
> probably got about 2 years before you will need to look at doing a 
> major version upgrade. 
>
> If we are notified of a security problem, we will make a point release 
> for the stable and security versions. These releases are entirely 
> dictated by the reporting of security issues, so there's no formal 
> schedule -- however, historically, there is generally a couple of 
> months between security releases. 
>
> When a security release happens, upgrades are generally pretty simple. 
> The update process is generally not much more complicated than "pip 
> install -u django" (or whatever equivalent is appropriate for your 
> deployment platform). Security releases are announced on the 
> django-announce mailing list, as well as on our blog. 
>
> On larger version updates, there are sometimes some minor changes 
> between versions. However, we're aggressive about backwards 
> compatibility, and phasing in changes slowly, so you'll always have 
> plenty of warning if a change is coming; we document all the changes 
> in our release notes; and 
>  where possible, we raise runtime warnings letting you know of 
> potential problems that may occur in the future as a result of feature 
> changes. 
>
> So - in summary, you're probably looking at no more than a handful of 
> updates a year, and the upgrade process is generally pretty simple. 
> Whether a "non-developer" can handle the updates will really depend on 
> how far "non-developer" they are. The minor release updates shouldn't 
> pose any real difficulty. If you've got someone who is happy to manage 
> a server, they should be able to manage a minor Django update. The 
> major updates (every 1-2 years) will require a little bit more 
> attention to detail. 
>
> Yours 
> Russ Magee %-) 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/qebVaG9IVogJ.
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.



How often does Django need updates/patches?

2012-09-21 Thread Taylor Smith
Our new website is being built on Django and we are trying to figure out 
the easiest way to host and maintain the site. 
It seems there are a few managed hosting options like webfaction and 
heroku, but they will only handle the linux and database patches and 
updates. 

I am hoping to find out how often Django need to be updated. -- like every 
month? or more like one or twice a year? 
can a non-developer handle these updates or would we be better off hiring 
someone? 

any advice is much appreciated!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/bFVA65mLIFgJ.
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.



Multi-tenant open-source e-commerce solution?

2012-09-18 Thread Alec Taylor
Are there any open-source multi-tenant e-commerce solutions built with Django?

I.e.: where you can have multiple shops on the one site, and a
shop-create form on the frontend to add more shops.

If there aren't any, I'd be willing to start such a project.

Thanks for all suggestions,

Alec Taylor

-- 
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: Announcement of GUI for Creating Models

2012-09-08 Thread Alec Taylor
Kurtis: That looks very interesting; just finished reading it.

I wouldn't recommend this for Timothy though; it looks like something
which will require a large team to develop.

Maybe submit it as a project proposal to Canonical?

Or post on Django-Dev [and here] to see if you can get a large +
skilled enough team to build such a system.

On Sun, Sep 9, 2012 at 6:41 AM, Kurtis Mullins  wrote:
> You could take it a few steps farther and reproduce some work done by a
> doctor(now) I used to go to school with.
>
> http://knoesis.wright.edu/research/srl/projects/mobicloud/
>
>
> On Sat, Sep 8, 2012 at 2:50 PM, Javier Guerra Giraldez 
> wrote:
>>
>> On Fri, Sep 7, 2012 at 9:42 PM, Timothy Clemans
>>  wrote:
>> > I've developed a GUI for creating models, see
>> > https://github.com/timothyclemans/django-admin-models-editor
>> >
>> > Would this be helpful for developers? Would it be useful for you? Should
>> > I
>> > keep developing it? What features would you like to see added?
>>
>> personally, i much prefer the reverse approach:  i write the models,
>> and a tool (ie. django-extensions) generates a graphical
>> representation.
>>
>> pros:
>>  - the final models are exactly what i want them to be.  even if the
>> graphical tool doesn't support some obscure Django feature, i can
>> still use it; it's just not shown graphically.
>>
>>  - i don't have to learn a different (graphical) language
>>
>>  - i keep fluent in the real Django language, so i don't have to
>> relearn it when for any reason i don't have to use that tool.
>>
>> cons:
>>   - less sexy than not writing code
>>
>> --
>> Javier
>>
>> --
>> 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.
>>
>
> --
> 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.

-- 
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: Announcement of GUI for Creating Models

2012-09-07 Thread Alec Taylor
Suggestion: go visual

E.g.: fork this - http://gaesql.appspot.com/

On Sat, Sep 8, 2012 at 12:42 PM, Timothy Clemans
 wrote:
> I've developed a GUI for creating models, see
> https://github.com/timothyclemans/django-admin-models-editor
>
> Would this be helpful for developers? Would it be useful for you? Should I
> keep developing it? What features would you like to see added?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/AUCo4dXzbDEJ.
> 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.

-- 
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: Choosing a JS framework to go together with Django

2012-09-04 Thread Alec Taylor
AngularJS?

On Tue, Sep 4, 2012 at 11:39 PM, dotnetCarpenter
wrote:

> Hi all.
>
> I'm new here and just took over a Django project for the first time. I'm
> still getting to grip with Django but as a front end dev for the past 5
> years, I'm also looking for a client-side library/framework to go together
> with my project.
> My requirements for a JS framework is that it:
>
>1. is unobtrusive (Django rendered HTML will be shown to scraper bots
>like google)
>2. provides some sort of structure (MVC, MVP, MVVM ect.)
>3. embraces standards
>4. doesn't conflict with Django templates or does so intentionally
>5. ideally uses the same template language as Django
>
> In the ideal world a request/response scenario would look like this:
>
>1. A client make a (HTTP) request to the (django powered) web site
>with (HTTP) Accept header text/html
>2. Django response in the usual way by rendering the assign View
>(django template)
>3. The view figure out if JS is supported (implemented in JS). If no,
>this scenario stays in loop 1-3. If yes, then 4.
>4. The client (usually a browser) wire up the client-side app
>structure, hook in to URI links, add transitions between views,
>data-bindings ect.
>5. Subsequent request are now handle by the JS framework, either user
>initiated (e.g. clicking a link) or app initiated (e.g. pulling extra
>data), that will modify the request header to Accept header
>application/json or application/django-template.
>6. If django receive a request with an application/django-template
>header it will serve the view as plain text. E.g. Content-type: text/plain.
>On the other hand if django receive a request with application/json, it
>will send the object model defined in the view as JSON.
>7. The client-side JS framework will receive a template to render in
>the first request and the data to render in the template in the second
>request. A promise object could be used to synchronize the two calls.
>
> This way django will work as intended for non JS clients and silently
> convert to a RIA in clients that supports JS, with minimal double work for
> the two execution contexts.
> A big pro in this is the fact that both django and the JS framework share
> template and data (only has to defined once - in django) - we'll duck type
> all the way. But does this JS framework exist? Does anyone have any
> experience with working with django and JS frameworks? Is there any obvious
> pitfalls in my ideal world scenario in regard to Django? And finally, is it
> possible to serve templates as plain text with django?
>
>
> Cheers, Jon and thanks in advance
>
> PS. I accidentally cross-posted this to the Django Developers group before
> realizing it was the wrong forum. Sorry about that.
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/WrIx5DWqCVgJ.
> 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.
>

-- 
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: Ecommerce Solution

2012-08-27 Thread Alec Taylor
Well there's Django-Shop

On Mon, Aug 27, 2012 at 8:38 PM, Swaroop Shankar V <swaroo...@gmail.com> wrote:
> Hi Alec,
> Cartridge is the one you mean I guess, but after going through the document
> it seems i will require to install Mezzanine too. I was looking for an app
> which i can use with my existing project and also with some good
> documentation.
>
> Thanks and Regards,
> Swaroop Shankar V
>
>
>
> On Mon, Aug 27, 2012 at 2:37 AM, Alec Taylor <alec.tayl...@gmail.com> wrote:
>>
>> Mezzanine?
>>
>> On Mon, Aug 27, 2012 at 6:03 AM, Swaroop Shankar V <swaroo...@gmail.com>
>> wrote:
>> > Hi All,
>> > Previously I had asked similar question on this group and decided to go
>> > with
>> > Satchmo. After the implementation it turned out to be bit difficult to
>> > maintain since the system do not provide much plugin or customization
>> > support. So am thinking of implementing another ecommerce solution. The
>> > system am looking for is an app which I can use with my existing site.
>> > Also
>> > It would be better if the system would support a mechanism to migrate
>> > the
>> > existing data from satchmo. I checked few but almost every project lacks
>> > proper documentation. So is there any django ecommerce project that have
>> > good documentation and easy to integrate?
>> >
>> > Thanks and Regards,
>> >
>> > Swaroop Shankar V
>> >
>> > --
>> > 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.
>>
>> --
>> 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.
>>
>
> --
> 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.

-- 
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: Ecommerce Solution

2012-08-26 Thread Alec Taylor
Mezzanine?

On Mon, Aug 27, 2012 at 6:03 AM, Swaroop Shankar V  wrote:
> Hi All,
> Previously I had asked similar question on this group and decided to go with
> Satchmo. After the implementation it turned out to be bit difficult to
> maintain since the system do not provide much plugin or customization
> support. So am thinking of implementing another ecommerce solution. The
> system am looking for is an app which I can use with my existing site. Also
> It would be better if the system would support a mechanism to migrate the
> existing data from satchmo. I checked few but almost every project lacks
> proper documentation. So is there any django ecommerce project that have
> good documentation and easy to integrate?
>
> Thanks and Regards,
>
> Swaroop Shankar V
>
> --
> 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.

-- 
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: Full auth solution

2012-08-17 Thread Alec Taylor
Pinax?

On Sat, Aug 18, 2012 at 2:53 AM, pearlball
 wrote:
> Although the auth module is very useful, there's still a lot of faffing to be 
> done just to get a standard user login system in place. Can anyone recommend 
> a sort of boilerplate solution with a full suite of registration, user 
> profile pages, etc. written up and ready to copy/paste or plug/play?
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/muxbVUxSTJoJ.
> 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.
>

-- 
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.



Compile/generate JavaScript from Django Templates?

2012-08-07 Thread Alec Taylor
To completely decouple the client-side, would it be possible to
generate JavaScript from the server-side Django Template?

E.g.: using PyJamas

If not, I will use tastypie or piston to expose a RESTful JSON API
which I will consume with a JavaScript framework on the client-side
(AngularJS).

Would simplify things a lot and prevent double typing thought if it is
possible to compile/generate JavaScript from Django Templates.

Thanks for all information,

Alec Taylor

-- 
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.



Thoughts on web2py?

2012-08-05 Thread Alec Taylor
I've been playing around with web2py the past few months, even
open-sourced an event-site (aka meetup.com) which I wrote with it.

Now I might be starting a job where all I'll be doing is
Django—probably GeoDjango + Pinax—and was wondering a few things:

1. Apart from following the tutorial, what else should I do to learn Django?
2. What are your thoughts on web2py?

I will listen to reasons, e.g.: if you think I shouldn't look back to
web2py for other projects and stick with Django for all my future
projects.

Thanks for all suggestions,

Alec Taylor

-- 
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: Any free cloud database hosting ?

2012-07-19 Thread Alec Taylor
Rarr, I meant OpenShift not Open Cloud

>.<

On Thu, Jul 19, 2012 at 10:54 PM, surya  wrote:

> "Openshift?" .. what are you trying to say..
>
>
> On Thursday, July 19, 2012 4:06:03 AM UTC+5:30, doogster wrote:
>>
>> Openshift?
>>
>> On Monday, July 16, 2012 8:27:23 PM UTC-7, surya wrote:
>>>
>>> I am building a facebook application where I have to use database models
>>> (very small size ~ 1MB - 2MB). Is there any good cloud db storage website
>>> for hosting the database??
>>>
>>> I looked around Amazon Web Services, it has really great offers but "I
>>> don't have credit card" :(
>>>
>>> I thought of using Google Cloud but I need to use "django-no rel". As
>>> there are some external lib involved in my project which create tables, I
>>> don't think I can tweak them successfully!
>>>
>>> So, how exactly I should host the database??
>>>
>>> -- Actually, I am using fandjango, facepy libs which need a database
>>> models..
>>>
>>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/QwtTWHGcLzgJ.
>
> 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.
>

-- 
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: Any free cloud database hosting ?

2012-07-16 Thread Alec Taylor
No, I have a heorku account without a credit card.

Admittedly it was automatically created via facebook... :P

So just do the same thing, create an app on facebook and it'll say "special
offer from partner" click that and you'll be setup for free on Heroku

On Tue, Jul 17, 2012 at 1:39 PM, surya <kasturisu...@gmail.com> wrote:

> Heroku even needs "credit card". and let me check about red hat!
>
>
> On Tuesday, July 17, 2012 9:06:18 AM UTC+5:30, Alec Taylor wrote:
>>
>> Heroku or Red Hat Open Cloud
>>
>> On Tue, Jul 17, 2012 at 1:27 PM, surya <kasturisu...@gmail.com> wrote:
>>
>>> I am building a facebook application where I have to use database models
>>> (very small size ~ 1MB - 2MB). Is there any good cloud db storage website
>>> for hosting the database??
>>>
>>> I looked around Amazon Web Services, it has really great offers but "I
>>> don't have credit card" :(
>>>
>>> I thought of using Google Cloud but I need to use "django-no rel". As
>>> there are some external lib involved in my project which create tables, I
>>> don't think I can tweak them successfully!
>>>
>>> So, how exactly I should host the database??
>>>
>>> -- Actually, I am using fandjango, facepy libs which need a database
>>> models..
>>>
>>>  --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/django-users/-/**bWaPhd8NASIJ<https://groups.google.com/d/msg/django-users/-/bWaPhd8NASIJ>
>>> .
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to django-users+unsubscribe@*
>>> *googlegroups.com <django-users%2bunsubscr...@googlegroups.com>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/sE_JjV050NAJ.
>
> 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.
>

-- 
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: Any free cloud database hosting ?

2012-07-16 Thread Alec Taylor
Heroku or Red Hat Open Cloud

On Tue, Jul 17, 2012 at 1:27 PM, surya  wrote:

> I am building a facebook application where I have to use database models
> (very small size ~ 1MB - 2MB). Is there any good cloud db storage website
> for hosting the database??
>
> I looked around Amazon Web Services, it has really great offers but "I
> don't have credit card" :(
>
> I thought of using Google Cloud but I need to use "django-no rel". As
> there are some external lib involved in my project which create tables, I
> don't think I can tweak them successfully!
>
> So, how exactly I should host the database??
>
> -- Actually, I am using fandjango, facepy libs which need a database
> models..
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/bWaPhd8NASIJ.
> 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.
>

-- 
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: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-07-01 Thread Alec Taylor
Sounds good, but have you considered using Google+ Hangouts?

On Mon, Jul 2, 2012 at 1:09 AM, Cal Leeming [Simplicity Media Ltd]
 wrote:
> Wow - glad to see there's people interested in this!
>
> Here is the schedule, could everyone please select which days/times they are
> available (enter more than one if possible)
>
> http://www.doodle.com/8ptehyqr6uezhtsy
>
> I'll leave the schedule open until 14th July, whichever slot gets the most
> votes wins.
>
> Given our awful experiences with conferencing software, we'll probably be
> using livestream, and a backup stream from one of our own servers - both
> have a maximum capacity of 50 users at 720p.
>
> Cal
>
> On Sat, Jun 30, 2012 at 4:10 PM, Cal Leeming [Simplicity Media Ltd]
>  wrote:
>>
>> Hi all,
>>
>> As some of you know, I did a live webcast last year (July 2011) on our LLG
>> project, which explained how we overcome some of the problems associated
>> with large data processing.
>>
>> After reviewing the video, I found that the sound quality was very poor,
>> the slides weren't very well structured, and some of the information is now
>> out of date (at the time it was 40mil rows, now we're dealing with 700+mil
>> rows).
>>
>> Therefore, I'm considering doing another live webcast (except this time
>> it'll be recorded+posted the next day, the stream will be available in
>> 1080p, it'll be far better structured, and will only last 50 minutes).
>>
>> The topics I'd like to cover are:
>>
>> * Bulk data processing where bulk_insert() is still not viable (we went
>> from 30 rows/sec to 8000 rows/sec on bulk data processing, whilst still
>> using the ORM - no raw sql here!!)
>> * Applying faux child/parent relationship when standard ORM is too
>> expensive (allows for ORM approach without the cost)
>> * Applying faux ORM read-only structure to legacy applications (allows ORM
>> usage on schemas that weren't properly designed, and cannot be changed - for
>> example, vendor software with no source code).
>> * New Relic is beautiful, but expensive. Hear more about our plans to make
>> an open source version.
>> * Appropriate use cases for IAAS vs colo with SSDs.
>> * Percona is amazing, some of the tips/tricks we've learned over.
>>
>> If you'd like to see this happen, please leave a reply in the thread - if
>> enough people want this, then we'll do public vote for the scheduled date.
>>
>> Cheers
>>
>> Cal
>
>
> --
> 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.

-- 
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: Handling millions of rows + large bulk processing (now 700+ mil rows)

2012-07-01 Thread Alec Taylor
+! :]

On Sun, Jul 1, 2012 at 5:52 PM, ionic drive  wrote:
> +1 great!
>
>
> On Sat, 2012-06-30 at 16:10 +0100, Cal Leeming [Simplicity Media Ltd] wrote:
>
> Hi all,
>
>
>
> As some of you know, I did a live webcast last year (July 2011) on our LLG
> project, which explained how we overcome some of the problems associated
> with large data processing.
>
>
>
> After reviewing the video, I found that the sound quality was very poor, the
> slides weren't very well structured, and some of the information is now out
> of date (at the time it was 40mil rows, now we're dealing with 700+mil
> rows).
>
>
>
> Therefore, I'm considering doing another live webcast (except this time
> it'll be recorded+posted the next day, the stream will be available in
> 1080p, it'll be far better structured, and will only last 50 minutes).
>
>
>
> The topics I'd like to cover are:
>
>
>
> * Bulk data processing where bulk_insert() is still not viable (we went from
> 30 rows/sec to 8000 rows/sec on bulk data processing, whilst still using the
> ORM - no raw sql here!!)
>
> * Applying faux child/parent relationship when standard ORM is too expensive
> (allows for ORM approach without the cost)
>
> * Applying faux ORM read-only structure to legacy applications (allows ORM
> usage on schemas that weren't properly designed, and cannot be changed - for
> example, vendor software with no source code).
>
> * New Relic is beautiful, but expensive. Hear more about our plans to make
> an open source version.
>
> * Appropriate use cases for IAAS vs colo with SSDs.
>
> * Percona is amazing, some of the tips/tricks we've learned over.
>
>
>
> If you'd like to see this happen, please leave a reply in the thread - if
> enough people want this, then we'll do public vote for the scheduled date.
>
>
>
> Cheers
>
>
>
> Cal
>
>
> --
> 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.
>
> --
> 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.

-- 
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: Graphs in django

2012-06-11 Thread Alec Taylor
Put it in the template or whatnot

Might be an easier job for a javascript graph library, or even processing-js

On Tue, Jun 12, 2012 at 3:40 PM, Satvir Toor  wrote:
> here is code to display sin curve
>
> from pylab import *
>
> t = arange(0.0, 2.0, 0.01)
> s = sin(2*pi*t)
> plot(t, s, linewidth=1.0)
>
> xlabel('time (s)')
> ylabel('voltage (mV)')
> title('About as simple as it gets, folks')
> grid(True)
> show()
>
>
> its working well but the output is being display in different
> window..But i need to display this curve in browser window. Please
> tell me what changes i have to make in this code
>
> --
> Satvir Kaur
>
> --
> 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.
>

-- 
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: PyPm / Django 1.4?

2012-06-05 Thread Alec Taylor
On Mon, Jun 4, 2012 at 2:48 AM, Aaron C. de Bruyn  wrote:
> On Sat, Jun 2, 2012 at 9:43 AM, Bill Freeman  wrote:
>> Have you considered running under a virtualenv and pip installing
>> exactly what you need?
>
> Yes--that's what I may end up doing.  Just trying to remove a few
> steps from the 'install procedure' for a user that already doesn't
> like the CLI.
>
> Thanks,
>
> -A
>

If the CLI is the only thing stopping others from setting up the
server, then why not write up a neat little installer with a desktop
shortcut to run the Django server?

Easiest method would be to use NSIS to create the installer,
bootstrapping on the packages needed from here:
http://www.lfd.uci.edu/~gohlke/pythonlibs/

Alternatively if you have a bit more time on hand (or your compilers
and whatnot are already setup) bootstrap MinGW onto your NSIS and set
the PATH and modify the necessary Python files accordingly. Then you
wouldn't need to bootstrap anything but distribute
(http://packages.python.org/distribute/) and then you can just
silently run all the pip's and have it virtualenv'd all the way down
to a Desktop shortcut :)

-- 
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: Is there a custom forms component of python-web?

2012-05-24 Thread Alec Taylor
On Thu, May 24, 2012 at 8:29 PM, kevon wang  wrote:
> what is plonk. ?
>

Onomatopoeia


See: http://www.urbandictionary.com/define.php?term=plonk

-- 
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: JQuery Django

2012-05-23 Thread Alec Taylor
This might be helpful: http://www.djangobook.com/en/beta/chapter04/

On Wed, May 23, 2012 at 4:06 PM, cocoza4  wrote:
> I'm new to Django.
> How can i connect Django with jQuery?
>
> is there any additional tool that i need to install?
>
> could you show me a sample code also?
>
> Thanks in advance.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/OIGnCdgMJooJ.
> 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.

-- 
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: Django in mobile devices

2012-05-19 Thread Alec Taylor
I use Phonegap and Django

I created my mobile app using my exposed REST API with JSON calls in JavaScript

On Sat, May 19, 2012 at 7:08 PM, Phang Mulianto  wrote:
> Hi Mario,
>
> thanks for your response.
>
> i already know about sl4a .
>
> what i mean is, are there any known project that use django / mini django
> framework parts to build apps in mobile device, in this case android only or
> even multi device.
>
> this will be nice ... do mvc in mobile use python...   i mean ruby people
> already done it.
>
>
>
>
> On Sat, May 19, 2012 at 4:20 PM, Mario Gudelj 
> wrote:
>>
>> Have a look at http://www.linuxjournal.com/article/10940
>>
>>
>> Also http://thedjangoforum.com/board/thread/879/django-python-on-a-standalone-android/
>>
>> On 19 May 2012 00:54, Phang Mulianto  wrote:
>>>
>>> HI all,
>>>
>>> i recently see rhomobile.com , which running ruby in mobile devices, and
>>> phonegap which use javascript.
>>>
>>> do anyone aware of the equivalent python / django can be used for mobile
>>> devices..
>>>
>>> i am thinking about create app for the mobile client using web technology
>>> without go deeper in java.
>>>
>>> any comment appreciated.
>>>
>>>
>>> Thanks,
>>>
>>> Mulianto
>>>
>>> --
>>> 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.
>>
>>
>> --
>> 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.
>
>
> --
> 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.

-- 
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: Use Django to implement my GUI!

2012-05-18 Thread Alec Taylor
Dde

That architecture diagram shows exactly your problem.

You are thinking about this problem incorrectly.

- Server: nginx [or whatever] with Django
- Client: web-browser
- Admin:  Client: web-browser

#done

On Fri, May 18, 2012 at 1:36 PM, Eugène Ngontang <sympav...@gmail.com> wrote:
> Hi Guys!
>
> I've been busy a bit, I'm back to thread with the high level architecture.
> Attached here is a diagram, just to understand what i meant.
>
> Don't pay attention for object I use to describe modules or architecture
> components.
>
> Now you will be able to understand what I mean by the server module, the
> admin module, and the client module of my architecture.
>
> As you could see on the diagram, the admin module is installd on the
> server(where the server module is installed) and is destined to provide
> views to the GUI.
> The clients receive and send data to the server.
> When the admin make some actions, some clients are notifed, and when client
> send informations admin (GUi is notified).
>
> Now two things come in my mind when I was thinking :
>
> - First I could stay in the way I want the server to use HTTP for the admin
> side, and another protocol to communicate with client. In that way the Admin
> Module (Django) will alter and read data from data base. and the server
> module will alter and read data from database. Then each information
> retrievement will lead in reading database since informations could have
> been changed. You can that's really heavy.
>
> - Second do all things in http. Mean that my server is just a web
> application undertanding HTTP (I will the use django for that). The server
> will serve request depending on the type of request, and each client will
> communicate with the server using HTTP.  Then server will define pages/urls
> for admin (to be sent to the GUI), and pages/urls  for clients.
> By this way, the only relation between my modules will be the protocol (HTTP
> for the instance) and they could be implemented in what ever language we
> like. The sever will run asynchronously for admin and clients.
>   The admin will then be just an interface to wich convert data to the right
> display format for the GUI. And the GUI could be any type, and for the web
> interface type I will use DJANGO for my Admin module.
>    I will then also have to develop a http client for my client module.
>
> Actuallu I'm going to take the second choice, since it lets all the charge
> for read and write database to the server, which could run and publish
> informations asynchronously(websocket could help here).
>
> I precise that I'm not a web architect or designer, but i understand
> software architecture. I'm really a system and network engineer, with good
> developpement skill but not to much in web.
>
> Look now my architecture diagram and tell me if what I'm describing in the
> second item fit. And give idea if you have, about libraiies and or framwork
> that could help going fast and easy.
> I thing I will use django and green unicorn.
>
> Thanks for your attention.
>
>
>
> 2012/5/16 Alec Taylor <alec.tayl...@gmail.com>
>>
>> Oh right, it's just Pyjamas.
>>
>> Still, annoyed I didn't think to recommend it first!
>>
>>
>> On Thu, May 17, 2012 at 12:02 AM, Alec Taylor <alec.tayl...@gmail.com>
>> wrote:
>> > On Wed, May 16, 2012 at 10:49 PM, Frank Stüss <frank.stu...@stuess.de>
>> > wrote:
>> >> or maybe you might have a look at http://pyjs.org/
>> >> which could help you having an event aware client app in your browser.
>> >> Served by and with django.
>> >
>> > I'm impressed
>> >
>> > (just read the exec summary from homepage)
>> >
>> >>
>> >> Am Sonntag, den 13.05.2012, 17:14 +0400 schrieb Alireza Savand:
>> >>> No, i posted django-tastypie not tastypie itself and it's easy to use.
>> >>> Anyway if i'm implementing GUI based i would make it website, since
>> >>> it's an advantages of SaaS.
>> >>> But using client app[desktop-app] and a server-app[django] and having
>> >>> multiply client and ... makes maintaining like a nightmare.
>> >>> All i knew was that, Despite that you asked several question and i
>> >>> just claimed to help in one of them :D
>> >>>
>> >>> On Sun, May 13, 2012 at 4:06 PM, Eugène Ngontang <sympav...@gmail.com>
>> >>> wrote:
>> >>>         Yes, I can see tastypie is a good service, that even support
>> >>>         REST protocol.
>> >>>
>> >>>         But I'd firt basically implement my

Re: How do you install Django on a shared hosting without root access?

2012-05-17 Thread Alec Taylor
You could wget/curl over a version of
http://code.google.com/p/pts-mini-gpl/wiki/StaticPython

On Thu, May 17, 2012 at 6:21 PM, Dan Santos  wrote:
> Sorry I celebrated too early :( not sure if my local webhost can pull it of
> entirely?
> But they have been very forthcoming so far.
>
> I've just got SSH access with limited privileges.  And saw that I only have
> Python 2.4 and Django 1.3.
> But I want to run Django 1.4.
> And I couldn't setup virtualenv.py properly when I ran it on my shared
> hosting account :(
> http://www.virtualenv.org/en/latest/index.html
>
> It's not easy setting up Django on shared hosting, so much troubles. :(
>
>
>
>
>
> On Sunday, May 13, 2012 11:15:28 PM UTC+2, Gerald Klein wrote:
>>
>> What host?
>>
>>
>> thanks
>>
>> --jerry
>>
>> On Sun, May 13, 2012 at 2:49 PM, Dan Santos  wrote:
>>>
>>> I forced my local web host (twisted their arm) and the day after they
>>> created a new procedure for setting up Django without having to use root
>>> access.
>>>
>>> Problem solved :)
>>>
>>>
>>>
>>> On Saturday, May 12, 2012 8:39:27 PM UTC+2, Dan Santos wrote:

 Hi I'm confused about how to setup Django on my shared hosting account
 without using root.  They don't have Django or Python support so I will 
 have
 to install everything from scratch I guess.

 Do I install things in this order for shared hosting, or have I messed
 up the order when not using root?

 1. Python 2.7
 2. virtualenv.py
 http://www.virtualenv.org/en/latest/index.html

 3. (ENV1)$ pip install django


>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "Django users" group.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msg/django-users/-/JbtefCDiKMIJ.
>>> 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.
>>
>>
>>
>>
>> --
>>
>> Gerald Klein DBA
>>
>> contac...@geraldklein.com
>>
>> www.geraldklein.com
>>
>> j...@zognet.com
>>
>> 708-599-0352
>>
>>
>> Linux registered user #548580
>>
>>
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/hog5iooCFXAJ.
>
> 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.

-- 
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: Use Django to implement my GUI!

2012-05-16 Thread Alec Taylor
Oh right, it's just Pyjamas.

Still, annoyed I didn't think to recommend it first!


On Thu, May 17, 2012 at 12:02 AM, Alec Taylor <alec.tayl...@gmail.com> wrote:
> On Wed, May 16, 2012 at 10:49 PM, Frank Stüss <frank.stu...@stuess.de> wrote:
>> or maybe you might have a look at http://pyjs.org/
>> which could help you having an event aware client app in your browser.
>> Served by and with django.
>
> I'm impressed
>
> (just read the exec summary from homepage)
>
>>
>> Am Sonntag, den 13.05.2012, 17:14 +0400 schrieb Alireza Savand:
>>> No, i posted django-tastypie not tastypie itself and it's easy to use.
>>> Anyway if i'm implementing GUI based i would make it website, since
>>> it's an advantages of SaaS.
>>> But using client app[desktop-app] and a server-app[django] and having
>>> multiply client and ... makes maintaining like a nightmare.
>>> All i knew was that, Despite that you asked several question and i
>>> just claimed to help in one of them :D
>>>
>>> On Sun, May 13, 2012 at 4:06 PM, Eugène Ngontang <sympav...@gmail.com>
>>> wrote:
>>>         Yes, I can see tastypie is a good service, that even support
>>>         REST protocol.
>>>
>>>         But I'd firt basically implement my gui with django and when i
>>>         will master well django, i could use tastypie, and turn my
>>>         server to support REST, it will be a good thing.
>>>
>>>         But please let's keep using only django for the begining.
>>>
>>>         Thanks.
>>>
>>>
>>>         2012/5/13 Alireza Savand <alireza.sav...@gmail.com>
>>>                 https://github.com/toastdriven/django-tastypie
>>>
>>>
>>>                 On Sunday, May 13, 2012 2:14:36 PM UTC+4, Eugene
>>>                 NGONTANG wrote:
>>>                         Hi!
>>>
>>>                         I'm a python developper, but new in django.
>>>
>>>                         I'm devolopping a multi clients-server
>>>                         application.
>>>
>>>                         The server and the clients are communicating
>>>                         via sockets, The server
>>>                         receive somme states from clients, and display
>>>                         them in the User
>>>                         interface.
>>>                         In the other hand, the server has to send a
>>>                         message(packet) to the
>>>                         client when an event  occurs in the GUI, and
>>>                         data are stored in a
>>>                         database.
>>>
>>>                         Then I choose to make a web interface where
>>>                         data could be viewed and
>>>                         manipulated. And I discovered Django, which
>>>                         fit all my needs. I tested
>>>                         and liked the framework.
>>>
>>>                         My questions are:
>>>                         - Can I override the djando admin methods so
>>>                         that i can not only
>>>                         customized my views and html page, but also
>>>                         manipulate objects in
>>>                         database, so that i can do another action when
>>>                         catching an  event in
>>>                         the GUi.
>>>                         For example, taking the django admin tutorial,
>>>                         I would like to do and
>>>                         action like sending a message the user choose
>>>                         "add a poll". How can I
>>>                         do those things? Cause I noticed that method
>>>                         that alter data in data
>>>                         base are part of django admin module and
>>>                         cannot be overriden
>>>
>>>                         - To achieve what I want, i would like to run
>>>                         my server engine and my
>>>                         django admin in two separated threads. How do
>>>                         i run my admin module in
>>>                         a thread? Cause till now i'm using the command
>>>                         line "python manage.py
>>>                         runserver"
&

Re: Use Django to implement my GUI!

2012-05-16 Thread Alec Taylor
On Wed, May 16, 2012 at 10:49 PM, Frank Stüss  wrote:
> or maybe you might have a look at http://pyjs.org/
> which could help you having an event aware client app in your browser.
> Served by and with django.

I'm impressed

(just read the exec summary from homepage)

>
> Am Sonntag, den 13.05.2012, 17:14 +0400 schrieb Alireza Savand:
>> No, i posted django-tastypie not tastypie itself and it's easy to use.
>> Anyway if i'm implementing GUI based i would make it website, since
>> it's an advantages of SaaS.
>> But using client app[desktop-app] and a server-app[django] and having
>> multiply client and ... makes maintaining like a nightmare.
>> All i knew was that, Despite that you asked several question and i
>> just claimed to help in one of them :D
>>
>> On Sun, May 13, 2012 at 4:06 PM, Eugène Ngontang 
>> wrote:
>>         Yes, I can see tastypie is a good service, that even support
>>         REST protocol.
>>
>>         But I'd firt basically implement my gui with django and when i
>>         will master well django, i could use tastypie, and turn my
>>         server to support REST, it will be a good thing.
>>
>>         But please let's keep using only django for the begining.
>>
>>         Thanks.
>>
>>
>>         2012/5/13 Alireza Savand 
>>                 https://github.com/toastdriven/django-tastypie
>>
>>
>>                 On Sunday, May 13, 2012 2:14:36 PM UTC+4, Eugene
>>                 NGONTANG wrote:
>>                         Hi!
>>
>>                         I'm a python developper, but new in django.
>>
>>                         I'm devolopping a multi clients-server
>>                         application.
>>
>>                         The server and the clients are communicating
>>                         via sockets, The server
>>                         receive somme states from clients, and display
>>                         them in the User
>>                         interface.
>>                         In the other hand, the server has to send a
>>                         message(packet) to the
>>                         client when an event  occurs in the GUI, and
>>                         data are stored in a
>>                         database.
>>
>>                         Then I choose to make a web interface where
>>                         data could be viewed and
>>                         manipulated. And I discovered Django, which
>>                         fit all my needs. I tested
>>                         and liked the framework.
>>
>>                         My questions are:
>>                         - Can I override the djando admin methods so
>>                         that i can not only
>>                         customized my views and html page, but also
>>                         manipulate objects in
>>                         database, so that i can do another action when
>>                         catching an  event in
>>                         the GUi.
>>                         For example, taking the django admin tutorial,
>>                         I would like to do and
>>                         action like sending a message the user choose
>>                         "add a poll". How can I
>>                         do those things? Cause I noticed that method
>>                         that alter data in data
>>                         base are part of django admin module and
>>                         cannot be overriden
>>
>>                         - To achieve what I want, i would like to run
>>                         my server engine and my
>>                         django admin in two separated threads. How do
>>                         i run my admin module in
>>                         a thread? Cause till now i'm using the command
>>                         line "python manage.py
>>                         runserver"
>>
>>                         - I also tried to overide tables name, and
>>                         foreign keys names. Could
>>                         you guys provide me a true life example?
>>
>>                         - And now in the production step, I would like
>>                         you guys to tell me
>>                         what to choose for serving files. I would like
>>                         to with your experience
>>                         what's better between running a unicorn server
>>                         or apache with mod_wsgi
>>
>>                         I don't know if i'm clear, but i hope. In
>>                         brief I'd like to use the
>>                         django framework features to design my Gui
>>                         like i want, customize
>>                         interactions between the gui and the backend,
>>                         and choose a good web
>>                         server for the production.
>>
>>                         Thank you for advance
>>
>>               

Re: Use Django to implement my GUI!

2012-05-14 Thread Alec Taylor
No reason to do anything crazy like that.

Forget SOCKETS, use HTTP or HTTPS.

Clientside/mobileside/webside build in HTML+CSS+JS.

#win

On Tue, May 15, 2012 at 9:18 AM, Eugène Ngontang  wrote:
> Hi Jani!
>
> I haven't seen the last statements of your post, whre you say I'm not really
> clear and that i'm building a non-http GUI using Django.
>
>
> OK let's stay on the rendering issue only, and specify things simply. This
> is a simple description of the architecture I want to set up :
>
> - A Client (not a user interface). Client here means a module which is
> installed in a remote computer and communicate with the server via socket.
>
> - A server listening from several remote client (Here i'm not talking yet
> about http request), and receive informatons from them. In fact client must
> be doing actions and send informations about their actions to the server. In
> the oder hand data to be processed by each client is pushed/dispatched by
> the server.
>
> - And admin (not Django Admin, but admin in the sens of my app), destined to
> be the module allowing use of the application. Then the Admin module is part
> of the server and will proviede a GUI for manipulating data in the data
> base. It's in this GUI that users of the application will enter their
> request, by filling a form or clicking a link for exemple. And data from the
> GUI could be stored in the data base, while being send to the remote clients
> (not to be displayed by the client, but to be processed). In the same way,
> informations comming from those clients to the server have to be diplayed in
> the GUI.
>
> With a graphical GUI, The server could have a reference to an object
> representing my GUI, and it will be done.
> But I choose a web GUI for view and administration. It's where Django comes.
>
> And my problem is to make my server being running a network thread,
> receiving data from the GUI(web browser) and sending informations update to
> the GUI (for web page content).
>
> This is really my issue. If all the actions of my server depended on my GUI
> request (http request), I could do what I like behind when handling a http
> request, but while managing http:8080 connexions, the application is running
> another process/thread on another TCP/UDP port.
>
> And yes I want a web GUI.
>
> Is why I'm looking the best way to achieve that. We can exclude Django web
> server, as it will not be used in production for the application deployment.
>
> Hope now it's clear for you, and more for the other users.
>
> Thanks!
>
>
> 2012/5/13 Jani Tiainen 
>>
>> Hi,
>>
>> There is several ways to achieve what you maybe want to do. One of the
>> simplest way is separate frontend (your userinterface) and server backend.
>> You can build your Django application as a service (xml-rpc, json-rpc,
>> restful). That would give you advantage to choose whatever frontend you
>> like. Of course it would add some overhead.
>>
>> On Sun, May 13, 2012 at 1:14 PM, Eugene NGONTANG 
>> wrote:
>>>
>>> Hi!
>>>
>>> I'm a python developper, but new in django.
>>>
>>> I'm devolopping a multi clients-server application.
>>>
>>> The server and the clients are communicating via sockets, The server
>>> receive somme states from clients, and display them in the User
>>> interface.
>>> In the other hand, the server has to send a message(packet) to the
>>> client when an event  occurs in the GUI, and data are stored in a
>>> database.
>>>
>>
>> Note that Django is mainly built for web (HTTP protocol based)
>> applications. In such an environment you run two different things: your GUI
>> (usually browser) that is totally ignorant of server side (Django). Then you
>> send request to some URL, Django routes it to some view and view produces
>> again next output to be displayed in GUI (browser again). One of the common
>> functions in the view is database manipulation.
>>
>>>
>>> Then I choose to make a web interface where data could be viewed and
>>> manipulated. And I discovered Django, which fit all my needs. I tested
>>> and liked the framework.
>>>
>>> My questions are:
>>> - Can I override the djando admin methods so that i can not only
>>> customized my views and html page, but also manipulate objects in
>>> database, so that i can do another action when catching an  event in
>>> the GUi.
>>> For example, taking the django admin tutorial, I would like to do and
>>> action like sending a message the user choose "add a poll". How can I
>>> do those things? Cause I noticed that method that alter data in data
>>> base are part of django admin module and cannot be overriden
>>>
>>
>> You shouldn't "fight against admin". If something cannot be done in the
>> admin you usually get a way with writing your own stuff.
>>
>>>
>>> - To achieve what I want, i would like to run my server engine and my
>>> django admin in two separated threads. How do i run my admin module in
>>> a thread? Cause till now i'm using the command 

Re: Django News App

2012-05-14 Thread Alec Taylor
Mezzanine might be a bit of fun to work with

Also note that Django was developed for a news room, so you should be
fine with it as is (if you learn how to use it... maybe go through the
docs)


On Tue, May 15, 2012 at 12:28 AM, armagan  wrote:
> Hi,
> I am trying to practice a news app. I've tried to set up Django-cms
> app, it's running but it's a bit complex for a news application. And
> now I started to set up zinnia blog app.  Do you suggest another one?
>
> --
> 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.
>

-- 
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: Use Django to implement my GUI!

2012-05-13 Thread Alec Taylor
You could always create a responsive interface—e.g.: using
twitter-bootstrap—and then distribute it onto every platform.

Web (obviously): Django templates or "standard" web frontend—using
e.g.: REST, XMLRPC or JSONRPC—that calls functions and serialises data
in a less data heavy way (on clients' end)
Mobiles: Adobe's open-source PhoneGap
Desktops: Adobe Air, HTML Applications (Windows) and MacGap (OSX) are
all possibilities... however I would recommend checking out Nokia's
open-source Qt, and distributing your product with a renderer. In
essense, you would be distributing your own browser without your page
as homepage, and which can only access what you allow (e.g.:
*.mydomain.com/*). See their webkit-fancybrowser example for an idea
of how this could be done.

-- 
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: How to setup Python 2.7 and Virtualenv on a shared host with no root access?

2012-05-12 Thread Alec Taylor
You'll need the relevant C library

(zlib)

Or there is certainly a deb or rpm for it

On Sat, May 12, 2012 at 9:14 PM, Dan Santos <dansanto...@gmail.com> wrote:

> Thanks for the tips they will come in handy in the future! :)
>
> It seems like my web host did a kernel update or something and then gcc
> disappeared because it worked before.  But they have fixed that problem
> now.  So here's my real problem.
>
>
> dan@debian:~$ *cat .bash_aliases *
> alias py27='/home/dan/usr-32/Python-2.7.3/./python'
>
>
> dan@debian:~/usr-32$ *py27 virtualenv.py ~/.virtualenvs/ENV2*
> Traceback (most recent call last):
>   File "virtualenv.py", line 17, in 
> import zlib
> *ImportError: No module named zlib*
>
>
> How do I import zlib?
> I tried this yesterday but it didn't work.
> dan@debian:~/usr-32/Python-2.7.3$ *./configure --prefix=/home/dan/usr-32
> --with-zlib*
>
>
> On Saturday, May 12, 2012 12:45:09 PM UTC+2, Alec Taylor wrote:
>>
>> Without gcc you can't do anything yourself.
>>
>> Extract the binary out of the Python package for your platform
>>
>> Alternatively I think this has a Python interpreter:
>> http://portablelinuxapps.org/**development/wireshark<http://portablelinuxapps.org/development/wireshark>
>>
>> Might be only 2.6 though...
>>
>>
>> On Sat, May 12, 2012 at 8:29 PM, Dan Santos <dansanto...@gmail.com>wrote:
>>
>>> *1.)*
>>> Hi I have downloaded this zip file:  Python-2.7.3.tgz
>>>
>>> *2.)*
>>> And tried to compile it, I think it's called by doing this command:
>>>
>>> dan@debian:~/usr-32/Python-2.**7.3$ *./configure
>>> --prefix=/home/dan/usr-32*
>>> *
>>> *
>>> checking for --enable-universalsdk... no
>>> checking for --with-universal-archs... 32-bit
>>> checking MACHDEP... linux2
>>> checking EXTRAPLATDIR...
>>> checking machine type as reported by uname -m... x86_64
>>> checking for --without-gcc... no
>>> checking for gcc... no
>>> checking for cc... no
>>> checking for cl.exe... no
>>> configure: error: in `/home/dan/usr-32/Python-2.7.**3':
>>> configure: error: no acceptable C compiler found in $PATH
>>> See `config.log' for more details
>>>
>>>
>>> How do I deal with this on my shared host account with no root access?
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Django users" group.
>>> To view this discussion on the web visit https://groups.google.com/d/**
>>> msg/django-users/-/i_**yNbeu7jQgJ<https://groups.google.com/d/msg/django-users/-/i_yNbeu7jQgJ>
>>> .
>>> To post to this group, send email to django-users@googlegroups.com.
>>> To unsubscribe from this group, send email to django-users+unsubscribe@*
>>> *googlegroups.com <django-users%2bunsubscr...@googlegroups.com>.
>>> For more options, visit this group at http://groups.google.com/**
>>> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
>>> .
>>>
>>
>>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/STsg9RKgrt8J.
>
> 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.
>

-- 
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: How to setup Python 2.7 and Virtualenv on a shared host with no root access?

2012-05-12 Thread Alec Taylor
Without gcc you can't do anything yourself.

Extract the binary out of the Python package for your platform

Alternatively I think this has a Python interpreter:
http://portablelinuxapps.org/development/wireshark

Might be only 2.6 though...


On Sat, May 12, 2012 at 8:29 PM, Dan Santos  wrote:

> *1.)*
> Hi I have downloaded this zip file:  Python-2.7.3.tgz
>
> *2.)*
> And tried to compile it, I think it's called by doing this command:
>
> dan@debian:~/usr-32/Python-2.7.3$ *./configure --prefix=/home/dan/usr-32*
> *
> *
> checking for --enable-universalsdk... no
> checking for --with-universal-archs... 32-bit
> checking MACHDEP... linux2
> checking EXTRAPLATDIR...
> checking machine type as reported by uname -m... x86_64
> checking for --without-gcc... no
> checking for gcc... no
> checking for cc... no
> checking for cl.exe... no
> configure: error: in `/home/dan/usr-32/Python-2.7.3':
> configure: error: no acceptable C compiler found in $PATH
> See `config.log' for more details
>
>
> How do I deal with this on my shared host account with no root access?
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/i_yNbeu7jQgJ.
> 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.
>

-- 
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.



Web-framework+db with the widest scalability?

2012-05-12 Thread Alec Taylor


Disclosure: I have posted this on 
stackoverflowand 
comp.lang.python
.

I am building a project requiring high performance and scalability, 
entailing:

   - Role-based 
authenticationwith 
   
API-keylicensing
 to access data of specific users
   - API 
exposed with 
   REST  
(XML, 
   JSON ), 
XMLRPC, 
   JSONRPC  and 
SOAP
   - "Easily" configurable getters and 
settersto create APIs accessing 
the same data but with input/output in different 
   schemas 

A conservative estimate of the number of tables—often whose queries require 
joins—is: 20.

Which database type—e.g.: NoSQL  or 
DBMS
—key-value data store or 
object-relational 
database —e.g.: 
Redis  or 
PostgreSQL—and 
web-framework —e.g. 
Django , 
Web2Pyor 
Flask —would you recommend?
Thanks for all suggestions

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/django-users/-/fsXn3S3C48oJ.
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: Prototype of a web based code editor for Django

2012-05-11 Thread Alec Taylor
It looks alright, be sure to add code highlighting and debugging to
the online text editor (http://ace.ajax.org/).

Also need restart buttons and whatnot

On Sat, May 12, 2012 at 12:06 AM, Timothy Clemans
 wrote:
> I've created a basic web based code editor for Django, see
> http://198.144.178.112:8000
>
> Would you use this? What features do you want? Do you want to help develop
> it?
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/QeOZc9cy9R4J.
> 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.

-- 
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: Google Drive with Django?

2012-05-09 Thread Alec Taylor
This isn't helpful?

https://developers.google.com/drive/examples/python

On Thu, May 10, 2012 at 2:16 PM, Jordon Wing  wrote:
> Hey guys,
> I'm trying to integrate Google Drive into my app, and I'm having some trouble 
> using OAuth2. I'm not sure if any of you have played with the SDK, but if 
> anyone has, what library (if any) did you use? Is there anything that 
> simplifies the 200+ lines of code they have in the examples?
>
> Link to the SDK: https://developers.google.com/drive
>
> Thanks
>
> --
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To view this discussion on the web visit 
> https://groups.google.com/d/msg/django-users/-/qwx3ZJG5MYgJ.
> 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.
>

-- 
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: How would I go about building an API converter?

2012-05-02 Thread Alec Taylor
On Thu, May 3, 2012 at 12:52 AM, HarpB <hsbsi...@gmail.com> wrote:
> I am a big fan of TastyPie. But I don't understand your following
> requirement:
>
> Get/set (conversion) between different schemas
>
> I.e.: No matter the input API, you can get it formatted in whichever output
> API you request
>
> Are you simply trying to create a unified interface for all of you existing
> APIs? If so, are they using Django models?

They seem to be mostly written from C#, all the information they are
giving me is an auto-generated schema page with set/get examples in
SOAP [for one service] and XML [for the other]. I suspect that a few
of the others will be in JSON though.

> TastyPie would only be useful for you if you have existing Django Models.
> You could still use it without having Django models, but then you would
> have to write lot more of the api code yourself. TastyPie is a full-featured,
> drop-in API system. It is meant to simply included into your existing
> code, your attach it to your Django model and it will serve the data
> associated to the models. It provides all of the RESTful options: GET,
> POST, DELETE and PUT.
>
>
> Django-Piston also makes use of django models, but it does not solely relies
> on it. It provides a very basic interface (in comparison to TastyPie) and
> you would need to write all of the RESTful request handles yourself.
>
>
> Both TastyPie and Piston have authentication and authorization system.
>

The functionality I'm providing is as follows:

Server1 >[send as SOAP 1.1]>[My Server]>[Server3 receives as XML in
Server3 schema]
Server3>[Send as XML]>[My Server]>[Server1 receives as SOAP 1.1 in
Server1 schema]

However since they will still need to access the data on demand (and
not wait for a set/get operation from another party) I will need to
create models (database) storing all information received.

What would be the best way of doing this?

Would TastyPie still be a good choice, or would Django-Piston [or some
other] better suit this problem?

Thanks for all suggestions,

Alec Taylor

-- 
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.



How would I go about building an API converter?

2012-05-02 Thread Alec Taylor
I have multiple different APIs with different schemas serialised in XML or
JSON which I need to output as a standardised schema.

Main features needed:

   - *Serialisation to XML and JSON*
   - *Authentication*
  - I.e.: can't get/set data unless you have the correct user+pass
   - *Role/Scope limitation*
  - I.e.: you can't access everything in our database, only what your
  role allows for
   - *Get/set (conversion) between different schemas*
  - I.e.: No matter the input API, you can get it formatted in
  whichever output API you request

Is this the sort of problem Slumber <http://slumber.in/> with
TastyPie<http://tastypieapi.org/>would be best for?

Or are there a different libraries you'd recommend?

Thanks for all suggestions,

Alec Taylor

-- 
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: Using Django to develop a Database?

2012-04-29 Thread Alec Taylor
Quick offside: checkout the NLTK project for processing the information

On Sun, Apr 29, 2012 at 5:05 PM, Kevin A  wrote:
> Hello,
>
> I'm hoping someone can help me with my research.
>
> I've been tasked with helping to construct a Database. Within this
> database will be information (such as their strengths and weaknesses,
> how successful they are, etc.) about various organizations. Most of
> this information is more qualitative in nature.
>
> My question is two-fold:
>
> 1) Can Django be used to create such a database?
>
> 2) If so, once its created, does the user have to have an
> understanding of Python? Or is it possible to code a webpage, that is
> password protected, and then be able to use the webpage like a normal
> website?
>
> I would really appreciate any help/advice you can offer.
>
> --
> 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.
>

-- 
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: cannot import name `feed`

2012-04-14 Thread Alec Taylor
Actually it can be fixed by removing django.notifications like so:

Edit `settings.py` by commenting out
"notification.context_processors.notification", within
TEMPLATE_CONTEXT_PROCESSORS and "notification", # must be first from
INSTALLED_APPS. Finally edit urls.py by commenting out
url(r"^notices/", include("notification.urls")), within the patterns
tuple of urlpatterns.

Then edit templates/site_base.html by removing this line:

{% trans
"Notices" %}{% if notice_unseen_count %} ({{ notice_unseen_count }}){%
endif %} wrote:
> You have upgraded to Django 1.4.
>
> I had the same problem when going from Django 1.3.1 to 1.4.
>
> Suggestion:
>
> pip install django==1.3.1
>
> On Mar 6, 7:22 am, Alec Taylor <alec.tayl...@gmail.com> wrote:
>> I keep getting an ImportError saying "cannot import name `feed`".
>> (pinax-admin basic_project)
>>
>> I am running latest Pinax (from github) and latest DJango (from SVN),
>>
>> I have also tried with trunk versions of all dependencies, but I keep
>> getting this error.
>>
>> How can I overcome this error?
>>
>> Thanks for all suggestions,
>>
>> Alec Taylor
>
> --
> 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.
>

-- 
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: ecommerce like openCart in php

2012-04-11 Thread Alec Taylor
[Maybe] Mezzanine?

On Thu, Apr 12, 2012 at 10:35 AM, m1chael  wrote:
> i think you're barking up the wrong tree miss Hisham
>
> On Wed, Apr 11, 2012 at 6:34 PM, Randa Hisham  wrote:
>>
>> iam searching for an ecommerce  open source like OpenCart in php
>> -  -
>> Randa Hesham
>> Software Developer
>>
>> Twitter:@ro0oraa
>> FaceBook:Randa Hisham
>>
>> ٍ
>>
>> --
>> 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.
>
> --
> 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.
>

-- 
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: base.css 404ing on Django 1.4a1

2012-04-04 Thread Alec Taylor
Unknown command: 'collectstatic'

Note: I am running the latest official build of Django (1.4) with the
latest dev build of django-staticfiles.

Also of relevance:
> python manage.py help | grep -i "static"
satchmo_copy_static

(yes, I am running a satchmo shop)

On Thu, Apr 5, 2012 at 11:13 AM, swiharta <swihart.and...@gmail.com> wrote:
> I had to upgrade my version of django-staticfiles and do collectstatic. Hope
> that helps.
>
>
> On Thursday, February 2, 2012 12:26:47 PM UTC-5, Alec Taylor wrote:
>>
>> Trunk version cannot load Admin CSS.
>>
>> First I tried setting the ADMIN_MEDIA_PREFIX to MEDIA_PREFIX, when
>> that didn't work I tried manual replacing. Yes, I know it has been
>> depreciated and that the css are stored in
>> django\django\contrib\admin\static\admin\css, however it did not work
>> when omitted so I placed that \static\admin\ folder as a subdirectory
>> of my regular static directory.
>>
>> ADMIN_MEDIA_PREFIX is now set to: '/static/admin/' in settings.py.
>>
>> This partially worked, the top of my admin pages now look like this:
>> 
>> > href="/static/admin/css/dashboard.css"/>
>>
>> So dashboard.css is loading fine now, it's just base.css which isn't.
>>
>> How should I go about getting that base.css link to not 404, or
>> *actually* changing that ADMIN_MEDIA_PREFIX?
>>
>> Thanks for all suggestions,
>>
>> Alec Taylor
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/uT6xUVl_99gJ.
> 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.

-- 
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.



"Expression of Interest" django project

2012-04-03 Thread Alec Taylor
I am thinking to setup an "expression of interest" page with a survey
ending with a "subscribe for updates" button.

The relevant features being:
• View percentages who choice which options in the survey on a graph
• Subscribe for updates equates to newsletter backend
• Twitter Bootstrap theme

It shouldn't be too difficult to build this "from scratch" using:
• django-surveys
• django-chartit
• emencia-django-newsletter
• django-bootstrap

Then I would just put it for anyone to use on either GitHub or BitBucket.

The question I must ask before I begin this project though, is:
"Has someone done this already + have they done it well?"

Thanks for all information,

Alec Taylor

-- 
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.



Templated rich-text egg for Django?

2012-03-22 Thread Alec Taylor
Good morning,

We've all seen document templates in a variety of systems, such as
PowerPoint, MailChimp and Google Docs.

I would like to utilise the same sorts of capabilities on my website.

The following features I require:
• Create a library of document templates
• Allow others to pick a document template to create there document from
• Allow others to swap the template their document has without losing data
• Document authoring in rich-text (e.g. using CKEditor)

(I will probably end up using a full CMS such as Mezzanine around the
whole system.)

Please suggest modules allowing me to do the aforementioned.

Thanks for all recommendations,

Alec Taylor

-- 
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.



Theme template designer form

2012-03-16 Thread Alec Taylor
I am creating a website which will allow people to post content with "fluff"!

That is; users will apply choose from a selection of templates to
apply to their content[1] before displaying it on my website.

[1] Content contains no hyperlinks; just images and general
manipulation text manipulation (bold, italic, underline, alignment
[also for images], highlight and text-colour) with full drag-and-drop
support implemented in JavaScript.

Can you recommend some projects and/or modules which will assist in
building this project?

Thanks for all suggestions,

Alec Taylor

-- 
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: urllib2

2012-03-15 Thread Alec Taylor
Also, quick sort-of side-note:

I recommend checking out the python-requests library as an alternative
to urllib2

http://docs.python-requests.org

-- 
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.



[ImportError] cannot import name `feed`

2012-03-05 Thread Alec Taylor
I keep getting an ImportError saying "cannot import name `feed`".
(pinax-admin basic_project)

I am running latest Pinax (from github) and latest DJango (from SVN),

I have also tried with trunk versions of all dependencies, but I keep
getting this error.

How can I overcome this error?

Thanks for all suggestions,

Alec Taylor

-- 
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: django registration

2012-03-05 Thread Alec Taylor
*hard to say

On Tue, Mar 6, 2012 at 2:03 AM, Alec Taylor <alec.tayl...@gmail.com> wrote:
> Not sure how large your app is, so had to say.
>
> On Tue, Mar 6, 2012 at 1:59 AM, Stanwin Siow <stanwin.kts...@gmail.com> wrote:
>> I don't think using another external app now would be ideal since i want to
>> push it to production soon.
>>
>> From what i found online, it says i'm calling that profile_callback() that
>> is in the original forms.py.
>>
>> But having said that, i think Pinax is quite cool if i've got the time to
>> take a look at it.
>>
>> I've had a brief read.
>>
>> One thing that's bothering me is if i do use Pinax, do i have to rewrite
>> everything again?
>>
>>
>>
>> Best Regards,
>>
>> Stanwin Siow
>>
>>
>>
>> On Mar 5, 2012, at 9:53 PM, roy moss wrote:
>>
>> Pinax is an open-source platform built on the Django Web Framework.
>>
>> By integrating numerous reusable Django apps and providing starter projects
>> and infrastructure tools, Pinax takes care of the things that many sites
>> have in common so you can focus on what makes your site different.
>>
>> Pinax has been used for everything from social networks to conference
>> websites, and from intranets to online games.
>>
>>
>> --
>> 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.
>>
>>
>> --
>> 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.

-- 
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: django registration

2012-03-05 Thread Alec Taylor
Not sure how large your app is, so had to say.

On Tue, Mar 6, 2012 at 1:59 AM, Stanwin Siow  wrote:
> I don't think using another external app now would be ideal since i want to
> push it to production soon.
>
> From what i found online, it says i'm calling that profile_callback() that
> is in the original forms.py.
>
> But having said that, i think Pinax is quite cool if i've got the time to
> take a look at it.
>
> I've had a brief read.
>
> One thing that's bothering me is if i do use Pinax, do i have to rewrite
> everything again?
>
>
>
> Best Regards,
>
> Stanwin Siow
>
>
>
> On Mar 5, 2012, at 9:53 PM, roy moss wrote:
>
> Pinax is an open-source platform built on the Django Web Framework.
>
> By integrating numerous reusable Django apps and providing starter projects
> and infrastructure tools, Pinax takes care of the things that many sites
> have in common so you can focus on what makes your site different.
>
> Pinax has been used for everything from social networks to conference
> websites, and from intranets to online games.
>
>
> --
> 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.
>
>
> --
> 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.

-- 
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: django registration

2012-03-05 Thread Alec Taylor
DRY principle is what Django is all about.

Use Pinax instead of developing your own Profile system.

If Pinax profiles don't show exactly what you want, extend them.

Unless you're doing this as a learning exercise?

On Mon, Mar 5, 2012 at 10:46 PM, Stanwin Siow  wrote:
> Even after doing that,
>
> The error still occurs. And my data is still unsaved in the database.
>
> Should i be creating a backend?
>
> Best Regards,
>
> Stanwin Siow
>
>
>
> On Mar 5, 2012, at 7:13 PM, nicolas HERSOG wrote:
>
> I looked at my code in order to notice diffs.
>
> You should add return new_user() after your new_profile.save()
>
>
> On Mon, Mar 5, 2012 at 11:54 AM, Stanwin Siow 
> wrote:
>>
>> Greetings,
>>
>> How do i save a user's profile into the database once i entered the
>> details in my custom registration form?
>>
>> Also right now when i'm testing it out, i get the following error:
>>
>> create_inactive_user() got an unexpected keyword argument
>> 'profile_callback'
>>
>> What could be the problem here?
>>
>> Am i overriding the original form correctly?
>>
>> Appreciate any inputs. Cheers
>>
>> here are the snippets you require:
>>
>> Forms.py
>>
>> from django import forms
>> from r2.models import Keyword
>> from r2.models import UserProfile
>> from registration.forms import RegistrationForm
>> from registration.models import RegistrationProfile
>> from django.utils.translation import ugettext_lazy as _
>> from registration.forms import RegistrationForm, attrs_dict
>>
>> class ProjectSpecificRegistrationForm(RegistrationForm):
>>     keywords = forms.ModelChoiceField(queryset=Keyword.objects.all())
>>     first_name
>> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'First
>> Name'))
>>     last_name
>> =forms.CharField(widget=forms.TextInput(attrs=attrs_dict),label=_(u'Last
>> Name'))
>>
>> def save(self):
>>     new_user =
>> RegistrationProfile.objects.create_inactive_user(username=self.cleaned_data['username'],
>>     password=self.cleaned_data['password1'],
>>     email=self.cleaned_data['email'])
>>     new_profile =
>> UserProfile(user=new_user,username=self.cleaned_data['username'],
>> keywords_subscribed=self.cleaned_data['keywords'],first_name=self.cleaned_data['first_name'],last_name=self.cleaned_data['last_name'])
>>
>>     new_profile.save()
>>
>> project urls.py
>>
>> from r2.registration.views import activate
>> from r2.registration.views import register
>> from r2.forms import ProjectSpecificRegistrationForm
>>
>>     url(r'^accounts/', include('registration.urls')),
>>     #url(r'^accounts/profile/', 'r2.views.profile'),
>>     url(r'^keyword_subscribe/$', 'r2.views.keyword_subscribe'),
>>     url(r'^refresh_list/$', 'r2.views.refresh_list'),
>>     url(r'^test/$', 'r2.views.test'),
>>
>>     #registrations URLS
>>
>> url(r'^activate/(?P\w+)/$',activate,name='registration_activate'),
>>     url(r'^login/$',auth_views.login,{'template_name':
>> 'registration/login.html'}, name='auth_login'),
>>     url(r'^logout/$',auth_views.logout,{'template_name':
>> 'registration/logout.html'},name='auth_logout'),
>>
>> url(r'^password/change/$',auth_views.password_change,name='auth_password_change'),
>>
>> url(r'^password/change/done/$',auth_views.password_change_done,name='auth_password_change_done'),
>>
>> url(r'^password/reset/$',auth_views.password_reset,name='auth_password_reset'),
>>
>> url(r'^password/reset/confirm/(?P[0-9A-Za-z]+)-(?P.+)/$',auth_views.password_reset_confirm,name='auth_password_reset_confirm'),
>>
>> url(r'^password/reset/complete/$',auth_views.password_reset_complete,name='auth_password_reset_complete'),
>>
>> url(r'^password/reset/done/$',auth_views.password_reset_done,name='auth_password_reset_done'),
>>     url(r'^register/$',register, {'form_class' :
>> ProjectSpecificRegistrationForm},  name='registration_register'),
>>
>>     url(r'^register/complete/$',direct_to_template,{'template':
>> 'registration/registration_complete.html'},name='registration_complete'),
>>
>>
>>
>>
>> Best Regards,
>>
>> Stanwin Siow
>>
>>
>>
>>
>> --
>> 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.
>
>
>
> --
> 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.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to 

Re: Django and social network

2012-02-23 Thread Alec Taylor
Virtualenv is recommended but not required.

You can just install everything to PATH

On Fri, Feb 24, 2012 at 2:29 AM, Lewis Satini  wrote:
> The only problem with pinax that I dont like is to setup the virtual
> environment that make me so headache
>
> The site that you ask me to check out. It's a very good for me. I look after
> that site. 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.

-- 
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: Django and social network

2012-02-23 Thread Alec Taylor
If I keep persisting?

Okay

PINAX!

On Thu, Feb 23, 2012 at 11:49 PM, coded kid <duffleboi...@gmail.com> wrote:
> I guess my idea can help you out! Install Django 1.3. After
> installing, try and download packages like omab/social_auth that will
> enable users to log in through facebook, twitter etc. Also download
> agon_ratings that will enable users to rate. You can get those
> packages from djangopackages.com. Use Django comments for making users
> comments. You will have to write some views, models, templates codes
> for somethings. I hope you know about django?
>
> For me Pinax aint helping at all. You still have a long way to go
> though. If you keep persisting, you will get there. I'm also a noob
> though. Feel free to let me know what you think!
>
> Cheers
>
> On Feb 22, 6:53 pm, Alec Taylor <alec.tayl...@gmail.com> wrote:
>> k
>>
>> If you have issues, read the docs.
>>
>> If you still have issues, ask on pinax-users mailing-list not django-users.
>>
>> On Thu, Feb 23, 2012 at 3:57 AM, Lewis Satini <jubilee.le...@gmail.com>wrote:
>>
>>
>>
>>
>>
>>
>>
>> > and I can only install basic, I had problem getting the advance install
>>
>> > On Wed, Feb 22, 2012 at 11:57 AM, Lewis Satini 
>> > <jubilee.le...@gmail.com>wrote:
>>
>> >> How much experience do you have on pinax. Did you implemented before? do
>> >> you have the sample site, that I might able to look at? it is difficult to
>> >> install, because it have some requirement before you install it.
>>
>> >> On Wed, Feb 22, 2012 at 11:04 AM, Alec Taylor 
>> >> <alec.tayl...@gmail.com>wrote:
>>
>> >>> Pinax
>>
>> >>>http://pinaxproject.com/
>>
>> >>> On Thu, Feb 23, 2012 at 1:50 AM, Lewis <jubilee.le...@gmail.com> wrote:
>> >>> > I am new in Django. I know it is a good platform.
>> >>> > I want to know if there's any plug-ins or script that do social
>> >>> > networking. I research on Pinax, but it seem very difficult to set it
>> >>> > up. These are the feature that I want to implement:
>> >>> > 1. Profile system that link to their facebook or google profile that
>> >>> > they have.
>> >>> > 2. Login with gmail account or facebook account
>> >>> > 3. able to store they login and password to local database
>> >>> > 4. able to do rating and comments
>>
>> >>> > Can someone suggest anything?
>>
>> >>> > Thanks for your help
>>
>> >>> > --
>> >>> > 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.
>>
>> >>> --
>> >>> 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.
>>
>> >> --
>>
>> >> Artistbean.com <http://mobi.artistbean.com>
>> >> SMS at (646) 450-6756
>>
>> > --
>>
>> > Artistbean.com <http://mobi.artistbean.com>
>> > SMS at (646) 450-6756
>>
>> >  --
>> > 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.
>
> --
> 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.
>

-- 
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: Django and social network

2012-02-22 Thread Alec Taylor
k

If you have issues, read the docs.

If you still have issues, ask on pinax-users mailing-list not django-users.

On Thu, Feb 23, 2012 at 3:57 AM, Lewis Satini <jubilee.le...@gmail.com>wrote:

> and I can only install basic, I had problem getting the advance install
>
>
> On Wed, Feb 22, 2012 at 11:57 AM, Lewis Satini <jubilee.le...@gmail.com>wrote:
>
>> How much experience do you have on pinax. Did you implemented before? do
>> you have the sample site, that I might able to look at? it is difficult to
>> install, because it have some requirement before you install it.
>>
>>
>> On Wed, Feb 22, 2012 at 11:04 AM, Alec Taylor <alec.tayl...@gmail.com>wrote:
>>
>>> Pinax
>>>
>>> http://pinaxproject.com/
>>>
>>> On Thu, Feb 23, 2012 at 1:50 AM, Lewis <jubilee.le...@gmail.com> wrote:
>>> > I am new in Django. I know it is a good platform.
>>> > I want to know if there's any plug-ins or script that do social
>>> > networking. I research on Pinax, but it seem very difficult to set it
>>> > up. These are the feature that I want to implement:
>>> > 1. Profile system that link to their facebook or google profile that
>>> > they have.
>>> > 2. Login with gmail account or facebook account
>>> > 3. able to store they login and password to local database
>>> > 4. able to do rating and comments
>>> >
>>> > Can someone suggest anything?
>>> >
>>> > Thanks for your help
>>> >
>>> > --
>>> > 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.
>>> >
>>>
>>> --
>>> 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.
>>>
>>>
>>
>>
>> --
>>
>>
>> Artistbean.com <http://mobi.artistbean.com>
>> SMS at (646) 450-6756
>>
>>
>>
>
>
> --
>
>
> Artistbean.com <http://mobi.artistbean.com>
> SMS at (646) 450-6756
>
>
>  --
> 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.
>

-- 
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: Django and social network

2012-02-22 Thread Alec Taylor
Pinax

http://pinaxproject.com/

On Thu, Feb 23, 2012 at 1:50 AM, Lewis  wrote:
> I am new in Django. I know it is a good platform.
> I want to know if there's any plug-ins or script that do social
> networking. I research on Pinax, but it seem very difficult to set it
> up. These are the feature that I want to implement:
> 1. Profile system that link to their facebook or google profile that
> they have.
> 2. Login with gmail account or facebook account
> 3. able to store they login and password to local database
> 4. able to do rating and comments
>
> Can someone suggest anything?
>
> Thanks for your help
>
> --
> 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.
>

-- 
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: Creating a hospital erp (hospital management) in Django

2012-02-20 Thread Alec Taylor
...

Design doesn't matter one bit for what you're doing.

Don't try and win design awards by having CSS dropdowns.

Concentrate on solving their business logic rather than adding images
of sexy nurses

And get that book. There are free books online, there's the official
django tutorial also.

On Tue, Feb 21, 2012 at 1:12 AM, Saadat  wrote:
> Hello all
> I'm stuck on static files since yesterday. It gives me an error that
> no module called "staticfiles" found.  What my requirement is that i
> have a header file where I'm including a css dropdown menu. how do i
> include that file, without using staticfiles. What all needs to be
> done to include that file. Thanks a lot.
>
> Saadat
>
> On Feb 18, 7:09 pm, Marc Aymerich  wrote:
>> On Sat, Feb 18, 2012 at 2:52 PM, Saadat  wrote:
>> > Alec, I've tried including this css file everywhere, but it doesn't show 
>> > up anywhere. What exactly do i do with it to include this script on any 
>> > page, say index. i tried doing it through html as well as django. I don't 
>> > know what I'm doing wrong?
>>
>> check this:https://docs.djangoproject.com/en/dev/howto/static-files/
>>
>> btw, this seems to me a very basic web dev related question, so maybe
>> it will be better for you to spend some time learning general web dev
>> related stuff before doing things by your own.
>>
>> --
>> Marc
>
> --
> 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.
>

-- 
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: Creating a hospital erp (hospital management) in Django

2012-02-18 Thread Alec Taylor
http://divitodesign.com/css/how-to-dropdown-css-menu/

When you're doing template stuff, read:
- HTML
- CSS
- JS
- Python

tutorials.

Also, get a book. The questions you are asking are textbook level questions.

On Sat, Feb 18, 2012 at 11:53 PM, Saadat <saa...@saadat.in> wrote:
> Hello all
> Can someone guide me to create a drop down menu (single-level).. i
> need to put this menu in a header file that will be included in every
> page. A bit of code and some explanation is required. tried searching
> on the Internet, but couldn't find anything. thanks a lot
>
> On Feb 17, 7:50 am, Alec Taylor <alec.tayl...@gmail.com> wrote:
>> ModelForm
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Feb 16, 2012 at 10:18 PM, Saadat <saa...@saadat.in> wrote:
>> > Hi all, I created a view today and I could access the database
>> > contents using Templates. Now I wish to create a listbox that would
>> > have the names of doctors. When an item from the list is selected, an
>> > sql query should be sent which will return all the details of that
>> > doctor, where doc_id is the primary key? how do we create buttons? do
>> > we need to use html or django can handle them also?
>>
>> > Thanks a lot people.
>> > Saadat
>>
>> > On Feb 16, 4:12 pm, Saadat <saa...@saadat.in> wrote:
>> >> Hello All
>> >> I created a view today and I could access the database values usi
>>
>> >> On Feb 14, 8:07 am, Python_Junkie <software.buy.des...@gmail.com>
>> >> wrote:
>>
>> >> > Now that you have your file >>models.py  >>>> place this file in the
>> >> > app folder after creating your app
>>
>> >> > 1.  python manage.py start app  My_Erp (for example)
>> >> > 2.  a blank models.py file will be created, overwrite this with your
>> >> > models.py
>> >> > 3. run the command to sync the database, assuming that your set up the
>> >> > settings.py file has been set up correctly to connect to the database
>> >> > of your choice.
>>
>> >> > python manage.py syncdb
>>
>> >> > Let me know if this works for you
>>
>> >> > On Feb 13, 3:56 pm,Saadat<saa...@saadat.in> wrote:
>>
>> >> > > Thank you Python_junkie
>> >> > > I've created the poll app and I'm working on this Hospital ERP thing.
>> >> > > I've also created the database schema and put some dummy values for
>> >> > > testing. Then I created the models using 'inspected' command and saved
>> >> > > the models in models.py file. Now I'm confused where to put the
>> >> > > models.py file and what to with it. Guide me please.
>>
>> >> > > Thanks a lot.
>> >> > >Saadat
>>
>> >> > > On Feb 10, 6:18 pm, Python_Junkie <software.buy.des...@gmail.com>
>> >> > > wrote:
>>
>> >> > > > Not sure from your post, which piece you are stuck on.
>>
>> >> > > > 1. Have you used Django before?
>> >> > > > If not start with the tutorial
>>
>> >> > > >https://www.djangoproject.com/
>>
>> >> > > > 2. If you have a basic understanding of Django, have you been able 
>> >> > > > to
>> >> > > > set up a basic project /app and connect run syncdb.
>> >> > > > One can always connect to the sqllite database, because it is built
>> >> > > > in, but getting some other database to connect can be a time 
>> >> > > > consuming
>> >> > > > process if the procedure has not been established on your machine.
>>
>> >> > > > 3. If you have done the above 2 items then you should move in a
>> >> > > > parallel path.
>>
>> >> > > > a. Start defining your database model to support the business and 
>> >> > > > the
>> >> > > > workflow that you intend to create.
>> >> > > > b. Use some sort of wire frame (framework) to lay out your web pages
>> >> > > > to support and interact step 3 a.
>>
>> >> > > > On Feb 10, 8:06 am, adesantoas...@gmail.com wrote:
>>
>> >> > > > > Hello, nice thread.
>>
>> >> > > > > **tagged to keep following..
>>
>> >> > > > > +adesst
>>
>> >>

Re: Creating a hospital erp (hospital management) in Django

2012-02-16 Thread Alec Taylor
ModelForm

On Thu, Feb 16, 2012 at 10:18 PM, Saadat  wrote:
> Hi all, I created a view today and I could access the database
> contents using Templates. Now I wish to create a listbox that would
> have the names of doctors. When an item from the list is selected, an
> sql query should be sent which will return all the details of that
> doctor, where doc_id is the primary key? how do we create buttons? do
> we need to use html or django can handle them also?
>
> Thanks a lot people.
> Saadat
>
> On Feb 16, 4:12 pm, Saadat  wrote:
>> Hello All
>> I created a view today and I could access the database values usi
>>
>> On Feb 14, 8:07 am, Python_Junkie 
>> wrote:
>>
>>
>>
>>
>>
>>
>>
>> > Now that you have your file >>models.py   place this file in the
>> > app folder after creating your app
>>
>> > 1.  python manage.py start app  My_Erp (for example)
>> > 2.  a blank models.py file will be created, overwrite this with your
>> > models.py
>> > 3. run the command to sync the database, assuming that your set up the
>> > settings.py file has been set up correctly to connect to the database
>> > of your choice.
>>
>> > python manage.py syncdb
>>
>> > Let me know if this works for you
>>
>> > On Feb 13, 3:56 pm,Saadat wrote:
>>
>> > > Thank you Python_junkie
>> > > I've created the poll app and I'm working on this Hospital ERP thing.
>> > > I've also created the database schema and put some dummy values for
>> > > testing. Then I created the models using 'inspected' command and saved
>> > > the models in models.py file. Now I'm confused where to put the
>> > > models.py file and what to with it. Guide me please.
>>
>> > > Thanks a lot.
>> > >Saadat
>>
>> > > On Feb 10, 6:18 pm, Python_Junkie 
>> > > wrote:
>>
>> > > > Not sure from your post, which piece you are stuck on.
>>
>> > > > 1. Have you used Django before?
>> > > > If not start with the tutorial
>>
>> > > >https://www.djangoproject.com/
>>
>> > > > 2. If you have a basic understanding of Django, have you been able to
>> > > > set up a basic project /app and connect run syncdb.
>> > > > One can always connect to the sqllite database, because it is built
>> > > > in, but getting some other database to connect can be a time consuming
>> > > > process if the procedure has not been established on your machine.
>>
>> > > > 3. If you have done the above 2 items then you should move in a
>> > > > parallel path.
>>
>> > > > a. Start defining your database model to support the business and the
>> > > > workflow that you intend to create.
>> > > > b. Use some sort of wire frame (framework) to lay out your web pages
>> > > > to support and interact step 3 a.
>>
>> > > > On Feb 10, 8:06 am, adesantoas...@gmail.com wrote:
>>
>> > > > > Hello, nice thread.
>>
>> > > > > **tagged to keep following..
>>
>> > > > > +adesst
>>
>> > > > > -Original Message-
>> > > > > From:Saadat
>>
>> > > > > Sender: django-users@googlegroups.com
>> > > > > Date: Fri, 10 Feb 2012 02:58:16
>> > > > > To: Django users
>> > > > > Reply-To: django-users@googlegroups.com
>> > > > > Subject: Creating a hospital erp (hospital management) in Django
>>
>> > > > > Hello All,
>> > > > > I'm in my final year of computer science engineering and for my final
>> > > > > year project, i'm creating a hospital erp. I'm a bit confused about
>> > > > > where to start from. Any sort of help will be appreciated. Thanks a
>> > > > > lot.
>>
>> > > > > Cheers
>> > > > >Saadat
>>
>> > > > > --
>> > > > > 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 
>> > > > > athttp://groups.google.com/group/django-users?hl=en.
>
> --
> 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.
>

-- 
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: Creating a hospital erp (hospital management) in Django

2012-02-14 Thread Alec Taylor
Hi Saadat,

I recommend reading a book on Django to get started.

All the best,

Alec Taylor

On Wed, Feb 15, 2012 at 1:12 AM, Saadat <saa...@saadat.in> wrote:
> Thanks Sebastien, I already have the info about the various
> departments of the hospital. I also created a sample database with
> tables being Patient detail, Then I created the admin interface and I
> could login and see the app over there. I could also access and edit
> the details of the tables thru the admin interface. Now, how do i
> create the view for normal user who is not an admin. What do i have to
> do with the templates? Thanks for everything.
>
> Saadat
>
> On Feb 14, 6:37 pm, sebastien piquemal <seb...@gmail.com> wrote:
>> +1 to @Patricio Valarezo's comment :
>>
>> If you want to build a system for hospitals, you've got to know how an
>> hospital works first. So, make interviews, draw mockups, more
>> interviews, code a prototype, more interviews, and so on ... and only
>> then you'll know what you need to do.
>>
>> On Feb 14, 4:07 am, Python_Junkie <software.buy.des...@gmail.com>
>> wrote:
>>
>>
>>
>>
>>
>>
>>
>> > Now that you have your file >>models.py  >>>> place this file in the
>> > app folder after creating your app
>>
>> > 1.  python manage.py start app  My_Erp (for example)
>> > 2.  a blank models.py file will be created, overwrite this with your
>> > models.py
>> > 3. run the command to sync the database, assuming that your set up the
>> > settings.py file has been set up correctly to connect to the database
>> > of your choice.
>>
>> > python manage.py syncdb
>>
>> > Let me know if this works for you
>>
>> > On Feb 13, 3:56 pm, Saadat <saa...@saadat.in> wrote:
>>
>> > > Thank you Python_junkie
>> > > I've created the poll app and I'm working on this Hospital ERP thing.
>> > > I've also created the database schema and put some dummy values for
>> > > testing. Then I created the models using 'inspected' command and saved
>> > > the models in models.py file. Now I'm confused where to put the
>> > > models.py file and what to with it. Guide me please.
>>
>> > > Thanks a lot.
>> > > Saadat
>>
>> > > On Feb 10, 6:18 pm, Python_Junkie <software.buy.des...@gmail.com>
>> > > wrote:
>>
>> > > > Not sure from your post, which piece you are stuck on.
>>
>> > > > 1. Have you used Django before?
>> > > > If not start with the tutorial
>>
>> > > >https://www.djangoproject.com/
>>
>> > > > 2. If you have a basic understanding of Django, have you been able to
>> > > > set up a basic project /app and connect run syncdb.
>> > > > One can always connect to the sqllite database, because it is built
>> > > > in, but getting some other database to connect can be a time consuming
>> > > > process if the procedure has not been established on your machine.
>>
>> > > > 3. If you have done the above 2 items then you should move in a
>> > > > parallel path.
>>
>> > > > a. Start defining your database model to support the business and the
>> > > > workflow that you intend to create.
>> > > > b. Use some sort of wire frame (framework) to lay out your web pages
>> > > > to support and interact step 3 a.
>>
>> > > > On Feb 10, 8:06 am, adesantoas...@gmail.com wrote:
>>
>> > > > > Hello, nice thread.
>>
>> > > > > **tagged to keep following..
>>
>> > > > > +adesst
>>
>> > > > > -Original Message-
>> > > > > From: Saadat <saa...@saadat.in>
>>
>> > > > > Sender: django-users@googlegroups.com
>> > > > > Date: Fri, 10 Feb 2012 02:58:16
>> > > > > To: Django users<django-users@googlegroups.com>
>> > > > > Reply-To: django-users@googlegroups.com
>> > > > > Subject: Creating a hospital erp (hospital management) in Django
>>
>> > > > > Hello All,
>> > > > > I'm in my final year of computer science engineering and for my final
>> > > > > year project, i'm creating a hospital erp. I'm a bit confused about
>> > > > > where to start from. Any sort of help will be appreciated. Thanks a
>> > > > > lot.
>>
>> > > > >

Re: Creating a hospital erp (hospital management) in Django

2012-02-10 Thread Alec Taylor
On Fri, Feb 10, 2012 at 9:58 PM, Saadat  wrote:
> Hello All,
> I'm in my final year of computer science engineering and for my final
> year project, i'm creating a hospital erp. I'm a bit confused about
> where to start from. Any sort of help will be appreciated. Thanks a
> lot.
>
> Cheers
> Saadat
>

A lot of ERP is general across any field.

I recommend working from the AGPL licensed OpenERP into Django
(http://apps.openerp.com/addon/4533): http://openerp.com

Then just build in all the hospital ERP related functions, streamline
all the interfaces (including config and admin interfaces).

If you find yourself finishing the project early, just throw in some
scope-creep :P, it's an ERP afterall!

Good luck ;)

-- 
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.



Checklist for appreciating a project from 1.2.7 to 1.4a1

2012-02-03 Thread Alec Taylor
Good afternoon,

I'm bringing the "social-commerce" project up to the latest trunk of
Pinax and Django.

Is there a checklist of things I'll need to update?

I've begun updating it, i.e. adding the new database dictionary:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'OPTIONS': {
'read_default_file': '/path/to/my.cnf',
},
}
}

But it keeps giving me error after error once I've done that, so
instead of tackling issues one at a time, I thought their might be a
guide of some sort?

Thanks for all suggestions,

Alec Taylor

-- 
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.



base.css 404ing on Django 1.4a1

2012-02-02 Thread Alec Taylor
Trunk version cannot load Admin CSS.

First I tried setting the ADMIN_MEDIA_PREFIX to MEDIA_PREFIX, when
that didn't work I tried manual replacing. Yes, I know it has been
depreciated and that the css are stored in
django\django\contrib\admin\static\admin\css, however it did not work
when omitted so I placed that \static\admin\ folder as a subdirectory
of my regular static directory.

ADMIN_MEDIA_PREFIX is now set to: '/static/admin/' in settings.py.

This partially worked, the top of my admin pages now look like this:



So dashboard.css is loading fine now, it's just base.css which isn't.

How should I go about getting that base.css link to not 404, or
*actually* changing that ADMIN_MEDIA_PREFIX?

Thanks for all suggestions,

Alec Taylor

-- 
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: Displaying template location in html

2012-01-31 Thread Alec Taylor
Thanks donarb, I'll give that toolbar a try.

Mario: I though Python has all that fancy metaprogramming stuff like
Ruby with Objective C style reflection?

On Mon, Jan 30, 2012 at 12:19 PM, donarb <don...@gmail.com> wrote:
> Use the Django Debug Toolbar, it shows all kinds of things. For
> templates, it shows the names of all the templates that make up the
> given page as well as which tags are used on the page.
>
> With DDT, you don't have to annotate (and un-annotate) anything.
>
> http://pypi.python.org/pypi/django-debug-toolbar
>
> On Jan 28, 10:26 pm, Alec Taylor <alec.tayl...@gmail.com> wrote:
>> With 40+ HTML files it's easy to get confused as to where each
>> component comes from.
>>
>> I don't want to annotate each file with its relative path manually, as
>> this will prove cumbersome when the site finally goes production.
>>
>> Is there a trick to displaying the template location on-screen?
>>
>> Thanks for all suggestions,
>>
>> Alec Taylor
>
> --
> 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.
>

-- 
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.



Admin CSS not loading on dev

2012-01-29 Thread Alec Taylor
I cannot get the admin CSS to load.

The dev docs shows that:
"ADMIN_MEDIA_PREFIX
Deprecated in Django 1.4: This setting has been obsoleted by the
django.contrib.staticfiles app integration"

Checking another project I had which I generated with "startproject"
on 1.4a1 I found that its CSS works and is located here:
django\django\contrib\admin\static\admin\css

However I cannot figure out how to make the css load in my other
project. I have tried setting up a new virtualenv, but this didn't
make a difference.

Please tell me how to autoload the CSS without manually moving the .css files.

Thanks for all suggestions,

Alec Taylor

-- 
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.



Displaying template location in html

2012-01-28 Thread Alec Taylor
With 40+ HTML files it's easy to get confused as to where each
component comes from.

I don't want to annotate each file with its relative path manually, as
this will prove cumbersome when the site finally goes production.

Is there a trick to displaying the template location on-screen?

Thanks for all suggestions,

Alec Taylor

-- 
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.



Tutorial for dev version not working (Polls app): admin

2012-01-28 Thread Alec Taylor
Going through the tutorial using the latest trunk in a virtualenv.

I am getting stuck in this section:
https://docs.djangoproject.com/en/dev/intro/tutorial02/#s-customize-the-admin-form

No matter how I rearrange the fields (even when I remove the
"question" field), I cannot notice any difference in the poll admin
screens. I have tried syncdb, and restarting the server.

I've looked at the index screen
(http://localhost:9400/admin/polls/poll/), the view screen
(http://localhost:9400/admin/polls/poll/1/) and the add screen
(http://localhost:9400/admin/polls/poll/add/). There are no
differences in field order/display on any of these pages.

I have followed the tutorial exactly, but the fields aren't being rearranged.

Is there a different way of rearranging admin fields in Django 1.4?

Thanks for helping me get this working,

Alec Taylor

-- 
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.



Learning Django+Pinax - Recommend books and/or tutorials?

2012-01-25 Thread Alec Taylor
A friend of mine is joining my team, but unfortunately only knows a
little Python (CGI) and neither Django nor Pinax.

Which books and/or online tutorials should I recommend to him?

I am thinking:
- https://docs.djangoproject.com/en/dev/intro/
- http://www.lightbird.net/dbe/

But not sure if the second link is still valid for 1.4, and if I'd be
better off giving a textbook of some description to him.

What would you recommend?

Thanks for all suggestion,

Alec Taylor

-- 
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.



Model-driven Django development

2012-01-20 Thread Alec Taylor
At University I've learned various techniques for model-driven
developments, such as:
- Class diagrams (generate code)
- ERD Diagrams (generate db code [e.g. SQL])

Can any of these sorts of—or for that matter, any sort of—model-driven
development techniques be used for Django?

-- 
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.



Multiple Symposion installs on single-domain

2012-01-19 Thread Alec Taylor
I would like to wrap Symposion into an architecture that permits
multiple Symposion "installs" (multi-site) on the one domain.

Symposion is the conference project built with Pinax which is used by
large Python conferences including PyCon and DjangoCon.

I would like to create a project providing the following features:
- Display list of conferences hosted on this domain
- Create a new conference "site" with one click (specific user-roles only)
- Centralised authentication and profiles (eventually expanded out
into a group-centred system [http://i40.tinypic.com/hvzdrk.png])

So the only link between Symposion "installs" is the centralised
authentication and profiles which show conference attendance history.

Any advice on how to allow multiple Symposion installs on the one domain?

Thanks for all suggestions,

Alec Taylor

-- 
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.



Meetup.com/EventBrite/SmallCommunities equivalent in Django?

2012-01-18 Thread Alec Taylor
Is there an equivalent to Ruby's SmallCommunities, Meetup.com or
EventBrite in Django?

I've been looking at the features of Symposion and of a few Pinax and
handstand projects, but I've yet to find something workable for a
Meetup.com/EventBrite style event repository project.

Do you know of one?

Thanks for all suggestions,

Alec Taylor

-- 
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: Pinax or Straight Django

2012-01-17 Thread Alec Taylor
Well if you're writing social-style apps (e.g. friends, invites,
events, groups, forums, blogs, wikis, social-networks) then Pinax.
Otherwise go with Django.

On Tue, Jan 17, 2012 at 6:12 PM, Kevin Miller  wrote:
> Dear all,
>
> I have been struggling between using Pinax or Straight django to
> develop my apps. I have never used Pinax,  but was reading on it.
> I have already only developed one website in django although it is not
> yet launched.
>
> I would really like to hear the experiences of those who have used both.
>
> Are there really any benefits in using Pinax?
>
> NB: On a quick browse on google I realize that it was difficult to
> find good and up to date tutorials on Pinax.
>
>
> Thanks in advance for the replies.
>
>
> Kevin
>
> --
> 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.
>

-- 
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.



  1   2   3   4   5   >