Django polls application problem

2013-06-20 Thread Kamal Kaur
I am new to Django. Creating my first application, Polls. Some field was 
missing in database when I tried to enter multiple 
choices in a poll from terminal. Even it was not done when admin.py 
file was changed to show a bunch of choices. Now previous database is 
dropped and a new one is created. Now python server is not running :( 

$ python manage.py runsrver 
ImportError: Could not import settings 'myapp.settings' (Is it on 
sys.path?): No module named myapp.settings 

Thanks in advance

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




Advanced search in django?

2013-07-06 Thread Kamal Kaur
I have found the code for Soundex which is a phonetic algorithm, it is
capable of searching from database despite of minor spelling
differences. But don't know how to implement it in my project to
search in database. Do I need to keep a
separate file? or what to do ?
Here is the link.
https://github.com/japerk/nltk-trainer/blob/76d538aa35f6b311b7ce68879b543e0602d1a7cf/nltk_trainer/featx/phonetics.py


--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Advanced search in django?

2013-07-06 Thread Kamal Kaur
On Sat, Jul 6, 2013 at 9:39 PM, Javier Guerra Giraldez
 wrote:
> not a separate file, but a separate field.  either override the save()
> method of your model, or connect to the pre_save() signal to keep it
> updated with the 'original' text.  for searches simply query this
> field against the soundex of the input.
>
> don't forget to add an index to the soundex field

Sorry, didn't get you.
Can you please elaborate more?

--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Advanced search in django?

2013-07-08 Thread Kamal Kaur
On Sat, Jul 6, 2013 at 9:47 PM, Kamal Kaur  wrote:
> Sorry, didn't get you.
> Can you please elaborate more?


Reply awaited.

--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Unable to get python manage.py runserver to work

2013-07-11 Thread Kamal Kaur
On Fri, Jul 12, 2013 at 8:31 AM, Yves S. Garret
 wrote:
> What am I screwing up?

Try using quote:
[...] project_name.settings [...]

instead of
[...] {{ project_name }}.settings [...]



--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django templates

2013-07-17 Thread Kamal Kaur
On Wed, Jul 17, 2013 at 8:04 PM, Harjot Mann  wrote:
> No, this is not admin problem. I am getting the reports templates but
> these are not saved anywhere, valuse are coming from database. But I
> want to take the print outs i.e the hard copy of all the reports which
> are made till now by saving at one place. Is this possible through
> some python script or any other method through which I can save all of
> them as pdf and take the prints??


Hope this helps:
https://docs.djangoproject.com/en/dev/howto/outputting-pdf/

http://stackoverflow.com/questions/1377446/html-to-pdf-for-a-django-site

--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django templates

2013-07-17 Thread Kamal Kaur
On Wed, Jul 17, 2013 at 8:33 PM, Harjot Mann  wrote:
> @ Kamal thnks but its already there.


It must work if it is there??

--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: django templates

2013-07-17 Thread Kamal Kaur
On Wed, Jul 17, 2013 at 9:13 PM, Harjot Mann  wrote:
> It is used only for one report and there is some error,so it is there
> but not working.


Then fix it!

--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Search from database

2013-07-19 Thread Kamal Kaur
Can we have a search module in django that can suggest resembling
spellings from mysql database?

--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Search from database

2013-07-21 Thread Kamal Kaur
We can search from database using phonetic codes or queries. I want an
advanced search module in my project. That can suggest similar
spellings from database, if user enters something wrong, like if
something is misspelled, it must tell that you might have entered
something wrong, similar results are shown. And more options for user
to search accordingly. Can something be done using regex? or I need to
go for Haystack/Apache solr?


--
Kamaljeet Kaur

Blog:http://kamalkaur188.wordpress.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 post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Search from database

2013-07-23 Thread Kamal Kaur
On Wed, Jul 24, 2013 at 5:15 AM, Amirouche Boubekki
 wrote:
> Apache solr or ElasticSearch: yes
> Haystack: maybe
> Regex: no


Thanks.
Studying ElasticSearch currently.


-- 
Kamaljeet Kaur

kamalkaur188.wordpress.com
facebook.com/kaur.188

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




Re: Search from database

2013-07-25 Thread Kamal Kaur
On Wed, Jul 24, 2013 at 5:15 AM, Amirouche Boubekki
 wrote:
> Apache solr or ElasticSearch: yes

Is this the right method for installation? What is the need to adduser?
http://www.cubrid.org/wiki_tutorials/entry/install-apache-solr-on-ubuntu

These commands don't extract the files:
http://django-haystack.readthedocs.org/en/latest/installing_search_engines.html


-- 
Kamaljeet Kaur

kamalkaur188.wordpress.com
facebook.com/kaur.188

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




Re: Search from database

2013-07-26 Thread Kamal Kaur
On Fri, Jul 26, 2013 at 12:10 PM, Kamal Kaur  wrote:
> These commands don't extract the files:
> http://django-haystack.readthedocs.org/en/latest/installing_search_engines.html

Installed with this:
http://mirror.metrocast.net/apache/lucene/solr/4.4.0/solr-4.4.0.tgz

-- 
Kamaljeet Kaur

kamalkaur188.wordpress.com
facebook.com/kaur.188

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




Haytack Installation of search engines

2013-07-28 Thread Kamal Kaur
In the 
documentation,

""" More Like This

To enable the “More Like This” functionality in Haystack, you’ll need to
enable the MoreLikeThisHandler. Add the following line to your
solrconfig.xml file within the config tag:

 """

Which solrconfig.xml file they are refering to?
There are many.

-- 
Kamaljeet Kaur

kamalkaur188.wordpress.com
facebook.com/kaur.188

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




Haystack

2013-07-30 Thread Kamal Kaur
Running the following command, output is: "All documents removed."

$ ./manage.py rebuild_index

Documentation

says-
"Simply run ./manage.py rebuild_index. You’ll get some totals of how many
models were processed and placed in the index."

What I am missing? As this command must create indexes by processing
models. And how does my search_indexes.py file actually look like?
Currently it looks like this: http://tny.cz/d842c556


-- 
Kamaljeet Kaur

kamalkaur188.wordpress.com
facebook.com/kaur.188

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




Re: Haystack

2013-07-30 Thread Kamal Kaur
On Tue, Jul 30, 2013 at 3:10 PM, Kamal Kaur  wrote:
>
> What I am missing? As this command must create indexes by processing models. 
> And how does my search_indexes.py file actually look like?
> Currently it looks like this: http://tny.cz/d842c556


I have created the template for haystack search and can open it, enter
any query. But there is no connectivity with database yet and its not
giving results. What I have uderstood is that, in haystack, indexes
for models are created. In documentation they say that indexes are
created after running that command. But its not happening.
Also there was a command (./manage.py build_solr_schema ), whose
result was to be placed in schema.xml file (
solr-4.4.0/example/example-DIH/solr/solr/conf)  And it was not given
whether to append the file or replace the content.
Am I able to explain the problem?

-- 
Kamaljeet Kaur

kamalkaur188.wordpress.com
facebook.com/kaur.188

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




Django query from database

2013-10-11 Thread Kamal Kaur
Hello there,

Hope you are doing well :)

I have a problem regarding querying a list from two tables, the
procedure goes like:

Considering two tables from mysql database:

1. UserProfile table, with complete client details: First name, Last
name, Address, email id, Contact number etc.
2. CodeTable, with only two columns 'Word' and 'Code'. Codes are
soundex codes for the words in first column like:

WordCode
DavidD130
Henry   H560
OstroO236
Milton   M435
HenrooH560

These 'words' are also contained in UserProfile table somewhere, can
be in any column. I have a list A with soundex codes, entered by user,
obtained with request.GET like:
A= ['D130', 'H560', 'O236']

Here starts the problem, I have to fetch 'Words' from CodeTable
corresponding to the 'Codes' in list A, meaning that I need another
list B, like:

B = ['David', 'Henry', 'Ostro', ' Henroo']

Because the code H560 is same for ' Henroo', it will also be there in
list B as we are searching for all the words that have 'codes' in list
A.

For this list B, I want to search all the client details i.e. I want
to display all the clients that have any of the words in list B from
UserProfile table.

I am not getting how to accomplish this searching using Django
queries. I am not able to make a view/function for this logic. Please
help and feel free to ask details if problm is not clear.

Thanks ^_^


-- 
Kamaljeet Kaur

-- 
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/CAP8Q%2BxhO%3DeZJjdui4OOw1T3V2QqtJW_PnC-BTTCDdBogipc8sw%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django query from database

2013-10-11 Thread Kamal Kaur
On Fri, Oct 11, 2013 at 4:06 PM, Leonardo Giordani
 wrote:
> I think that you have to perform a query for each Code, extracting the list
> of Word matching that Code and then merging all the lists.

Exactly!

> Since I don't know your models, I'll give you some general code, let me know
> if you understand how to implement it exactly on your models.

Here are these two models: http://tny.cz/82158e83


> This is the basic algorithm. You can then make all sorts of Python magic
> tricks to shorten it or make it faster, but if you are not dealing with
> billions of data I do suggest you to keep it simple and readable.

Ok.

> If you need to have each element in B appear just one time (uniqueness) just
> perform a B = set(B) at the end.

Ok.

> Let me know if it works. =)

Yes it will work! But after extending list B, I want to search the
elements of list B from UserProfile table. Here the word can be
anywhere and can be more than one times. Also two words in list B can
be in same column. Here also the results must be unique.

Also how to get the output in a template? The tuples containing
elements of list B from UserProfile table are to be displayed in that
template.

Thanks ^_^

-- 
Kamaljeet Kaur

-- 
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/CAP8Q%2BxidZD%2B6mo2z4POabcX_WBFPvEk%3D%3Dg%2BOPNET6u0SYmM%3DkQ%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: Django query from database

2013-10-11 Thread Kamal Kaur
On Fri, Oct 11, 2013 at 6:43 PM, Leonardo Giordani
 wrote:
> Sorry, I forgot the User part of your question.
>
> Let me understand the exact relationship between codes, words and users: do
> those words or codes come from a form? Or are saved in the DB for each user?

Actually I have to search for client details (from UserProfile table)
ignoring vowels. Because new users come from time to time. During
their registration, the phonetic codes of all the words entered are
saved (in CodeTable) along with the actual word.

When a string is searched for, in search box, it is split into words
and then these words are converted to phonetic codes which are to be
searched in CodeTable. The words corresponding to matching codes will
be searched for in UserProfile table which will be given as output for
searched keywords i.e No matter if a user enters "Smyth" or "Smith",
output will be on the basis of their sound. And thats all :)



> If you find the time to better describe the exact flow of your application I
> hope I can help you find a good solution for your problem.

Here you go :)

-- 
Kamaljeet Kaur

-- 
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/CAP8Q%2Bxi-%2BPibMh_DsMyf14UUpZ_BkSEw5nWTRkdYyzoCDkpJWA%40mail.gmail.com.
For more options, visit https://groups.google.com/groups/opt_out.


Re: ChoiceInline field giving name error

2015-01-14 Thread Kamal Kaur
On Wed, Jan 14, 2015 at 6:33 PM, sanjeet kaur  wrote:
> NameError: name 'ChoiceInline' is not defined


Have you tried this?

http://stackoverflow.com/questions/22768262/nameerror-not-defined

-- 
Kamaljeet Kaur

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


Re: ChoiceInline field giving name error

2015-01-15 Thread Kamal Kaur
On Thu, Jan 15, 2015 at 4:08 PM, sanjeet kaur  wrote:
> Yes I tried but all that is correct.

Are you following any tutorial? If yes, provide link.

-- 
Kamaljeet Kaur

-- 
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/CAP8Q%2BxgZPbKt5H_96wdr3trC8SC1A6X2Vhds8cT%3D5e%2BBZSnKSg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


(ModelForm) confusion

2014-07-29 Thread Kamal Kaur
Greetings!

What I have done:
There are four tables, from which I have generated ModelForms. Getting
the WorkerDetails from one side, adding the salary and attendance
things from the other side as the view says. If there is at least one
row added in WorkerDetail table, then it directly asks to add the
salary and attendance things. Everything is being added perfectly but
I have to add that "ForeignKey" thing in every form.

Aim:
To design a page like this:
http://tinypic.com/r/feor5h/8

Query:
What I need to do to display forms like this and get the foreign key
attribute directly from the displayed list? Is what I have done right?
Is there some better approach to get this desired layout?

Required code:
models.py: http://pastie.org/9430952
forms.py: http://pastie.org/9430955
views.py: http://pastie.org/9430962



-- 
Kamaljeet Kaur
I'm not what I'm compared to others, I'm what I'm compared to my yesterday.

-- 
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/CAP8Q%2Bxi-nCvRFJi2mP_YQvpanZMswEsdyLHzirV%2B%3DTtKX8N85w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: (ModelForm) confusion

2014-08-03 Thread Kamal Kaur


> There where a few hooks in your view, for example: you check for 
> 'is_valid()' but there is no code to execute after. I've changed it a bit:
>

 

>
> http://pastie.org/9431548
>
>

Thanks for the modifications.

@Satinderpal

Links are working. And yes, you got it right. Now I want that it 
automatically takes the foreign key after adding once but here I need to 
add in every modelform.

-- 
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/35d9658c-0165-47f4-96ac-23597a85f8a0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Iterate forms with for loop

2014-08-21 Thread Kamal Kaur
I'm iterating multiple forms for all the instances of a table in the
template using for loop.

But only the last form is being considered and it saves the data from
last form only. I'm not getting how to differentiate these forms and
save data, from every field and form, into the database.

Here is my code:

Template: http://paste.ubuntu.com/8104842/
View: http://paste.ubuntu.com/8104734/
Forms: http://paste.ubuntu.com/8104801/
Models: http://paste.ubuntu.com/8104814/

Am I doing it wrong or missing something important?

-- 
Kamaljeet Kaur

-- 
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/CAP8Q%2Bxi5kdMSZapG6TTHb0OO5hJDaKne3%3DnaxY6D2%3DoifxrExg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: I have created an app (total noob question)

2014-08-31 Thread Kamal Kaur
On Mon, Sep 1, 2014 at 9:56 AM, Michael Carey  wrote:
> ). I cannot work out which files to upload to my website to veiw the page?


Do you mean to deploy on production server?

-- 
Kamaljeet Kaur

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


Open Django template in dialog box (not in window)

2014-09-21 Thread Kamal Kaur
I'm trying to open a Django template using JS as a popup. Actually
I've done this. But it opens a separate window but I want a clean
dialog box or simply a division instead of that window.

Using window.open method, clicking on the "Advance", "popitup"
function runs. Here's the code:
http://pastie.org/9580729

The popitup function takes the passed url and opens a window
containing template sent by the view. But how to open a dialog box
instead?

I've tried using AJAX, like told in the link below but yet unable to do:
http://stackoverflow.com/questions/19267531/how-to-open-jquery-ui-dialog-with-ajax-request


-- 
Kamaljeet Kaur
kamalkaur188.wordpress.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 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/CAP8Q%2BxiKAooDSdCqfeYPOXOirgBbEr1KDaosp7F%3D4KTGb0TYJQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-22 Thread Kamal Kaur
On Mon, Sep 22, 2014 at 9:14 PM, Collin Anderson 
wrote:
> What happens when you try?

I'm not getting how to tell AJAX to go to a view and load the data that it
returns as the template, (in dialog). It's just not done. Feeling too dumb
to use it. And doesn't work when I send a URL like:
'/popupadvance/?worker_id={{worker_id}}'

@Fred Stluka

Yes, I've checked it before. It just opens
​up a​
division that is defined in the same HTML file and is working fine as a
separate file.


Just make an Ajax call to the URL
to get the HTML, instead of passing the URL to window.open(),
and pass the HTML to the jQuery dialog widget.


How? This is what I'm not getting. Can you give me a quick example of the
same
​,​
using Django?

-- 
Kamaljeet Kaur

-- 
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/CAP8Q%2Bxg8PocekfN7-bGcdN4VYRLfpCu%3DRzJ4kPh4ymD_j6o7Kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: web server question

2014-09-22 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 5:39 AM, Paraskevi vogot  wrote:
> I find it a little bit hard to install a web server (Appache)

s/Appache/Apache

-- 
Kamaljeet Kaur

-- 
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/CAP8Q%2BxhrNi%2BQ8QP0p6E2gGrkdndbw0E9kw8KOhfo%3D1sVyxqraA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: web server question

2014-09-22 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 7:04 AM, Lachlan Musicman  wrote:
> That should work fine,

o.O
I just pointed out the wrong spellings.

> although you will still need to install Python
> if you are on a Windows platform.

Exactly!


-- 
Kamaljeet Kaur
kamalkaur188.wordpress.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 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/CAP8Q%2Bxg95v47tNHDb3bKWPEsxw_3G4O4i7BKHQKWgJOR3YR21Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 11:17 PM, Fred Stluka  wrote:
> Kamal, does this fill in the gaps for you?  If not, let us know.

I've used this example in my app and getting this, in Firefox console,
on clicking the link:
http://pastie.org/9590027

Here is what I get as output:
http://awesomescreenshot.com/0413ji0643

It's not recoganizing the HTML template returned, I guess. Where can be the
problem now?

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.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 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/CAP8Q%2BxjeKDNakCk4BBiKKq4t7xOEt_xPf96-Poi7DgANPuzNRg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Wed, Sep 24, 2014 at 8:01 PM, Collin Anderson  wrote:
> Hmm... it seems to be trying to parse your html as javascript. Try using
> adding to your $.ajax():
>
> dataType: 'text',

Nothing happened.

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.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 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/CAP8Q%2Bxjwn%2Bjp1PAZCy0aBsY1m2gQFBwKmfYf%2BM8_Fr06-dRKgQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 6:14 PM, Collin Anderson  wrote:
> # popupadvance.html
> Here's the worker object: {{ worker }}



> src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js">
>
> Advance 
> 


What I see is that I need to write the contents to be shown, in the
dialog, inside this division:

  Content to be shown in dialog 

But in the previous case, when I did it with window.open event, a
separate HTML file was passed. See my first mail in the thread. On
clicking the link, a new, separate template came up in the window. But
here it checks for the content in a division which is already there in
same template. Which means the link and the content to be popped up
should be in "popupadvance.html" only.

Am I able to explain my point?


-- 
Kamaljeet Kaur
kamalkaur188.wordpress.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 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/CAP8Q%2BxhHwbSGfWV%3DCx-CM1cCeT8ipBWwkxm7L%3D6-DxuVE7r1Kg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Tue, Sep 23, 2014 at 11:17 PM, Fred Stluka  wrote:
>
> Excellent sample.  Thanks!  That's a nice standalone summary
> of how to do a popup dialog via jQuery and Ajax.  Worth posting
> to a tips page or blog if you have such, so other people can
> Google it.

@ Collin, please do the above now ;)

Yes, writing $("#dialog-form").html(data) worked like a charm. This is
what happens when we don't know all about the tool we're using :(

Can you point me to some documentation about JS + Django?

Something is left... Opening the page for the first time > Clicking on
the link > I get the dialog box as we've mentioned. But after closing
dialog by clicking on "cross" > reopening it > I get the "Contents to
be shown in popup" only in the  and no dialog box is there. Check
it here:
http://awesomescreenshot.com/0da3jnxoc4

Can we figure out, why does it happen? Browser console gives this:
TypeError: $(...).html(...).dialog is not a function

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.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 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/CAP8Q%2BxhQTbDkc4cuu_vnNdDzqoC5vqYgxQQ4iBHp_3Ct9gOHqA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-24 Thread Kamal Kaur
On Thu, Sep 25, 2014 at 12:10 AM, Jan Eskilsson 
wrote:
> "Uncaught TypeError: Undef is not a function" error in the Java Script,
dont
> understand why really ?

Yes, I get the same in Chromium  (y)
​,​
but only after reopening, as I mentioned in my previous mail.

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.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 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/CAP8Q%2BxjLX6QXikW0bZJy8G1OziStHCqjK0ebM%3Dx4ukgGtghYHw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-26 Thread Kamal Kaur
On Fri, Sep 26, 2014 at 1:49 AM, Collin Anderson  wrote:
> $("#popup").dialog({modal: true}).dialog('open')).load(this.href)
>
> I've updated my blog post.

This is opening the template on next page :/

And you need to edit the post:

$("#popup").dialog({modal: true}).dialog('open')).load(this.href)

There should not be double brace after "open".

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.com

http://faithreel.com/dancing-3-year-old-amazing-even-actor-jet-li-cheering/
“My dream is to make people happy.”

Know your sheet size:
http://goo.gl/8yaeyo

-- 
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/CAP8Q%2BxgmKcHaY1Zf%2Bc%3DWZsVaQXWRz5jmt-9zkU3bYhUniBrVvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Open Django template in dialog box (not in window)

2014-09-26 Thread Kamal Kaur
On Fri, Sep 26, 2014 at 10:40 PM, Collin Anderson  wrote:
> Ahh yup. I should really test my examples :)

Indeed!

> The SyntaxError will make the
> even handler not register. Does removing the extra parentheses fix it?

No.

In fact, I got the content in next page only after removing it ")"  :P

-- 
Kamaljeet Kaur
kamalkaur188.wordpress.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 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/CAP8Q%2Bxi%3DOfT-2fooEruEgAEUacxLZ2tHs%3DHK8Ncs0-X2iq0U1w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Deployment in Django

2014-03-22 Thread Kamal Kaur
On Sat, Mar 22, 2014 at 2:50 PM, Aryak Sengupta  wrote:
> But what is the simplest and the easiest way to go about deployment?
>
> P.S. I am new to Django.

Starting with a small app, following a good tutorial is not a bad
idea! And the simplest, it lets you start from basics. Make sure you
use git right from the first step. Will be beneficial. First try
exploring about it.

Something I just found:
http://stackoverflow.com/questions/5467916/what-is-a-good-tutorial-for-django-other-than-the-django-documentation

-- 
Kamaljeet Kaur

kamalkaur188.wordpress.com
facebook.com/kaur.188

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